I am working on an implementation that will use wsdl, which I received from the provider. Our project works on Spring and CXF, and I would like to create a jar that will allow me to access these provider wsdl services, but I am facing class problems.
Using CXF wsdl2java I can generate code that acts as follows:
WSDL_LOCATION = new URL("file:SomeService.wsdl");
The service requires wsdl to be on the class path, but I would like to bundle it in the bank so that it can be distributed as a standalone bank. Using the wsdl2java tool, I can point the string in the instance to the URLs for whatever I want. However, I did not find a combination of the user line and the location of the wsdl file inside the jar used.
The only way I worked as I want is to put the wsdl file in the same folder as SomeService.class, and use the following line:
WSDL_LOCATION = TrackService.class.getResource("TrackService_v4.wsdl");
However, I have the disadvantage that I need to manually edit the Java code and compile it myself. This is undesirable, because in the end we would like to make this process part of our maven and wsdl2java builds automatically generate and compile.
I am fine with wsdl, being somewhere in the bank, but I do not know what to transfer to wsdl2java so that it refers to the file inside the bank.
Does anyone have any suggestions or experience?
source
share