Web services 使用名称空间的SOAP消息
我们正在设计一个由外部系统调用的Web应用程序。我们将从外部系统接收一个Web服务,如下所示:Web services 使用名称空间的SOAP消息,web-services,soap,wsdl,jax-ws,Web Services,Soap,Wsdl,Jax Ws,我们正在设计一个由外部系统调用的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>
<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>
99999999
SPPM@http://schemas.tis.com/DataProvisioning/
12345677
正如您所看到的,我们将收到的SOAP信封中包含名称空间。到目前为止,我的Web服务应用程序都是使用JAX-WS和自底向上的方法编写的(只是在类中添加@WebService和@WebMethod注释)。设计需要接收基于名称空间的消息的Web服务的正确方法是什么?我应该首先设计WSDL吗?我看不到如何收集标题或正文中的属性,如MoType或MoId。有什么帮助吗非常感谢从您的问题中很难理解您是想要公开web服务还是想要使用web服务。如果要公开具有此结构和命名空间的web服务,可以选择自底向上或自顶向下的方法。使用自上而下的方法,您将创建