开发者

jax-ws import and customizing package to namespace mapping

开发者 https://www.devze.com 2023-03-10 03:39 出处:网络
How do I customize the packages of the namespaces when using jax-ws to generate the jav开发者_开发百科a artifacts.

How do I customize the packages of the namespaces when using jax-ws to generate the jav开发者_开发百科a 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.


<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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号