0
<xsd:element name="echodemo" type="EchodemoType">
<xsd:annotation>
<xsd:documentation>
Root element
</xsd:documentation>
</xsd:annotation>
這是我的XSD。如何使用xsd元素名稱而非元素類型構造soap消息
,但是當我不得不chooing在RSA生成Java生成XSD的Java對象,它生成EchodemoType.java .. 所以我將請求傳遞給我的服務
EchodemoType request = new EchodemoType();
request.setEchoRequest("This is Echo String !!!");
request .setVersion(new BigDecimal("1.0"));
之前創建的實例如下圖所示而調用我的web服務我看到了SOAP消息像下面,
<EchodemoType version="1.0">
<ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>
</EchodemoType>
基本上我想與元素名稱的SOAP消息開始標記「echodemo」,而與類型「EchodemoType」。還有我的名字空間希望
<echodemo version="1.0" xmlns="http://test.com/api/test/services/echodemo">
<ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>here
</echodemo>
請告訴我的方式來產生類的肥皂消息或我需要糾正這個?對於mashelling對象像下面你不需要