Philo
Philo

Reputation: 1989

Viewing the HTTP Headers from a WCF service

I am following the following example for my first experience with WCF.

http://msdn.microsoft.com/en-us/library/bb386386.aspx

I follow the routine and these are the XML codes that I can find with the inbuilt WCF Test Client that comes with Visual Studio 2010.

Request :-

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IService1/GetData</Action>
  </s:Header>
  <s:Body>
    <GetData xmlns="http://tempuri.org/">
      <value>re</value>
    </GetData>
  </s:Body>

Response :-

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header />
  <s:Body>
    <GetDataResponse xmlns="http://tempuri.org/">
      <GetDataResult>You entered: re</GetDataResult>
    </GetDataResponse>
  </s:Body>
</s:Envelope>

I m trying to figure out where and how I can view the 200 OK http response message. It is probably happening somewhere in the background and I would like some help to figure out where to find it.

I have looked online and searched on google, still cant find it.

Upvotes: 2

Views: 4946

Answers (2)

Preston Guillot
Preston Guillot

Reputation: 6724

I often use Fiddler in conjunction with the aforementioned WCF Test Client to inspect HTTP traffic using the BasicHttpBinding with WCF.

Upvotes: 1

RASMiranda
RASMiranda

Reputation: 381

Here's something similar answered: https://stackoverflow.com/a/8318472/1384237

I prefer to use SoapUI, you can quickly view the raw content of the request and response, and achieve what you want.

Upvotes: 1

Related Questions