Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I capture a raw SOAP request for WCF web service

Tags:

soap

wcf

fiddler

I've seen several questions about this already but none of the explicitly walkthrough how to capture a SOAP request to a WCF web service. They just say "go install Fiddler2". All I can get out of fiddler is normal HTTP request but I can never get the raw SOAP request for some reason Can anyone direct me to a tutorial that walks through this specific scenario?

.NET web application calls basicHTTP endpoint on WCF Web Service. I need to capture the raw SOAP request. I'm looking for a complete walkthrough because I'm not grokking this concept for some reason.

UPDATE

Here's what I get from Fiddler's raw view:

POST http://vm05/PNSWebTestVB/ HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Referer: http://vm05/PNSWebTestVB/
Accept-Language: en-US
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: vm05
Content-Length: 2272
Connection: Keep-Alive
Pragma: no-cache

__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUKLTM4MDU0OTMyOQ9kFgICAw9kFgICeQ8WAh4HVmlzaWJsZWcWBgIBDw8WAh4EVGV4dAXKATx0YWJsZSB3aWR0aD0nMTAwJSc%2BPHRyPjx0ZD48c3Ryb25nPlN0YXJ0ZWQ6PC9zdHJvbmc%2BIDg6Mjg6MTguNzA3IEFNPC90ZD48dGQgYWxpZ249J2NlbnRlcic%2BPHN0cm9uZz5FbmRlZDo8L3N0cm9uZz4gODoyODoyMC41ODUgQU08L3RkPjx0ZCBhbGlnbj0ncmlnaHQnPjxzdHJvbmc%2BVG90YWw6PC9zdHJvbmc%2BIDEuODggc2Vjb25kczwvdGQ%2BPC90YWJsZT5kZAIDDw8WAh8BBXk8aDQ%2BQ3JlYXRlIFRyYW5zYWN0aW9uIFNlcnZpY2UgUmV0dXJuPC9oND48Yj5Cb29sZWFuIHJlc3VsdDo8L2I%2BIFRydWU8YnIvPjxiIHN0eWxlPSdjb2xvcjpncmVlbjsn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gZkHYlVHbiQOw0WXZZ5cbdYYXwr661mJ89CqNL7SXM5bHdHZdc8mjZKMhnMRSoTaHKS7nhfvrD%2Fx3IhQquPfSBscM%2BEl0ZjjjtTdVzRZn7DFyWrI8V%2FOY8R04aPRKvp5noI1x8SosQ8JtOO%2BaYKnFL9NCi0aug5qlXDG2aEfC1liIw8tcyTKyO4O3QU2jwgyGg0Cn1uu04sysgxEFpobCcsYBC13vLf00%2BldhvJhee6%2Fsf7z7jMzjigjz9OJ9sLxDWTNf435wga8mfxrwE8QZdUUwumdHowAQUaobtRYmVoJUTgx0Kzlww2Q0Vmf7egxEzjWuWP9tjw%3D&txtProntoID=_CleanInstallSite&txtAuthData=password&txtUsername=apiuser&txtUserPassword=@lph@deV2&ddlProtocol=http%3A%2F%2F&txtDomain=vm05.alphatrust.local&btnCreateTest2=Create+New+Transaction+2&txtTransactionID=&txtParticipantID=&txtDocumentID=&txtMetaDataName=&txtMetaDataValue=&txtTaskID=&txtAttachmentID=

UPDATE 2

I'm not even sure how the Fiddler client has a way of seeing the SOAP in the first place. Fiddler (from what I understand) intercepts the client traffic from the browser (which is just a form post), that form post tells the application on the server to make the web service call to the WCF application on another server (or on the same server in this case) and then the WCF sends back the response data to the calling server. Then the calling server just returns the webpage back the client. So, that's all I'm seeing is the client traffic which has nothing to do with the server to server traffic (even though the client, the calling server and the WCF server are all the same machine in my test case).

like image 327
RichC Avatar asked Dec 15 '22 11:12

RichC


1 Answers

Fiddler is a proxy server.

It shows traffic from any client which is configured to point to it. I think you're saying that you've got a web browser making a request to a server which in turn uses SOAP to make a request to another server? If that's the case, you need to run Fiddler on the frontend server, and configure the ASPX or whatever issuing the SOAP request to point at Fiddler.

http://fiddler2.com/blog/blog/2013/01/08/capturing-traffic-from-.net-services-with-fiddler

like image 111
EricLaw Avatar answered Dec 28 '22 12:12

EricLaw