I am a Java programmer and have created a WSDL that defines a web service that is supposed to be implemented by providers in other companies so my system can call different providers in a uniform way. Working with the WSDL in Java works fine - I can generate a server and client that work together and Endpoint.publish(URL) respects the WSDL and publishes it with only an aditional comment and a replaced service-url.
Now the problem: One of the providers uses .NET asmx to implement the service and this seems to completely transform the WSDL (as seen by getting https://<providers-service-url>?WSDL
) and the service fails when I use my generated classes (generated from the original wsdl that is) to call the service. The fault indicates the .NET equivalent of an NPE. SOAPUI works fine when pointed to the running service.
I believe that the provider used
wsdl.exe /serverInterface <my.wsdl>
to generate his service.
So the questions to any .NET gurus out there are:
How should the provider generate the service so it works with clients generated from the original wsdl?
Can the .NET service preserve the original WSDL so https://<providers-service-url>?WSDL
is near identical to the original WSDL?
Thanks for any input.
The WSDL is really just a kind of specification document that allows those who are implementing a service to see what methods are exposed by it - as well as endpoints etc. I have consumed Java web services using .NET in the past and really the WSDL file plays a somewhat minor role. The .NET developer can simply create a reference to the service via the Visual Studio IDE. This will create whatever classes he needs to then implement the various methods. Of course he will have to know what the security model is so he can implement the correct bindings. Many people will say that Java doesn't play nice with .NET and certainly there are the odd hurdles to overcome in that respect but I've personally never come across a Java web service that I haven't been able to consume in .NET.