how to add <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> in xml soap request.
我的示例請求中給出below.I創建JAXB註解的類和編組對象爲XML格式,但是我需要添加上述肥皂envlope和身體在向服務器發送請求之前請求。如何添加<皁:信封>和<soap:body>在XML請求
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StatusRequest>
<AccountID>231</AccountID>
<PassPhrase>sddddd</PassPhrase>
<StatusList>
<PICNumber>111111</PICNumber>
</StatusList>
<Test>Y</Test>
</StatusRequest>
請提供示例程序。
您是否使用任何WS API?像Axis/Axis2/CXF/JAX-WS一樣? –