0

I'm trying to generate a .NET WS client from a WSDL + some XSD. I've tried two ways with the same result: Add Web Reference and WSDL.EXE I've tried different framework versions, IDE versions and different approaches (WCF and old style WSs).

The tools generate two interfaces with the correct operations and all the type defined in the XSD schemas, but none of the types contain the members I defined in the schema.

My WSDL + XSDs work well on java platform (jax-ws via cxf, axis) and I can produce clients and publishers.

The published services can be consumed via soapUI, which generate correct requests (with all the members defined in the schemas).

The same result is given by the tools even if I use the published WSDL url instead of local files.

Update:
I've tried to avoid the wsdl:import and I built a valid single file WSDL. Same result.

One more consideration about thie issue is that I use type inheritance by xsd:extension. Are there issues about generating .Net WS client with this feature?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Andrea Colleoni
  • 5,919
  • 3
  • 30
  • 49

1 Answers1

0

Following the suggestion from an answer to another question (not th one marked as correct, but one that I've upvoted at wsdl.exe Error: Unable to import binding '...' from namespace '...'), I verified the WSDL and found that message part names have all the same name parameters (I've created the WSDL thorugh Eclipse IDE).

I changed the names of the wsdl:part in my wsdl:messages to be unique within the wsdl and the .Net classes were generated correctly (with all members) either from the IDE or from the WSDL.EXE tool.

Didn't find mention about this restriction about message part name; here http://msdn.microsoft.com/en-us/library/ms996486.aspx I found a piece of WSDL that should reproduce the same behaviour, but no warning about the limitation.

Community
  • 1
  • 1
Andrea Colleoni
  • 5,919
  • 3
  • 30
  • 49