我们正在设计一个由外部系统调用的 Web 应用程序。我们将从如下所示的外部系统接收 Web 服务:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tis="http://schemas.tis.com/1.2/" xmlns:der="http://schemas.tis.com/DataProvisioning/">
<soapenv:Header>
<tis:SessionId>99999999</tis:SessionId>
</soapenv:Header>
<soapenv:Body>
<tis:Create>
<tis:MOType>SPPM@http://schemas.tis.com/DataProvisioning/</tis:MOType>
<tis:MOId>
<der:codex>12345677</der:msisdn>
</tis:MOId>
<tis:MOAttributes>
<der:createSPDD ProfileID="1" Action="createData">
<der:TechProduct Action="add" BarCode="15">
<der:Arguments ArgName="arg1" ArgType="string" ArgValue="1"></der:Arguments>
<der:Arguments ArgName="arg3" ArgType="string" ArgValue="2"></der:Arguments>
</der:TechProduct>
<der:TechProduct Action="delete" BarCode="21">
<der:Arguments ArgName="arg1" ArgType="string" ArgValue="1"></der:Arguments>
<der:Arguments ArgName="arg3" ArgType="string" ArgValue="2"></der:Arguments>
</der:TechProduct>
</der:createSPDD>
</tis:MOAttributes>
</tis:Create>
如您所见,我们将收到的这个 SOAP 信封包含名称空间。到目前为止,我的 Web 服务应用程序已使用 JAX-WS 和自下而上的方法进行编码(只需将 @WebService 和 @WebMethod 注释添加到类中)。设计需要基于名称空间接收消息的 Web 服务的正确方法是什么?我应该先设计 WSDL 吗?我看不到如何收集 Header 或 Body 中的属性,例如 MoType 或 MoId。有什么帮助吗?
非常感谢