Hi
We are using WSConsume to generate stubs for a WSDL document. We put the document in the jar-file along with the generated stubs, and specify the wsdlLocation as "file.wsdl".
The @WebServiceClient file then contains the following part in a static block:
static { URL url = null; try { URL baseUrl; baseUrl = foo.Bar.class.getResource("."); url = new URL(baseUrl, "file.wsdl"); } catch (MalformedURLException e) { logger.warning("Failed to create URL for the wsdl Location: 'file.wsdl', retrying as a local file"); logger.warning(e.getMessage()); } PXORDER_WSDL_LOCATION = url; }
static { URL url = null; try { url = foo.Bar.class.getResource("file.wsdl"); } catch (MalformedURLException e) { logger.warning("Failed to create URL for the wsdl Location: 'file.wsdl', retrying as a local file"); logger.warning(e.getMessage()); } PXORDER_WSDL_LOCATION = url; }