3

Is it possible to create a single file to generate a client from a WCF generated WSDL file (and any additional XSD files that are also generated from this service)

I can generate a valid client using svcutil.exe passing both the wsdl file and each xsd file, but I have a customer who is using a PHP tool to generate this and I wanted to see if I could make it easy for them by having only one file instead of many.

Toran Billups
  • 27,111
  • 40
  • 155
  • 268

2 Answers2

3

Yes, you can - with some clever WCF extensions. Check out these ready-made solutions:

Hope that helps!

Marc

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
0

It's possible.

The WSDL types element can contain multiple schema elements (each with its own namespace), this means that types element from an imported WSDL/XSD can be put in the root document's types element under a schema element that represents the same namespace. Other WSDL elements (message, portType, binding & service) use the root definitions element namespace, so these imported elements from different namespaces cannot remain under different namespaces when put in the same document.

Note however that only the types namespaces are used for the construction of SOAP messages, so changing the namespace of these other elements (if necessary) will not affect the generated SOAP messages.

Tal Aloni
  • 1,429
  • 14
  • 14