0 votes
by (70.2k points)

(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

Applies to: Rebex HTTPS

2 Answers

0 votes
by (70.2k points)
 
Best answer

I have uploaded new version of RebexWcfBinding with support for custom SOAP headers.

It is available at here.

It introduces new WcfMessageObserver class, which can be used like this:

    var binding = new Rebex.Samples.WcfBinding();
    // configure RequestCreator if necessary
    // binding.RequestCreator.Settings...

    // create service
    var client = new DemoWebServiceSoapClient(binding,
        new EndpointAddress("http://test.rebex.net/demowebservice.asmx"));

    // attach observer for next service call(s)
    using (var observer = new Rebex.Samples.WcfMessageObserver(binding))
    {
        // add some custom headers to outgoing SOAP message(s)
        observer.OutgoingHeaders.Add(new Rebex.Samples.WcfMessageHeader("A", "NS", "Temp1"));
        observer.OutgoingHeaders.Add(new Rebex.Samples.WcfMessageHeader("B", "NS", "Temp2"));

        // call the service
        var response = client.HelloWorld();

        // read SOAP headers of the most recent response
        foreach (var h in observer.IncomingHeaders)
        {
            // h.Name, h.Value, ...
        }
    }

It is also possible to create own IWcfMessageObserver implementation and attach it to WcfBinding.MessageObservers manually.

0 votes
by (70.2k points)

The request.Headers.Add() method adds HTTP headers (not SOAP message headers).

To add SOAP message headers, just simply add them to message.Headers collection after line 'message.Headers.Clear();' like this:

message.Headers.Clear();
message.Headers.Add(MessageHeader.CreateHeader("UsernameToken", "http://siebel.com/webservices", "a user name"));
message.Headers.Add(MessageHeader.CreateHeader("PasswordText", "http://siebel.com/webservices", "a password"));
message.Headers.Add(MessageHeader.CreateHeader("SessionType", "http://siebel.com/webservices", "Stateless"));

To read them, just read from responseMessage.Headers collection.

by (110 points)
thanks Lukas,
 I tried  , since am using WINCE6  with .net3.5 CE  MessageHeader.CreateHeader method expecting 4 arguments - getting below error.

No overload for method 'CreateHeader' takes '3' arguments
- when I check
 public static MessageHeader CreateHeader(string name, string ns, object value, XmlObjectSerializer serializer);

 - we need to pass XmlObjectSerializer  as well .  -  can we get the type of serializer used in Rebex?
by (70.2k points)
edited by
Oh, I was testing it on desktop, so I didn't realize that .NET CF needs an XmlObjectSerializer.

You can use this:

    internal class MessageHeaderXmlSerializer : XmlObjectSerializer
    {
        private readonly WcfBinding binding;

        public MessageHeaderXmlSerializer(WcfBinding binding)
        {
            this.binding = binding;
        }

        public override bool IsStartObject(XmlDictionaryReader reader)
        {
            throw new NotImplementedException();
        }

        public override object ReadObject(XmlDictionaryReader reader, bool verifyObjectName)
        {
            throw new NotImplementedException();
        }

        public override void WriteEndObject(XmlDictionaryWriter writer)
        {
        }

        public override void WriteObjectContent(XmlDictionaryWriter writer, object graph)
        {
            writer.WriteString(graph.ToString());
        }

        public override void WriteStartObject(XmlDictionaryWriter writer, object graph)
        {
        }
    }


However, I am just working on new version, which will work with headers more easier.

I also realized that headers are not included in responseMessage. The new version will fix this.
by (110 points)
Thank you Lukas - we will wait for your udated build
by (70.2k points)
I am not sure, whether you noticed it. I have added new answer to this question. The updated build can be downloaded from https://www.rebex.net/getfile/b541b39f9c334407b148786cd6fbdbc4/RebexWcfBinding.zip
by (110 points)
thank you  Lukas ,   can I use existing .dll itself  for above changes?
by (70.2k points)
You probably mean existing Rebex HTTPS .dll - yes, you can use it.

The RebexWcfBindig sample code is almost unrelated to Rebex HTTPS .dll (if you replace HttpRequestCreator to your transport layer, it will be totally independent on Rebex classes).
by (110 points)
hi Lukas,
   We are using 4  different webservice for my backe end server with different URL.

- in this am creating the binding object for Rebexclient and filling details as below.

     var binding = new Rebex.Samples.WcfBinding();
                binding.RequestCreator.Register();
                binding.RequestCreator.Settings.SslAcceptAllCertificates = true;
                binding.RequestCreator.Settings.SslAllowedVersions = Rebex.Net.TlsVersion.TLS10;


--  PurchaseProductClient  is the object for one of the Webservices.

 PurchaseProductClient = new PurchaseProductSClient(binding, new EndpointAddress(strEndPointUri));

 - could you please any smaple code to add/do not add  the header for webservice as part of rebex client object itself.
by (70.2k points)
Hi RajaK. I am sorry, I don't understand well, what you need.

Basically, if you have parallel/concurrent environment (more than one service calls could be executed at the same time) create separate Rebex.Samples.WcfBinding instance for each service instance.

If you have non-concurrent environment (only one service call can be executed at a time = service calls are executed one after other) you don't need to add anything special.

In both cases just use the WcfMessageObserver as showed above in case you want to work with SOAP headers:

    using (var observer = new Rebex.Samples.WcfMessageObserver(binding))
    {
        // add custom header to outgoing SOAP message
        observer.OutgoingHeaders.Add(new WcfMessageHeader("Name", "NS", "Value"));

        // call the service
        var response = client.HelloWorld();
    }


I also suggest you to not call binding.RequestCreator.Register() - it is not necessary and  this will affect creation of all WebRequests (not only those in binding).

If you are creating more bindings, I suggest you to create one HttpRequestCreator, then assign it to all your bindings:
binding1.RequestCreator = mainCreator;
binding2.RequestCreator = mainCreator;
binding3.RequestCreator = mainCreator;
by (110 points)
Thank you Lukas, so the
var response = client.HelloWorld();

 - the response will hold the header for response and actual response data. ?
by (70.2k points)
No, the 'response' is return value of the service (e.g. string in case of "http://test.rebex.net/demowebservice.asmx")

The SOAP message is accessible through IWcfMessageObserver. Please, see sample code in my answer http://forum.rebex.net/8477/how-add-soap-message-headers-using-rebex-custom-wcf-binding?show=8487#a8487

The SOAP headers of the service resonse can be accessed by observer.IncomingHeaders.

You can modify WcfMessageObserver.cs file to catch the SOAP message as well.
by (110 points)
Hi Lukas,
Thanks for the Guidance.

1.after adding the header before calling the client  - I was getting the header as Empty. so I have added in wcfRequestCahnnel Iself as below

string action = message.Headers.Action;

            req.Method = "POST";
            req.Headers.Add("SOAPAction", '"' + action + '"');
            req.Headers.Add("Content-Type", "text/xml; charset=utf-8");

            message.Headers.Clear();
            message.Headers.Add(new WcfMessageHeader("UsernameToken", "http://siebel.com/webservices", "user"));
            message.Headers.Add(new WcfMessageHeader("PasswordText", "http://siebel.com/webservices", "password"));
            message.Headers.Add(new WcfMessageHeader("SessionType", "http://siebel.com/webservices ", "Stateless"));

Request:

2018-05-24 20:36:43 DEBUG FileLogWriter(1)[109314106] Info: Culture: en; windows-1252
2018-05-24 20:36:44 DEBUG (0)[109314106] SOAP Before Sending: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <UsernameToken xmlns="http://siebel.com/webservices">user</UsernameToken>
    <PasswordText xmlns="http://siebel.com/webservices">password</PasswordText>
    <SessionType xmlns="http://siebel.com/webservices ">Stateless</SessionType>
  </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <PurchaseProduct_Input xmlns="http://siebel.com/CustomUI">
      <PurchaseProduct xmlns="http://www.siebel.com/xml/PurchaseProduct">
        <purchaseProductData>
          <sessionData>
            <sessionId>14d59094-4f1a-4088-ba30-41f542e5ba05</sessionId>
            <equipmentId>50000002</equipmentId>
          </sessionData>
          <requestDate>05/24/2018</requestDate>
          <requestSource>PPS</requestSource>
          <fareMediaType>Verify Permit</fareMediaType>
          <fareMediaID>1-D4AHV</fareMediaID>
          <attrib01>5223110364650405</attrib01>
          <soldProductInfoList>
            <soldProductInfo>
              <cardName>5223110364650405</cardName>
            </soldProductInfo>
          </soldProductInfoList>
          <addtionalInfo>
            <lotID>1-2QWEMR</lotID>
            <spaceNo>1168726351</spaceNo>
            <duration>1</duration>
            <locationID>1-DN0L0</locationID>
          </addtionalInfo>
        </purchaseProductData>
      </PurchaseProduct>
    </PurchaseProduct_Input>
  </s:Body>
</s:Envelope>


response:
2018-05-24 20:37:03 VERBOSE HttpRequest(1)[109314106] HTTP: Received data:
 0000 |48-54-54-50-2F-31-2E-31 20-32-30-30-20-4F-4B-0D| HTTP/1.1 200 OK.
 0010 |0A-43-61-63-68-65-2D-43 6F-6E-74-72-6F-6C-3A-20| .Cache-Control:
 0020 |6E-6F-2D-63-61-63-68-65 2C-20-6D-75-73-74-2D-72| no-cache, must-r
 0030 |65-76-61-6C-69-64-61-74 65-2C-20-6D-61-78-2D-61| evalidate, max-a
 0040 |67-65-3D-30-0D-0A-50-72 61-67-6D-61-3A-20-6E-6F| ge=0..Pragma: no
 0050 |2D-63-61-63-68-65-0D-0A 54-72-61-6E-73-66-65-72| -cache..Transfer
 0060 |2D-45-6E-63-6F-64-69-6E 67-3A-20-43-68-75-6E-6B| -Encoding: Chunk
 0070 |65-64-0D-0A-43-6F-6E-74 65-6E-74-2D-54-79-70-65| ed..Content-Type
 0080 |3A-20-74-65-78-74-2F-78 6D-6C-3B-63-68-61-72-73| : text/xml;chars
 0090 |65-74-3D-55-54-46-2D-38 0D-0A-43-6F-6E-74-65-6E| et=UTF-8..Conten
 00A0 |74-2D-45-6E-63-6F-64-69 6E-67-3A-20-64-65-66-6C| t-Encoding: defl
 00B0 |61-74-65-0D-0A-45-54-61 67-3A-20-53-41-4D-45-4F| ate..ETag: SAMEO
 00C0 |52-49-47-49-4E-0D-0A-53 65-72-76-65-72-3A-20-4D| RIGIN..Server: M
 00D0 |69-63-72-6F-73-6F-66-74 2D-49-49-53-2F-37-2E-35| icrosoft-IIS/7.5
 00E0 |0D-0A-5F-63-68-61-72-73 65-74-3A-20-55-54-46-2D| .._charset: UTF-
 00F0 |38-0D-0A-58-2D-50-6F-77 65-72-65-64-2D-42-79-3A| 8..X-Powered-By:
 0100 |20-41-53-50-2E-4E-45-54 0D-0A-44-61-74-65-3A-20|  ASP.NET..Date:
 0110 |46-72-69-2C-20-32-35-20 4D-61-79-20-32-30-31-38| Fri, 25 May 2018
 0120 |20-30-30-3A-33-37-3A-30 33-20-47-4D-54-0D-0A-0D|  00:37:03 GMT...
 0130 |0A-31-39-36-0D-0A-84-93 DB-4E-E3-30-10-86-5F-C5| .196.....N.0.._.
 0140 |CA-7D-62-A7-24-52-A9-DC 20-16-8A-54-09-B6-15-5D| .}b.$R.. ..T...]
 0150 |56-7B-87-DC-78-42-2D-25 76-F0-81-D2-7D-7A-A6-25| V{..xB-%v...}z.%
 0160 |DB-A6-40-D9-5C-79-0E-DF EF-F1-6F-87-5F-BC-36-35| ..@.\y....o._.65
 0170 |79-01-EB-94-D1-E3-28-4D 58-44-40-97-46-2A-FD-34| y.....(MXD@.F*.4
 0180 |8E-1E-7E-DD-C4-C3-E8-A2 E0-8B-D9-E5-3C-9E-FC-FC| ..~.........<...
 0190 |3D-9A-E8-17-A8-4D-0B-04 31-ED-46-FF-F2-E3-68-E5| =....M..1.F...h.
 01A0 |7D-3B-A2-D4-95-2B-68-84 4B-B0-EC-8C-68-13-63-9F| };...+h.K...h.c.
 01B0 |E8-76-41-A1-03-69-D4-A1 AF-4E-ED-A9-F5-7A-9D-AC| .vA..i...N...z..
 01C0 |CF-76-CD-03-C6-52-FA-E7 EE-76-B1-13-8A-95-76-5E| .v...R...v....v^
 01D0 |E8-12-0E-94-FC-3F-15-F5 06-FE-61-E4-A6-E0-48-CE| .....?....a...H.
 01E0 |83-2D-57-C2-C1-DC-1A-19 4A-FF-38-0B-BE-0D-BE-93| .-W.....J.8.....
 01F0 |D5-EE-70-02-05-4B-A8-93 D2-34-F4-2A-38-6F-9A-87| ..p..K...4.*8o..
 0200 |29-EA-7D-A0-EF-C1-B5-46 BB-CE-86-A3-89-7A-3C-16| ).}....F.....z<.
 0210 |E9-09-10-25-2D-B4-F5-E6 5A-78-51-70-07-6E-EB-FF| ...%-...ZxQp.n..
 0220 |51-30-95-45-9A-C9-FC-9C 9D-67-71-56-A5-22-CE-D8| Q0.E.....gqV."..
 0230 |70-18-2F-C5-19-8B-B3-B4 CA-B3-01-E4-4B-C1-72-4E| p./.........K.rN
 0240 |0F-FD-1C-9E-83-6A-1B-D0 1E-83-9C-ED-BE-01-A7-FD| .....j..........
 0250 |EC-BE-FD-7D-2F-DB-8D-83 11-14-2C-A7-83-0C-AD-4C| ...}/.....,....L
 0260 |87-9C-1E-15-38-DE-81-0F EE-CA-48-6C-42-A7-51-E4| ....8.....HlB.Q.
 0270 |90-E0-60-AD-B1-53-5D-99 62-66-25-58-52-5A-10-1E| ..`..S].bf%XRZ..
 0280 |77-20-95-50-35-48-22-03 10-6F-C8-62-E3-3C-34-64| w .P5H"..o.b.<4d
 0290 |B2-ED-4E-70-A8-3D-C5-6B E5-FC-AC-9A-8B-CD-76-C6| ..Np.=.k......v.
 02A0 |CB-E0-57-C6-AA-BF-3B-89 82-8B-7E-E8-AF-A1-C2-13| ..W...;...~.....
 02B0 |7C-95-FB-4E-83-F6-9C-3E 75-1F-58-39-F9-46-B0-F6| |..N...>u.X9.F..
 02C0 |E1-39-D1-4F-FF-43-F1-06 00-00-FF-FF-0D-0A-30-0D| .9.O.C........0.
 02D0 |0A-0D-0A                                       | ...
2018-05-24 20:37:03 INFO HttpRequest(1)[109314106] HTTP: Received response: 200 OK.
2018-05-24 20:37:03 DEBUG HttpRequest(1)[109314106] HTTP: Received 10 headers.
2018-05-24 20:37:03 DEBUG HttpRequest(1)[109314106] HTTP: Response Content-Length not specified.
2018-05-24 20:37:03 DEBUG HttpRequest(1)[109314106] HTTP: Response Transfer-Encoding: Chunked.
2018-05-24 20:37:03 INFO HttpRequest(1)[109314106] HTTP: ZLIB header check failed. Using DEFLATE fallback.
2018-05-24 20:37:03 DEBUG HttpRequest(1)[109314106] HTTP: Closing HTTP session (1).


- am getting the below exception

May 24,2018 20:37:04,000 FATAL PaymentHandler]:  FATAL :
System.Net.WebException: More compressed data expected. ---> System.Net.WebException: More compressed data expected. ---> tlfk: More compressed data expected.
   at tlfn.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding)
   at System.Xml.XmlTextReaderImpl.InitStreamInput(Stream stream, Encoding encoding)
   at System.Xml.XmlTextReaderImpl..ctor(String url, Stream input, XmlNameTable nt)
   at System.Xml.XmlTextReaderImpl..ctor(Stream input, XmlNameTable nt)
   at System.Xml.XmlTextReader..ctor(Stream input, XmlNameTable nt)
   at System.Xml.XmlDocument.Load(Stream inStream)

 - I have reported the same kind issue before and you have some hotfix, am using the same version only
by (110 points)
with continuing to above request :


and also my Server expecting the tag as

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" xmlns:pur="http://www.siebel.com/xml/PurchaseProduct">
      <soapenv:Header>
      <UsernameToken xmlns="http://siebel.com/webservices">user</UsernameToken>
      <PasswordText xmlns="http://siebel.com/webservices">passwor</PasswordText>
      <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
   </soapenv:Header>
   <soapenv:Body>
      <cus:PurchasePermit_Input>
         <pur:PurchaseProduct>
            <pur:purchaseProductData>
               <pur:sessionData>
                  <!--Optional:-->
                  <pur:sessionId>001</pur:sessionId>
                  <!--Optional:-->
                  <pur:equipmentId>50000006</pur:equipmentId>
               </pur:sessionData>
               <!--Optional:-->
               <pur:requestDate>05/24/2018</pur:requestDate>
               <!--Optional:-->

 - Pleasee help to resolve to  - frame the Tag name as well
by (70.2k points)
The problem was solved in the latest version (2018 R1.1). Please check, whether you are using this version (it should be in produced log).

According to Tag. I don't see any tag in your sample request. Please, clarify what Tag you mean?
by (110 points)
We purchased  : Rebex Total Pack 2018 R1  , with serial number  : SERIAL NUMBER: 6RV0-LY04-LKU5-XKLS
Rebex.Http.dl  Version  : 1.0.6666.0

the Header am Talking about:
  - IF possible please include this hot fix in above version

Expected : <soapenv:Header>
Rebex sending  :  <s:Header>
by (110 points)
Hi Lukas,
  I have used : RebexTotalPack-2018R1.1 Trail version , with this I able to receive the response,
  But am not getting the Header as part of Response , when in Log:
 WcfMessage responseMessage;
            try
            {
                using (var responseStream = req.GetResponse().GetResponseStream())
                {
                    responseMessage = new WcfMessage(_binding.MessageVersion, responseStream);

                    logger.Write(LogLevel.Debug, null, 0, "SOAP Response Header", responseMessage.ToString());

- the response message as  :  below (i.e) response message body only.

  2018-05-25 18:30:32 DEBUG (0)[127139902] SOAP Response Header: <ns:PurchasePermit_Output xmlns:ns="http://siebel.com/CustomUI"><PurchaseProductResponse xmlns="http://www.siebel.com/xml/PurchaseProductResponse"><replyData><sessionData><sessionId>018f3405-5438-43c7-b8ce-cbe825bec2b5</sessionId><equipmentId>50000002</equipmentId></sessionData><responseDate>05/25/2018</responseDate><statusCode>0300</statusCode><errorInfo>Patron doesn’t have permit.</errorInfo></replyData></PurchaseProductResponse></ns:PurchasePermit_Output>

 - Please check on this whether we need to add this header in Response message received in Rebex.http.dll?
  and also please include this fixes in our Licensed version of  - RebexTotalPack-2018R1
by (70.2k points)
- You can download full 2018 R1.1 version from https://www.rebex.net/protected
- To access headers, don't use WcfMessage.ToString(), but use WcfMessage.Headers

Please use the latest WcfBinding code which is available at https://www.rebex.net/getfile/b541b39f9c334407b148786cd6fbdbc4/RebexWcfBinding.zip

Also please check my answer at http://forum.rebex.net/8477/how-add-soap-message-headers-using-rebex-custom-wcf-binding?show=8487#a8487
It describes better way to work with SOAP headers.
by (110 points)
Hi Lukas,
  Seems the Response is not holding the Header. its showing empty only


2018-05-29 11:54:14 VERBOSE HttpRequest(1)[125435966] HTTP: Received data:
 0000 |48-54-54-50-2F-31-2E-31 20-32-30-30-20-4F-4B-0D| HTTP/1.1 200 OK.
 0010 |0A-43-61-63-68-65-2D-43 6F-6E-74-72-6F-6C-3A-20| .Cache-Control:
 0020 |6E-6F-2D-63-61-63-68-65 2C-20-6D-75-73-74-2D-72| no-cache, must-r
 0030 |65-76-61-6C-69-64-61-74 65-2C-20-6D-61-78-2D-61| evalidate, max-a
 0040 |67-65-3D-30-0D-0A-50-72 61-67-6D-61-3A-20-6E-6F| ge=0..Pragma: no
 0050 |2D-63-61-63-68-65-0D-0A 54-72-61-6E-73-66-65-72| -cache..Transfer
 0060 |2D-45-6E-63-6F-64-69-6E 67-3A-20-43-68-75-6E-6B| -Encoding: Chunk
 0070 |65-64-0D-0A-43-6F-6E-74 65-6E-74-2D-54-79-70-65| ed..Content-Type
 0080 |3A-20-74-65-78-74-2F-78 6D-6C-3B-63-68-61-72-73| : text/xml;chars
 0090 |65-74-3D-55-54-46-2D-38 0D-0A-43-6F-6E-74-65-6E| et=UTF-8..Conten
 00A0 |74-2D-45-6E-63-6F-64-69 6E-67-3A-20-64-65-66-6C| t-Encoding: defl
 00B0 |61-74-65-0D-0A-45-54-61 67-3A-20-53-41-4D-45-4F| ate..ETag: SAMEO
 00C0 |52-49-47-49-4E-0D-0A-53 65-72-76-65-72-3A-20-4D| RIGIN..Server: M
 00D0 |69-63-72-6F-73-6F-66-74 2D-49-49-53-2F-37-2E-35| icrosoft-IIS/7.5
 00E0 |0D-0A-5F-63-68-61-72-73 65-74-3A-20-55-54-46-2D| .._charset: UTF-
 00F0 |38-0D-0A-58-2D-50-6F-77 65-72-65-64-2D-42-79-3A| 8..X-Powered-By:
 0100 |20-41-53-50-2E-4E-45-54 0D-0A-44-61-74-65-3A-20|  ASP.NET..Date:
 0110 |54-75-65-2C-20-32-39-20 4D-61-79-20-32-30-31-38| Tue, 29 May 2018
 0120 |20-31-35-3A-35-34-3A-31 34-20-47-4D-54-0D-0A-0D|  15:54:14 GMT...
 0130 |0A-31-37-33-0D-0A-84-52 C9-4E-C3-30-10-FD-95-28| .173...R.N.0...(
 0140 |F7-C4-4E-F7-54-6E-2A-28 45-AA-C4-52-51-8A-B8-21| ..N.Tn*(E..RQ..!
 0150 |13-4F-9A-48-8D-6D-6C-A7 CB-8D-DF-E0-F7-F8-12-DC| .O.H.ml.........
 0160 |10-92-16-54-E1-53-66-DE 92-F1-1B-93-F1-2E-5F-3B| ...T.Sf......._;
 0170 |1B-50-3A-13-7C-E4-06-3E 76-1D-E0-B1-60-19-5F-8D| .P:.|..>v...`._.
 0180 |DC-E5-E3-B5-37-70-C7-11 59-DC-5F-CC-BD-E9-DD-D3| ....7p..Y._.....
 0190 |70-CA-37-B0-16-12-1C-2B E3-7A-F8-D3-1F-B9-A9-31| p.7....+.z.....1
 01A0 |72-88-90-8E-53-C8-A9-F6 2D-AC-05-95-BE-50-2B-74| r...S...-....P+t
 01B0 |F8-40-50-09-91-5B-49-77 3A-AB-55-DB-ED-D6-DF-B6| .@P..[Iw:.U.....
 01C0 |4B-72-0B-E3-00-3D-DF-DE 2C-4A-23-2F-E3-DA-50-1E| Kr...=..,J#/..P.
 01D0 |43-A3-62-FF-AB-DC-A3-81 2F-05-DB-47-C4-2A-E7-85| C.b...../..G.*..
 01E0 |8A-53-AA-61-0E-2A-CF-CC CB-7D-61-64-61-2A-57-AE| .S.a.*...}ada*W.
 01F0 |9B-0B-64-F0-0A-6B-3F-16 39-9A-14-DA-88-7C-39-B3| ..d..k?.9....|9.
 0200 |76-B5-58-09-56-C4-E6-01 B4-14-5C-57-29-9C-0C-74| v.X.V.....\W)..t
 0210 |A4-B7-20-3A-23-B4-96-0A E4-7A-7F-45-0D-8D-88-06| .. :#....z.E....
 0220 |7D-88-FF-A4-98-B1-A8-DF 63-FD-18-87-CC-63-90-24| }.......c....c.$
 0230 |5E-87-D1-C0-0B-83-56-C7 0B-13-86-29-ED-05-0C-27| ^.....V....)...'
 0240 |8C-A0-86-4F-E0-AD-C8-64 0E-DC-D8-A2-8B-CB-D3-22| ...O...d......."
 0250 |E8-B8-5B-D3-BF-FF-A5-AA 71-6C-05-11-EE-A2-56-68| ..[.....ql....Vh
 0260 |93-0C-06-04-9D-00-C4-AE C0-14-7A-22-98-25-B5-31| ..........z".%.1
 0270 |B6-26-4D-83-80-52-42-CD 78-22-A2-39-35-4A-70-87| .&M..RB.x".95Jp.
 0280 |09-D0-FC-F3-FD-C3-38-29 DD-80-23-CB-BC-7D-3B-47| ......8)..#..};G
 0290 |4D-3C-F8-D7-97-3F-17-91 45-CE-6D-CD-42-BF-F6-8B| M<...?..E.m.B...
 02A0 |FE-3C-D0-E8-0B-00-00-FF FF-0D-0A-30-0D-0A-0D-0A| .<.........0....
