【问题标题】:Oracle SOA Suite 12c invoke external service with additional SOAP headersOracle SOA Suite 12c 使用附加的 SOAP 标头调用外部服务
【发布时间】:2019-06-13 04:42:44
【问题描述】:

我有一个业务场景,我必须使用 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 服务调用。

【问题讨论】:

  • 您的目标 Web 服务是否需要 wsse 安全性?否则,您可以在 SOAPUI 中将其关闭。您可以使用这些设置并查看原始请求并查看它如何与标头一起使用。
  • @Jesper Vernooij,是的,目标 Web 服务在 TransactionReference 中使用 wsse 安全性和附加安全性有效负载。
  • 您可以在范围级别或全局创建您的标头变量,并将它们添加到您的 BPEL 的“编辑调用”步骤中。只需双击调用,单击标题,单击浏览变量并添加请求的变量。它将被添加到有效负载中的标题中。
  • 这能回答你的问题吗?

标签: soap soa bpel soa-suite


【解决方案1】:

添加这个 sn-p 以省略默认 wsa 标签

&lt;binding.ws&gt; &lt;property name="oracle.soa.ws.outbound.omitWSA" type="xs:boolean" many="false" override="may"&gt;true&lt;/property&gt; &lt;/binding.ws&gt;

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-08-01
  • 2020-10-28
  • 1970-01-01
相关资源
最近更新 更多