I need to access a webservice from Java. The service has a WSDL. Now how do I get to calling its operations?
- I’ve already used
wsimporton it, but that only generates XML objects for the operations/responses, nothing to actually call them. - I’ve looked at Spring-WS but it doesn’t look like it’s completely what I want (even though it might be part of the solution). The word “wsdl” doesn’t appear in that page at all.
wsimportdoes not only generate the Objects needed for communication with the service but also a service client. Create an instance of the classMSaleServiceand fetch the port withgetMSaleServiceSoap(). That’s it.There might be some problems though.
wsimportcomplained aboutbut I don’t know if this poses real problems.