2

how can I use Fiddler to pass 2 parameters to a method with a signature like this :

 [WebInvoke(UriTemplate = "Login", Method = "POST", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.WrappedRequest)]        
    bool Login(string login, string password);

Any suggestion to change something in the method is welcome, but I have always to pass 2 string parameters.

Hamza_L
  • 644
  • 4
  • 18

1 Answers1

2

It is much easier to the services with WCFTestClient. Anyway, Fiddler has composer functionality which can be used to test any http calls.

enter image description here

Request Headers should look like below. Just change SOAPAction accordingly.

Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/IService/Login"
Host: localhost:2045
Content-Length: 179
Expect: 100-continue
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

And request body:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><Login xmlns="http://tempuri.org/"><login>sdf</login><password>sdf</password></Login></s:Body></s:Envelope>
k0stya
  • 4,267
  • 32
  • 41