开发者

java wsimport rename/different ObjectFactory.java

开发者 https://www.devze.com 2023-03-09 01:21 出处:网络
I\'m having problem with wsimport. In one of my wsdl which has to be wsimported I have a complexType with name \"objectFactory\". Is there any开发者_如何学Python way to tell command wsimport to create

I'm having problem with wsimport. In one of my wsdl which has to be wsimported I have a complexType with name "objectFactory". Is there any开发者_如何学Python way to tell command wsimport to create while importing different class for maintaining JAXB connections such is ObjectFactory.java. In other words can I tell wsimport instead of creating ObjectFactory.java some custom class like MyCustomFactory.java?

Is it possible to customize mapping in such a way that complexType name="objectFactory" would map to object with different name like MyObjectFactory.java?

Thx


JAX-WS (of which wsimport is a part) uses JAXB for generating the XML binding files (and for doing the actual binding). So you'll want to check out this documentation on customizing JAXB bindings. It applies just as well to your case.

In your case you'd use something like this:

<xsd:complexType name="objectFactory">
  <xsd:annotation>
  <xsd:appinfo>
     <jxb:class name="MyObjectFactory" />
  </xsd:appinfo>
  </xsd:annotation>
  <!-- ... rest of your specification ... ->
</xsd:complexType>

This example is for inline customization in your XML Schema/WSDL. You can also provide this information as external configuration.

0

精彩评论

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