locked
Passing security credentials to PeopleSoft web service with custom SOAP header using C# RRS feed

  • Question

  • User-1267064689 posted

    I have looked all over the web and cannot find the solution to this.  I am developing an ASP.NET application (C#) that needs to consume a PeopleSoft web service.  It was working fine until they applied security to the service.  It's not a .NET service, so I cannot pass in credentials in the typical .NET way using System.Net.NetworkCredential.  The PS developers told me I have to pass the credentials in the SOAP header.  I see no specific way to do that anywhere.  Here's the snippet from the PeopleSoft WSDL:

    <wsdl:binding name="PROCESSREQUEST_Binding" type="tns:PROCESSREQUEST_PortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="PRCS_FINDREQUESTS">
      <soap:operation soapAction="PRQ_FINDREQUESTS.v1" style="document" />
    - <wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordRequired" xmlns:wsu="http://docs.oasis-    open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    - <wsp:ExactlyOne>
    - <wsp:All>
    - <wsse:SecurityToken wsp:Usage="wsp:Required" xmlns:wsse="http://docs.oasis-    open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:TokenType>wsse:UserNameToken</wsse:TokenType>
    - <Claims>
      <SubjectName MatchType="wsse:Exact" />
     <UsePassword wsp:Usage="wsp:Required" />
    </Claims>
    </wsse:SecurityToken>
    </wsp:All>
    </wsp:ExactlyOne>
    </wsp:Policy>

    I really don't want to resort to passing the full XML payload as an HTTP Request.  I already have everything else working in the normal manner by adding the web reference using the web service WSDL and coding against the proxy class VS2010 created for me.  But I see no way to pass data to the SOAP header of the target web service using this method.  Remember the target web service is NOT a .NET web service, so using System.Net.NetworkCredential is not applicable.  Any guidance is greatly appreciated...I'm stumped.

     

    Thanks

    Thursday, May 30, 2013 7:17 AM

Answers