1

I have a business scenario where I have to invoke a client SOAP service that uses additional SOAP header parameters using Oracle SOA Suite 12c. When I test the web service independently via SOAP UI it shows below schema as input-

<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>

As we can see additional header elements wsse:Security > UsernameToken > Username/Password , TransactionReference > SourceSystemId / TxID / BusinessID as XML node.

Further, I configured the SOAP adapter in my SOA composite but it has only one input argument UserId. Now I am not able to figure out how can I pass additional headers (username/password, SourceSystemId / TxID / BusinessID ) in SOA Header for target web service invocation in my SOA composite.

k10gaurav
  • 462
  • 7
  • 24
  • have you seen these? https://biemond.blogspot.com/2012/04/retrieve-or-set-http-header-from-oracle.html https://rohanlopes.blogspot.com/2016/03/passingreceiving-http-header-in-soa-bpel.html – Joe Jun 13 '19 at 14:12
  • does your target webservice require wsse security? Otherwise you could switch it off in SOAPUI. You could play around with the settings and look at the raw request and see how it plays with the header. – Jesper Vernooij Jun 19 '19 at 11:52
  • @Jesper Vernooij, yes the target web service uses wsse security and additional security payload in TransactionReference . – k10gaurav Jun 20 '19 at 07:19
  • You can create your header variables on scope level or globally and add them in the "Edit Invoke" step of your BPEL. Just double click the invoke, click headers, click browse variables and add the requested variable. It will be added to your header in the payload. – Jesper Vernooij Jun 20 '19 at 10:47
  • Does this answer your question? – Jesper Vernooij Jun 24 '19 at 13:27

1 Answers1

0

add this snippet to omitt default wsa tags

<binding.ws> <property name="oracle.soa.ws.outbound.omitWSA" type="xs:boolean" many="false" override="may">true</property> </binding.ws>

luigi
  • 1
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 21 '21 at 17:28