Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3860

How to add SOAP message headers using Rebex custom WCF Binding

$
0
0

(Note, this was originally asked at comment)

We got an Requirement for OpenUI , that we need to add the Header with credential and session Tokens attribute as part of Request , and parse the Header also after response.

SOAP REQUEST:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" xmlns:fin="http://www.siebel.com/xml/FindLotInfo">
    <soapenv:Header>
      <UsernameToken xmlns="http://siebel.com/webservices">Username</UsernameToken>
      <PasswordText xmlns="http://siebel.com/webservices">Password</PasswordText>
      <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
   </soapenv:Header>
   <soapenv:Body>
      <cus:ATLFindLotInfoProcess_Input>
         <fin:FindLotInfo>
            <fin:findLotInfoReqData>
           ..................
         </fin:FindLotInfo>
      </cus:ATLFindLotInfoProcess_Input>
   </soapenv:Body>
</soapenv:Envelope>

SOAP RESPONSE:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <SOAP-ENV:Header>
      <siebel-header:SessionToken xmlns:siebel-header="http://siebel.com/webservices">y3dgzHgjMNDAroudyW3FdqDjRzjMJN.cHyU6rOlrsSVJvLrgcCEioOo29u502bo4HSnV3k9s4HhVNCuOP6oXaaUVSUbTaaxpVcNx2eks55Uvk0LCJzVvSBw5AkGUfs-b95OYNVHRGw7SGc49tOpjCRorlqabXXLmhqhnL1y8haqLLZDnZ5ORvQNWj8Q-p1oPG6LhYg1UQWeUf.-GwrR.WN7yLlr8v0kWjXTynLJao3ogQKJytT5ymzAnhJLIrYs8m18McEwFVv09i5K-B1-RvlXhq2t38g3vb3fbCmKyaFoJgy1jP0CcsA__</siebel-header:SessionToken>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns:ATLFindLotInfoProcess_Output xmlns:ns="http://siebel.com/CustomUI">
         <FindLotInfoResponse xmlns="http://www.siebel.com/xml/FindLotInfoResponse">
            <findLotInfoReplyData>
             .......................
         </FindLotInfoResponse>
      </ns:ATLFindLotInfoProcess_Output>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • as per above sample Request /Resonse(using soaUI Tool) - I need to add the Header along with Request Body and I need to Parse the Header in Reponse as well.

    Please guide me on this.

  • am using the wcfRequestChannels.cs file which I took from Rebex sample http projects

where we adding header as below

    string action = message.Headers.Action;

    request.Method = "POST";
    request.Headers.Add("SOAPAction", '"' + action + '"');
    request.Headers.Add("Content-Type", "text/xml; charset=utf-8");
  • I need to add further information on this.

Regards
Raj


Viewing all articles
Browse latest Browse all 3860

Trending Articles