Monday, 3 February 2014

Add Security Header

Namespace add :

xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

Variable Declaration :

    <variable name="securityContext" element="ns7:Security"/>
    <variable name="userNameToken" element="ns7:UsernameToken"/>
    <variable name="pswd" element="ns7:Password"/>

Assign Security Header :

    <assign name="Assign_WS_Header">
      <copy>
        <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/ProcessPayableInvoiceXXXXProvABCSImpl}ProcessPayableInvoiceXXXXProvABCSImpl','Routing.billformatter.pwd',false())"/>
        <to variable="pswd" query="/ns7:Password"/>
      </copy>
      <copy>
        <from expression="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Siebel/Industry/Comms/ProcessPayableInvoiceXXXXProvABCSImpl}ProcessPayableInvoiceXXXXProvABCSImpl','Routing.billformatter.username',false())"/>
        <to variable="userNameToken" query="/ns7:UsernameToken/ns7:Username"/>
      </copy>
      <bpelx:insertAfter>
        <bpelx:from variable="pswd" query="/ns7:Password"/>
        <bpelx:to variable="userNameToken"
        query="/ns7:UsernameToken/ns7:Username"/>
      </bpelx:insertAfter>
      <bpelx:append>
        <bpelx:from variable="userNameToken" query="/ns7:UsernameToken"/>
      <bpelx:to variable="securityContext" query="/ns7:Security"/>
      </bpelx:append>
    </assign>
</sequence>

Invocation :

<invoke name="Invoke_test" bpelx:invokeAsDetail="no"
                  inputVariable="Invoke_test_InputVariable"
                  outputVariable="Invoke_test_OutputVariable"
                  partnerLink="billformatter" portType="ns1:Billformatter"
                  bpelx:inputHeaderVariable="securityContext"
                  operation="resendBill"/>
          <assign name="Reply_ResendBillOutput">

No comments:

Post a Comment