sábado, 19 de septiembre de 2015

MS wsdl.exe: Cannot find definition for...Parameter name: name

Are you trying to generate a CS proxy for a WSDL which maybe imports another WSDL which in turn maybe imports a XML Schema and so on? (e.g. MyServiceConcrete.wsdl -> MyServiceAbstract.wsdl -> MyServiceSchema.xsd).

I come from the Java world, so the natural way for me would be:

wsdl.exe MyServiceConcrete.wsdl

But...crash

Microsoft (R) Web Services Description Language Utility
Microsoft (R) .NET Framework, Version ...]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Cannot find definition for ... EndpointInterface.  Service Description with namespace ... is missing.
Parameter name: name
  
If you would like more help, please type "wsdl /?".

And for example, Java's wsimport works like a charm:

wsimport.exe MyServiceConcrete.wsdl

The problem is wsdl.exe doesn't resolve import's (neither xsd.exe)

So just feed wsdl.exe with all the required dependencies (WSDLs, XSDs...).

wsimport.exe MyServiceConcrete.wsdl MyServiceAbstract.wsdl MyServiceSchema.xsd

In the above example, all files have to be in the same directory.

Profit.





jueves, 17 de septiembre de 2015

IIB: "Unsupported Method: GET" for WSDL even if "Enable support for ?wsdl" is true

Are you trying to get the WSDL for your service using the traditional http://server:port/path/to/service?wsdl, making sure that you checked the "Enable support for ?wsdl" option and get just a plain "Unsupported Method: GET.message?


Look again your "Path suffix for URL" and check if it has the leading slash (/)



:)