I have several WSDL files that I"m using to generate client code to talk to a remote service using SOAP. The generated code includes a line that looks like this:
public class AddProductService extends Service {
static {
URL url = null;
try {
url = new URL("file:/Users/developer/spg/spg-subman/SubscriptionManager/src/main/resources/wsdl/AddProduct.xml");
I've cut out some code that was generated and included only the line that I think is broken.
The WSDL files are in the project in src/main/resources/wsdl
and that directory is not going to exist where this code will be deployed.
I'm using the cxf-codegen-plugin plugin with maven to generate this code.
I have a couple of questions:
- Is the WSDL required at runtime?
- If so, can I just copy it into the jar file and point the URL above to a
classpath:
URL? - Can I copy the WSDL files into the target directory and then use those files to generate the java code for the client?