2018-05-29 11:54:14 INFO HttpRequest(1)[125435966] HTTP: Received response: 200 OK.
2018-05-29 11:54:14 DEBUG HttpRequest(1)[125435966] HTTP: Received 10 headers.
2018-05-29 11:54:14 DEBUG HttpRequest(1)[125435966] HTTP: Response Content-Length not specified.
2018-05-29 11:54:14 DEBUG HttpRequest(1)[125435966] HTTP: Response Connection not specified; using 'keep-alive'.
2018-05-29 11:54:14 DEBUG HttpRequest(1)[125435966] HTTP: Response Transfer-Encoding: Chunked.
2018-05-29 11:54:15 INFO HttpRequest(1)[125435966] HTTP: ZLIB header check failed. Using DEFLATE fallback.
2018-05-29 11:54:15 INFO HttpRequest(1)[125435966] HTTP: Compressed data not finished with final block, but no more data received. Supposing this to be complete response.
2018-05-29 11:54:15 DEBUG HttpRequest(1)[125435966] HTTP: Received content (371 raw bytes, 730 decompressed bytes).
2018-05-29 11:54:15 DEBUG HttpRequestCreator(1)[125435966] HTTP: Cached HTTP session (1).
2018-05-29 11:54:15 DEBUG HttpRequestCreator(1)[125435966] HTTP: Clearing of HTTP session cache scheduled (50000 ms).
2018-05-29 11:54:15 DEBUG (0)[125435966] SOAP Response Header: System.ServiceModel.Channels.MessageHeaders
2018-05-29 11:54:15 DEBUG (0)[125435966] SOAP: <ns:PurchasePermit_Output xmlns:ns="http://siebel.com/CustomUI"><PurchaseProductResponse xmlns="http://www.siebel.com/xml/PurchaseProductResponse"><replyData><sessionData><sessionId>76d7c09d-deff-4da1-9124-9fd0aa61d0fd</sessionId><equipmentId>50000002</equipmentId></sessionData><responseDate>05/29/2018</responseDate><statusCode>0300</statusCode><errorInfo>Patron doesn’t have permit.</errorInfo></replyData></PurchaseProductResponse></ns:PurchasePermit_Output>
by (110 points)
with Follow up with above message ,
 If I print Header as below


                    if (_binding.MessageObservers.Count > 0)
                    {
                        var headers = WcfMessageHeader.FromMessageHeaders(responseMessage.Headers);

                        logger.Write(LogLevel.Debug, null, 0, "SOAP Response Header", headers.ToString());

                        foreach (var observer in _binding.MessageObservers)
                        {
                            observer.AfterReceivedMessage(responseMessage, headers);
                        }
                    }       

 - the output as  -

 19:00:33 DEBUG (0)[107151426] SOAP Response Header: System.Collections.Generic.List`1[[Rebex.Samples.WcfMessageHeader, PPSCommunications, Version=1.0.6723.32280, Culture=neutral, PublicKeyToken=null]]
The Response which I received  from Server is:
2018-05-29 19:00:32 VERBOSE HttpRequest(1)[107151426] HTTP: Received data:
 0000 |48-54-54-50-2F-31-2E-31 20-32-30-30-20-4F-4B-0D| HTTP/1.1 200 OK.
 0010 |0A-43-61-63-68-65-2D-43 6F-6E-74-72-6F-6C-3A-20| .Cache-Control:
 0020 |6E-6F-2D-63-61-63-68-65 2C-20-6D-75-73-74-2D-72| no-cache, must-r
 0030 |65-76-61-6C-69-64-61-74 65-2C-20-6D-61-78-2D-61| evalidate, max-a
 0040 |67-65-3D-30-0D-0A-50-72 61-67-6D-61-3A-20-6E-6F| ge=0..Pragma: no
 0050 |2D-63-61-63-68-65-0D-0A 54-72-61-6E-73-66-65-72| -cache..Transfer
 0060 |2D-45-6E-63-6F-64-69-6E 67-3A-20-43-68-75-6E-6B| -Encoding: Chunk
 0070 |65-64-0D-0A-43-6F-6E-74 65-6E-74-2D-54-79-70-65| ed..Content-Type
 0080 |3A-20-74-65-78-74-2F-78 6D-6C-3B-63-68-61-72-73| : text/xml;chars
 0090 |65-74-3D-55-54-46-2D-38 0D-0A-43-6F-6E-74-65-6E| et=UTF-8..Conten
 00A0 |74-2D-45-6E-63-6F-64-69 6E-67-3A-20-64-65-66-6C| t-Encoding: defl
 00B0 |61-74-65-0D-0A-45-54-61 67-3A-20-53-41-4D-45-4F| ate..ETag: SAMEO
 00C0 |52-49-47-49-4E-0D-0A-53 65-72-76-65-72-3A-20-4D| RIGIN..Server: M
 00D0 |69-63-72-6F-73-6F-66-74 2D-49-49-53-2F-37-2E-35| icrosoft-IIS/7.5
 00E0 |0D-0A-5F-63-68-61-72-73 65-74-3A-20-55-54-46-2D| .._charset: UTF-
 00F0 |38-0D-0A-58-2D-50-6F-77 65-72-65-64-2D-42-79-3A| 8..X-Powered-By:
 0100 |20-41-53-50-2E-4E-45-54 0D-0A-44-61-74-65-3A-20|  ASP.NET..Date:
 0110 |54-75-65-2C-20-32-39-20 4D-61-79-20-32-30-31-38| Tue, 29 May 2018
 0120 |20-32-33-3A-30-30-3A-33 33-20-47-4D-54-0D-0A-0D|  23:00:33 GMT...
 0130 |0A-65-38-0D-0A-84-91-D1 4A-C3-30-14-86-5F-A5-E4| .e8.....J.0.._..
 0140 |BE-49-A7-37-52-DA-0E-95 09-82-BA-E2-9C-EC-4E-6A| .I.7R.........Nj
 0150 |7A-58-03-4D-4E-C8-49-D6 F9-F6-C6-51-B7-A9-14-EF| zX.MN.I....Q....
 0160 |42-BE-7C-3F-FF-39-29-E6 7B-DD-27-3B-70-A4-D0-94| B.|?.9).{.';p...
 0170 |6C-C6-33-96-80-91-D8-2A B3-2D-D9-FA-E5-2E-BD-62| l.3....*.-.....b
 0180 |F3-AA-58-2D-AF-EB-74-F1 F4-9A-2F-CC-0E-7A-B4-90| ..X-..t.../..z..
 0190 |44-CD-50-FE-7D-5F-B2-CE 7B-9B-0B-41-B2-03-DD-10| D.P.}_..{..A....
 01A0 |8F-98-B0-B1-1C-DD-56-7C 1D-04-8C-A2-60-A3-BA-27| ......V|....`..'
 01B0 |75-B4-86-61-E0-C3-E5-E1 F1-45-96-CD-C4-E6-F1-61| u..a.....E.....a
 01C0 |75-08-4A-95-21-DF-18-09 27-AB-FD-DF-62-67-85-6F| u.J.!...'...bg.o
 01D0 |B0-FD-A8-8A-68-D6-C1-C9 AE-21-A8-C1-69-E5-DF-96| ....h....!..i...
 01E0 |C1-DB-E0-C7-54-43-A7-01 14-BC-43-CF-25-6A-71-1B| ....TC....C.%jq.
 01F0 |C8-A3-5E-DF-C7-B8-A3-EC B0-0D-D2-3F-03-59-34-34| ..^........?.Y44
 0200 |6E-E1-47-A1-33-3F-42-31 21-C6-C8-29-14-C9-54-DB| n.G.3?B1!..)..T.
 0210 |88-7E-CD-25-FE-7C-4C-F5 09-00-00-FF-FF-0D-0A-30| .~.%.|L........0
 0220 |0D-0A-0D-0A                                    | ....
