Reputation: 197
I am new to webservices and I am having trouble directly modifying a wsdl to return a custom type instead of a string
this is the wsdl -> http://www.webservicex.net/globalweather.asmx?WSDL
is it possible to edit a wsdl to return a custom type as a response without knowing how the webservice is defined on the remote side?
Upvotes: 1
Views: 1066
Reputation: 12211
A WSDL is a contract that the service provides that describes how to interact with the service. This is done by the WSDL describing how to call the service and what data to send and what you will receive. You cannot change a WSDL that does not belong to you. Once a WSDL is deployed and running it is essentially a read only contract between service providers and consumers on how things will work
Changing a WSDL means that you will probably need to make a change to the code of the service. In your example the WSDL appears to be a service that you have no source code control over and thus you cannot go modify that WSDL and expect your client to work.
There is another way to approach this though. You can create a proxy web service that consumes the original web service and then translates the response to your new WSDL's structure. A client will then call your web-service which will call the original service translates the response back to what your WSDL specifies it as.
Upvotes: 2