【发布时间】:2015-05-27 22:57:02
【问题描述】:
<xsd:element name="echodemo" type="EchodemoType">
<xsd:annotation>
<xsd:documentation>
Root element
</xsd:documentation>
</xsd:annotation>
这是我的 XSD。
但是当我通过选择在 RSA 中生成 java 来从 xsd 生成 java 对象时,它会生成 EchodemoType.java .. 所以在将请求传递给我的服务之前,我在下面创建实例 LIKE
EchodemoType request = new EchodemoType();
request.setEchoRequest("This is Echo String !!!");
request .setVersion(new BigDecimal("1.0"));
在调用我的网络服务时,我看到了如下所示的肥皂消息。,
<EchodemoType version="1.0">
<ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>
</EchodemoType>
基本上我想要带有元素名称“echodemo”而不是类型“EchodemoType”的肥皂消息开始标签。我也希望它带有名称空间
<echodemo version="1.0" xmlns="http://test.com/api/test/services/echodemo">
<ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>here
</echodemo>
请告诉我生成该类以获取该肥皂消息的方式或我需要在哪里更正此问题?
【问题讨论】:
标签: web-services jakarta-ee soap jaxb