2018-05-29 19:00:32 INFO HttpRequest(1)[107151426] HTTP: Received response: 200 OK.
2018-05-29 19:00:32 DEBUG HttpRequest(1)[107151426] HTTP: Received 10 headers.
2018-05-29 19:00:32 DEBUG HttpRequest(1)[107151426] HTTP: Response Content-Length not specified.
2018-05-29 19:00:32 DEBUG HttpRequest(1)[107151426] HTTP: Response Connection not specified; using 'keep-alive'.
2018-05-29 19:00:32 DEBUG HttpRequest(1)[107151426] HTTP: Response Transfer-Encoding: Chunked.
2018-05-29 19:00:33 INFO HttpRequest(1)[107151426] HTTP: ZLIB header check failed. Using DEFLATE fallback.
2018-05-29 19:00:33 INFO HttpRequest(1)[107151426] HTTP: Compressed data not finished with final block, but no more data received. Supposing this to be complete response.
2018-05-29 19:00:33 DEBUG HttpRequest(1)[107151426] HTTP: Received content (232 raw bytes, 466 decompressed bytes).
2018-05-29 19:00:33 DEBUG HttpRequestCreator(1)[107151426] HTTP: Cached HTTP session (1).
2018-05-29 19:00:33 DEBUG HttpRequestCreator(1)[107151426] HTTP: Clearing of HTTP session cache scheduled (50000 ms
by (70.2k points)
Please note that headers.ToString() won't work, because it is IList.

To display headers, iterate through the collection using foreach or for loops.
by (110 points)
Hi Lukas,
 - I have tried below options also  - its not entering in to loop and nothing is printing

foreach (var h in observer.IncomingHeaders)
                {
                    _logger.Debug("Header Name:" + h.Name);
                    _logger.Debug("Header Value:" + h.Value);

                }
by (70.2k points)
I have looked into your response, and it doesn't contain any SOAP headers. This is the server response:

<?xml version="1.0" encoding="UTF-8"?>
<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:Body>
        <ns:PurchasePermit_Output xmlns:ns="http://siebel.com/CustomUI">
            <PurchaseProductResponse xmlns="http://www.siebel.com/xml/PurchaseProductResponse">
                <replyData>
                    <sessionData>
                        <sessionId>76d7c09d-deff-4da1-9124-9fd0aa61d0fd</sessionId>
                        <equipmentId>50000002</equipmentId>
                    </sessionData>
                    <responseDate>05/29/2018</responseDate>
                    <statusCode>0300</statusCode>
                    <errorInfo>Patron doesn’t have permit.</errorInfo>
                </replyData>
            </PurchaseProductResponse>
        </ns:PurchasePermit_Output>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
by (110 points)
I have checked with Server Team,
 they are saying like the response has header as below  - I check in SAOPUI tool as well.

<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">vGFqpqM.4Jis.EeT.aZJzoNyAyXRXb0AP.3aXIEc6TzAdWo9yOO6C1KL2u4vVr7iYUH9g6gLJMIh2-rhls460nWh26YQy1iPC7yEXaoUS0OwG5yPY9NBG-rrGopq0EmS0lLdq5ua8eRjjISbQ8I4K5te9uB--s5er9qjPTXOToYo3USB83ouIBukW7CuTbUbSwtqXcpnToNdA290neeyTtNgd3NqADXqSHZJSrhC78Cx1SUQK5wOYXahSQpTduSbnB8HRx9bOW7NC-r-pbZo2ohulh7Enty5Jy7Db1X-p59oMjLQWO9JiQ__</siebel-header:SessionToken>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns:PurchasePermit_Output xmlns:ns="http://siebel.com/CustomUI">
         <PurchaseProductResponse xmlns="http://www.siebel.com/xml/PurchaseProductResponse"/>
      </ns:PurchasePermit_Output>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
by (70.2k points)
If you want to see actual SOAP response, set breakpoint into WcfMessage, on line xml.Load(contentStream);

After xml.Load() is executed you can check xml.InnerXml to see actual SOAP response.
by (110 points)
H Lukas,
I checked in SOAP UI with request what Rebex sending there also - Header  in Response is missed.
Further discussion with Server Team . they using some custom Namespace in Request Header as below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" xmlns:pur="http://www.siebel.com/xml/PurchaseProduct">
   <soapenv:Header>
      <UsernameToken xmlns="http://siebel.com/webservices">xxx</UsernameToken>
      <PasswordText xmlns="http://siebel.com/webservices">xxx</PasswordText>
      <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
   </soapenv:Header>

 - in Envelop line.
But our Rebex client sending

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <UsernameToken xmlns="http://siebel.com/webservices">xxx</UsernameToken>
    <PasswordText xmlns="http://siebel.com/webservices">xxx</PasswordText>
    <SessionType xmlns="http://siebel.com/webservices ">Stateless</SessionType>
  </s:Header>

 - this only difference am seeing  -
by (70.2k points)
The namespace naming has no functional effect. It can be 's' or 'soapenv' or 'WhateverYouWant'.

If you don't like it, you can create your own System.ServiceModel.Channels.MessageEncoder implementation.
by (110 points)
Hi Lukas,
 We are working on this. we got an another clarification also on  - using Hostname for  https mode
 - the

</s:Envelope>
2018-06-11 20:10:07 DEBUG HttpRequest(1)[112918690] HTTP: Using new HTTP session (1).
2018-06-11 20:10:07 INFO HttpRequest(1)[112918690] HTTP: Connecting to 'https://ttopweb1qa:443'...
2018-06-11 20:10:07 DEBUG HttpRequest(1)[112918690] Info: Assembly: Rebex.Common 2018 R1.1 for .NET Compact Framework 3.5
2018-06-11 20:10:07 DEBUG HttpRequest(1)[112918690] Info: Platform: Windows CE 6.0.0 32-bit; CLR: 3.5.10010.0
2018-06-11 20:10:07 DEBUG HttpRequest(1)[112918690] Info: Culture: en; windows-1252
2018-06-11 20:10:07 DEBUG HttpRequest(1)[112918690] Proxy: Resolving 'ttopweb1qa'.

  - with the above Line  - My application getting  exception on Crash.
 -Please let me know - whether  the host name  is resolved in Rebex level?
 - I have entrolled the host name detail WINCE device as per below suggestion

https://support.microsoft.com/en-us/help/199370/how-to-load-host-entries-into-windows-ce-device
by (70.2k points)
Since the comment is not related to the original question. I have created new question here: http://forum.rebex.net/8598/unable-to-resolve-hostname-on-wince

You will find my answer there.
by (110 points)
hi Lukas,
 I was trying to create    - System.ServiceModel.Channels.MessageEncoder implementation.
to contruct the message header as below, seems the WcfchannelFactory.cs already referring the default  - encoder.
request you to kindly help to create as below and parse the response

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" xmlns:pur="http://www.siebel.com/xml/PurchaseProduct">
   <soapenv:Header>
      <UsernameToken xmlns="http://siebel.com/webservices">eaiuser</UsernameToken>
      <PasswordText xmlns="http://siebel.com/webservices">Ea!us3r456</PasswordText>
      <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
   </soapenv:Header>
   <soapenv:Body>
......    
   </soapenv:Body>
</soapenv:Envelope>

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">7HM14u8cg-xBqeYWuPQU9uc2eo9Su8EEzueu-WwsgEltfj89QBBQQ2I9S5Dp.dJmSxPs7uXjTwWoQKPgN-s1ChDFnMuTrL7lhuUnIT4UHDFuFuPgPrL.jCbSIpiMWWCH2v8uRHYlGJNmKF0290Y3ssZvnxlaR4ZgSCS7GC0JZR7s.VDo74MH1O-IMheWYvLJhgyh7PjUZxRTSkQpafSfmKyZLSnEa2Vz5AZ47g2ikOtoGwmMCBj4nV4H2ijzRNQ2KBGXJsxqueHn5Y3pffgym0wObelUly.rVVsfQdwaSuYDEMbleN2i0w__</siebel-header:SessionToken>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns:PurchasePermit_Output xmlns:ns="http://siebel.com/CustomUI">
         <PurchaseProductResponse xmlns="http://www.siebel.com/xml/PurchaseProductResponse">
            <replyData>
               <sessionData>
                  <sessionId>rrr5555</sessionId>
                  <equipmentId/>
               </sessionData>
               <responseDate>06/18/2018</responseDate>
               <statusCode>0300</statusCode>
               <errorInfo>Patron doesn’t have permit.</errorInfo>
               <listOfPaymentAuthorization>
                  <authorizationtDef>
                     <bankAuthorizationCode/>
                     <requestAmount/>
                     <name/>
                     <attrib01/>
                     <attrib02/>
                     <attrib04/>
                  </authorizationtDef>
               </listOfPaymentAuthorization>
            </replyData>
         </PurchaseProductResponse>
      </ns:PurchasePermit_Output>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
by (70.2k points)
I have already written that namespace has no functional effect for SOAP capabilities.

If your server requires <soapenv:Envelope ...> instead of <soap:Envelope ...> its the imperfection of the server not the client.

I am sorry, but this request is out of Rebex support. We will not implement this.

If you have problems to implement own MessageEncoder, you can try to rewrite the produced XML. In WcfRequestChannel locate _encoder.WriteMessage call and use your stream instead HTTP request stream. Then modify your stream as you want. Finally copy your stream into HTTP request stream.

The code skeleton looks like this:

            _encoder.WriteMessage(message, yourStream);

            // modify yourStream as you want
            // e.g. read XmlDocument from yourStream and perform namespace changes
            // save modified XmlDocument into modifiedStream

            using (var requestStream = request.GetRequestStream())
            {
                // copy modifiedStream into requestStream
            }
by (110 points)
edited by
Thank You Lukas, I will ask server team to look in this  - I mean while I will check to implement the device.
by (110 points)
edited by
Thank You Lukas, I will ask server team to look in this  - I mean while I will check to implement the device.
by (110 points)
http://forum.rebex.net/message/Lukas+Matyska
This is follow up - above discussion.
Hi Lukas,
  I have checked in other components
  we are not calling  -  Register() method for system binding  - we will comment the Rebex wcf and collect the logs.
by (70.2k points)
I was not talking about Register() method for system binding, I was talking about Register() method for Rebex binding. Very probably: Rebex.Samples.WcfBinding.RequestCreator.Register()

Just look in your whole solution for "Register" method, and if it is called on instance of Rebex.Net.HttpRequestCreator comment it out .
by (110 points)
Hi Lukas,
  Thanks for the suggestion - I have commented the Register method while creating the Binding for Rebex.
After This also
1.Call  Rebex Call -   No issue
2.Call System Http  binding call  - Get Webrequest
   - I will convert all system http bingding call to Rebex and try out an update the status. Please let me know  even without header also will also we need to call rebex under observer - my understanding is correct?

using (var observer = new Rebex.Samples.WcfMessageObserver(binding))
                {
client call....


}
by (70.2k points)
If you don't need to access headers, you don't need to use observer at all.
...