【发布时间】:2014-11-20 11:25:08
【问题描述】:
我有网络服务客户端,当我发送请求时,soap 消息看起来像
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<Open xmlns="ttt:some:namespace">
<PartnerName>SomeParther</PartnerName>
<NumberToS>1</NumberToS>
</Open>
</S:Body>
</S:Envelope>
还有这个不正确的消息。正确的消息看起来像
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="ttt:some:namespace">
<soapenv:Header />
<soapenv:Body>
<ttt:Open>
<ttt:PartnerName>SomeParther</ttt:PartnerName>
<ttt:NumberToS>1</ttt:NumberToS>
</ttt:Open>
</soapenv:Body>
</soapenv:Envelope>
我怎么做肥皂请求
So_Service soService = new So_Service();
SoPort soPort = soService.getSoaphaSOAP();
/* test */
System.out.println("getServiceName from So_Service" + soService.getServiceName());
soPort.open("SomeParther", 1);
从 So_Service ttt:some:namespace 输出 getServiceName
我做错了什么?我应该怎么做才能正确生成消息?请帮忙
【问题讨论】:
标签: java web-services soap