You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generated client and server code for my wsdl using wsimport.
However the client code on startup is looking for the WSDL file in the location it existed in on the machine where I ran wsimport. I would imagine that with all the annotations in the generated code the client should not require the .wsdl at runtime ?
The problem is, when I take the standalone client code and distribute it to other machines, the client fails with the "Failed to access WSDL file exception".
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/BackendManagerForGUI.wsdl. It failed with:
/C:/BackendManagerForGUI.wsdl (No such file or directory).
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:217)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:174)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.(Service.java:56)
I am creating a proxy using code that looks like:
BackendManagerService bm = new BackendManagerService();
port = bm.getBackendManagerPort();
// Use Proxy Instance as BindingProvider
BindingProvider bp = (BindingProvider) port;
Map<String, Object> rc = bp.getRequestContext();
rc.put (BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:9077/BackManager");
Is there some other way for me to create the client service so that it does not require the .wsdl file at runtime ?
The text was updated successfully, but these errors were encountered:
This mojo is just a wrapper around the JAX-WS toolset, so what you're asking about is about the classes generated by that tool (wsimport).
Having said that I solved this by including the wsdl in the jar and make the generated ws client use it during runtime by providing this mojo execution configuration:
The trick here is the combination of xuseBaseResourceAndURLToLoadWSDL and wsdlLocation. Do note that the wsdl file needs to be in the package path of the generated client.
Has the following problem been solved which I copy from Jax-ws client requires WSDL file at runtime ? and bothering me a lot.
I generated client and server code for my wsdl using wsimport.
However the client code on startup is looking for the WSDL file in the location it existed in on the machine where I ran wsimport. I would imagine that with all the annotations in the generated code the client should not require the .wsdl at runtime ?
The problem is, when I take the standalone client code and distribute it to other machines, the client fails with the "Failed to access WSDL file exception".
Exception in thread "AWT-EventQueue-0" javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/BackendManagerForGUI.wsdl. It failed with:
/C:/BackendManagerForGUI.wsdl (No such file or directory).
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:217)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:174)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.(Service.java:56)
I am creating a proxy using code that looks like:
Is there some other way for me to create the client service so that it does not require the .wsdl file at runtime ?
The text was updated successfully, but these errors were encountered: