Jax-ws import and configure a package for namespace mapping

How to configure namespace packages when using jax-ws to generate java artifacts.

I am running jax-ws iwsmport through maven.

I do not want to change the default package, I want to be able to map to more than one namespace in different packages.

+8
java jax-ws
source share
1 answer
<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 .

+8
source share

All Articles