You might want to try putting the WSDL (and XSDs) into the JAR project in a
folder called META-INF/wsdl.  When you generate the artifacts using
wsdl2java, you can do something like the pattern shown with this Ant task
(yes, you could do similar with Maven)

<target name="cxfWSDLToJava" depends="init, copy-wsdl-local">
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
* **<arg value="-wsdlLocation" />*
* <arg value="/META-INF/wsdl/${ws.endpointName}.wsdl" />*
<arg value="-d" />
<arg value="${src}" />
<arg value="-client" />
<arg value="-verbose" />
* **<arg value="${src}/META-INF/wsdl/${ws.endpointName}.wsdl" />*
<classpath>
<path refid="cxf.classpath" />
<path refid="project.classpath" />
</classpath>
</java>
</target>

This causes the generated code to look like this and it IS found in the JAR
in the classpath as you describe:  (notice the generated path is
"/META-INF/wsdl/... "


Mark,

Thanks for this suggestion -- this makes much more sense.

I have one follow-up question.  In my case, I'm using -wsdlList to
process a collection of wsdl at once.  Is there a way to provide a
list of wsdlLocations?  (If it matters, I'm using XmlBeans data
bindings.)

Steve

Attachment: pgp8FFp812Be8.pgp
Description: PGP signature

Reply via email to