Assuming Java:
1.- Run:
wsimport -keep -p myClient url_to_wsdl
Where myClient will be the folder with the client artifacts created. url_to_wsdl URL of your WSDL.
2.- Create a client class using the method with the following code:
YourServiceClass service = new YourServiceClass(); YourEndpointClass port = service.getPort(); YourRequestClass request = new YourRequestClass(); YourMessageClass message = new YourMessageClass();
YourServiceClass is a generated artifact that extends javax.xml.ws.Service.
YourEndpointClass can be seen in YourServiceClass in an operation that calls super.getPort ();
YourRequestClass and YourResponseClass will depend on how the Request and Response message is managed.
YourMessageClass will be a wrapper class for your message (depending on WSDL).
All your * classes must be generated by wsimport
and imported into your client class. With the wsimport
flag in wsimport
you can see .java
files and determine which classes you need to complete this code.
source share