I have a .Net Webservice and I used JAX-WS to generate the stubs for it (downloaded the WSDL and XSD locally). Now I packaged the stubs in one jar (stubs.jar) and the WSDL as well as XSD in other jar (wsdl.jar).
I use the stubs like:
URL url = ServiceClient.class.getResource("MyService.wsdl");
MyService service = new MyService(url,new QName(namespaceURI,localName));
MyServicePortType portType = service.getMyServicePort();
BindingProvider bp = (BindingProvider) portType;
//WSDL_URL is the actual endpoint address
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, WSDL_URL);
Although everything works fine, but during debugging I noticed that the port type object creation takes a lot of time.
Also, the port type object on debugging shows the WSDL URL as the remote URL (even before it is type casted into Binding Provider object).
I am not able to identify the reason for the changed URL of WSDL in Port type object. Anyone, please help me understand.
Also, is there anything that can be done to reduce the time taken to create the port type objects.
Thanks in advance!