Friday, June 18, 2010

Passing Userid and Password Credentials as SOAP Header in BPEL

Problem
There may be Services that have policies enforced to receive the userid/password as part of the requests. If you do not have a Service Bus then this informaton has to be passed from the BPEL.


Solution

  1. Right click on the Web Service in Composite Design view
  2. Select "Configue WS Policies"
  3. Add Client Security Policy as applies to your case. I had to us "oracle/wss_http_token_client_policy"
  4. Add the following Binding Properties from the Property Inspector
    1. "oracle.webservices.auth.username" : admin
    2. "oracle.webservices.auth.password" : admin
If you look at the source generated in the composite .xml, you would see the following


  <reference name="...Service" ui:wsdlLocation="....wsdl">
    <interface.wsdl  ...../>
    <binding.ws port="....."
    
      <property name="oracle.webservices.auth.username" type="xs:string"
                many="false" override="may">admin</property>
      <property name="oracle.webservices.auth.password" type="xs:string"
                many="false" override="may">admin</property>




    </binding.ws>
  </reference>

4 comments:

  1. Would this work, if I need to pass in additional parameter or property via the SOAP header, say something like "RepositoryName"?

    ReplyDelete
  2. Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle SOA . Actually I was looking for the same information on internet for Oracle SOA and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more aboutOracle SOA . By attending Oracle SOA Training .

    ReplyDelete

  3. I feel really happy to see your webpage here and i spend a lot of time reading here.Same as your blog i found another one Oracle OSB.Actually I was looking for the same information on internet for Oracle WebCenter Sites and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for your creative ideas.

    ReplyDelete

  4. I feel really happy to see your webpage here and i spend a lot of time reading here.Same as your blog i found another one Oracle OSB.Actually I was looking for the same information on internet for Oracle WebCenter Sites and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for your creative ideas.

    ReplyDelete