WCF and interoperability

I was trying to create an endpoint using WCF that was to look almost identical to an existing endpoint hat was created using some java tools (we were creating a new .Net app and had to mimic some older endpoints).The endpoint seemed ok at first glance according to the WSDL so I generated a client from it using the SVCUTIL.EXE tool and was going to use the interface from that to base my new service off.

I performed the service generation and all looked initially ok. I thought I would regenerate the proxies based off my newly created service just to make sure everything looked right, but my newly generated proxies had no methods at all.

Now to cut a long story short, I found a post here that mentions an interoperability issue with WCF and Java based services. Apparently, some Java services can generate an entry in the WSDL that either contains a blank soapAction attribute or none at all.

<operation name="someOperation">
  <soap:operation soapAction="">

More information in this can be found here.

What this does though is cause SVCUTIL.EXE to generate a ServiceContract with an attribute like this:

System.ServiceModel.OperationContractAttribute(Ation = "", ReplyAction = "*")]

However, what it needs to be is something like this:


and then life will be good and you will get all your expected methods. So I simply took a copy of the generated interface code, and changed to suit. Since SVCUTIL.EXE is a client side tool, its not like i will be regenerating this all the time, I merely used it as a shortcut to get the interface in as quick a time as possible. This technical hiccup caused me to use more time than anticipated, but its a pretty easy fix.

1 Comment

Comments have been disabled for this content.