Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jax-ws import and customizing package to namespace mapping

Tags:

java

jax-ws

How do I customize the packages of the namespaces when using jax-ws to generate the java artifacts.

I'm running jax-ws iwsmport via maven.

I don't want to change the default package, I want to be able to map from more than one namespace to different packages.

like image 647
Michael Wiles Avatar asked Jun 02 '11 12:06

Michael Wiles


1 Answers

<jaxb:bindings 
            schemaLocation="../../wscontract/src/main/resources/wsdl/address.xsd"
    node="//xsd:schema[@targetNamespace='http://demo.iae.ws/address']">
    <jaxb:schemaBindings>
        <jaxb:package name="demo.ws.address" />
        <jaxb:nameXmlTransform>
            <jaxb:typeName prefix="Customer" />
        </jaxb:nameXmlTransform>
    </jaxb:schemaBindings>
</jaxb:bindings>

Use JAXB bindings with the wsimport -b switch. You can find some sample files here.

like image 165
McDowell Avatar answered Oct 26 '22 09:10

McDowell