Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

To access Oracle web service with wsse: header

I had the issue where I need to access the oracle service from my console application.where wsse Header goes as wrapper around a Http request.So for that I modified my app.config file for building my wsse header in the endpoint request

Ex:

<endpoint address="http://ltc5finapp06.intlab.us.ceridian.hrs:8012/webservices/SOAProvider/plsql/xxpjtito01_procsorderapi_pkg/"
       binding="basicHttpBinding" bindingConfiguration="XXPJTITO01_PROCSORDERAPI_PKG_Binding"
       contract="OracleService.XXPJTITO01_PROCSORDERAPI_PKG_PortType"
       name="XXPJTITO01_PROCSORDERAPI_PKG_Port" >
       <headers>
         <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
           <wsse:UsernameToken>
             <wsse:Username>biztalk</wsse:Username>
             <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">b1ztalk</wsse:Password>
           </wsse:UsernameToken>
         </wsse:Security>
       </headers>
     </endpoint>

This helps me to get the response back from oracle.

Now if you want to use this in biztalk make sure to wrap this header information in wcf custome header.

I first build the header

xmldoc.LoadXml(""+"<wsse:Security mustUnderstand='1' xmlns:wsse=\'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\'>" +
          " <wsse:UsernameToken>" +
             "<wsse:Username>biztalk</wsse:Username>" +
             "<wsse:Password Type=\'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\'>b1ztalk</wsse:Password>" +
           "</wsse:UsernameToken>" +
           "</wsse:Security> " +"");
SOADoc.LoadXml("" + "<ns0:SOAHeader xmlns:ns0=\"http://xmlns.oracle.com/apps/ont/soaprovider/plsql/xxpjtito01_procsorderapi_pkg/\"><ns0:Responsibility>ORDER_MGMT_SUPER_USER</ns0:Responsibility><ns0:RespApplication>ONT</ns0:RespApplication><ns0:SecurityGroup>STANDARD</ns0:SecurityGroup><ns0:NLSLanguage>american</ns0:NLSLanguage><ns0:Org_Id>82</ns0:Org_Id></ns0:SOAHeader>" + "");

Then invoke that in wcf custom header

InboundRequest(WCF.OutboundCustomHeaders)="<headers>"+xmldoc.OuterXml+ SOADoc.OuterXml + "</headers>";

Hope this will help those who have the similar problem

Thanks

Sam



This post first appeared on Technology Zone, please read the originial post: here

Share the post

To access Oracle web service with wsse: header

×

Subscribe to Technology Zone

Get updates delivered right to your inbox!

Thank you for your subscription

×