Skip to main content

wsimport - using schema from jar (dependency)

No replies
avalanche333
Offline
Joined: 2014-02-10
Points: 0

Hi All,

I am trying to generate some web service client code from a WSDL and schemas that I have.
One issue I am encountering is that one schema file (xsd) I require is in a separate jar that my client project has a dependency on.
I cannot figure out how to reference that file in my pom. I have been lead down the path of looking into defining a catalog (and it seems that how it was done in the and build we use to use) however I can't get this working.

Below is what I have.. but not sure if I am on right track or not. Any help is appreciated!

The POM Sample

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
com.thegroup
com.theclientcode
0.0.1-SNAPSHOT


com.mygroup
myartifact
1.0


org.codehaus.mojo
jaxws-maven-plugin
1.12



wsimport




true

${basedir}/src/main/resources/META-INF/catalog.xml
${basedir}/src/main/resources
${project.build.sourceDirectory}
${basedir}/src/jaxws/stale/.staleFlag
/META-INF/wsdl/TheWSDL.wsdl

/META-INF/wsdl/TheWSDL.wsdl

2.1




com.sun.xml.ws
jaxws-tools
2.2.0.2



The catalog.xml Sample:


Jaxb Bindings for the schema:

xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xs="http://www.w3.org/2001/XMLSchema">




Package level documentation for generated package]]>