Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients?
-
01-07-2019 - |
Question
Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients? For example incompatibilities with other SOAP libraries?
This is so that the SOAP interface can be exposed for third parties to integrate with our software.
Solution
Some of the problem areas I've encountered with WCF:
- It generates WSDL that is split
across multiple URLs. That is, one
part of the schema is at one URL,
another is at a different URL, etc.
The "main" WSDL URL (the one with
just "?WSDL" after the service name)
references the others via
xsd:import
elements. Many SOAP clients (eg pre-.NET Delphi) have enormous difficulty with this idiom. So you really have to "flatten" your WSDL in order to achieve interoperability in practice. One solution is given here. - WCF doesn't generate XML namespaces the same way as, say, ASMX web services. WCF has a tendency to place any service or data contract into a namespace of its own choosing. Again, some SOAP clients have difficulty with this. You can increase you interoperability level by adding an explicit namespace to your ServiceContract and DataContract attributes.
- Many SOAP clients won't handle faults as nicely as WCF clients. For example, the proxy generation code won't create client-side objects for the faults declared in the WSDL. The faults will still be transmitted to the client, of course, but the client then has to do more work to figure out what kind of fault it was.
OTHER TIPS
versions of the WS-* standards stack can also be an interoperability issue - for example the version of WS-Addressing (2003) supported by some java implementations eg Oracle BPEL is not supported by WCF which supports the later draft and 1.0 versions but not the earlier 2003 one
Generally everything works fine. It will obviously depend on the client you're using - not everyone implement SOAP properly.
P.S. Could you please rephrase your question if you hope for more specific answer?