我有一个业务场景,我必须使用 Oracle SOA Suite 12c 调用使用附加 SOAP 标头参数的客户端 SOAP 服务。当我通过 SOAP UI 独立测试 Web 服务时,它在下面的模式中显示为输入 -
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://xmlns.client.org/Schema/Common/1.0/Common.xsd" xmlns:user="http://xmlns.uppcl.org/Schema/UserAccess/2.0/UserAccess.xsd">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.demo-open.org/wss/2004/01/demo-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.demo-open.org/wss/2004/01/demo-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>DemoUser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Demo@123</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
<com:TransactionReference>
<com:SourceSystemId>TXNSYSID</com:SourceSystemId>
<com:TxID>0403216376127836</com:TxID>
<!--Optional:-->
<com:BusinessID>DTUIQS</com:BusinessID>
</com:TransactionReference>
</soapenv:Header>
<soapenv:Body>
<user:CheckUserRequest>
<user:UserId>USER_ID</user:UserId>
</user:CheckUserRequest>
我们可以看到附加的标头元素 wsse:Security > UsernameToken > Username/Password , TransactionReference > SourceSystemId / TxID / BusinessID 作为 XML 节点。
此外,我在我的 SOA 组合中配置了 SOAP 适配器,但它只有一个输入参数 UserId。现在我无法弄清楚如何在 SOA 标头中传递其他标头(用户名/密码、SourceSystemId / TxID / BusinessID )以在我的 SOA 组合中进行目标 Web 服务调用。