When i call my Soap ASMX service with the parameter orderid , it fails and says . Any ideas?
System.InvalidOperationException: Request format is invalid: text/xml; charset=utf-8.
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
public class Service1 : System.Web.Services.WebService {
[WebMethod(EnableSession=true)] [SoapDocumentMethod] public Order MyLiteralMethod([XmlElement("MyOrderID")] string orderId) { //logic } }
FIDDLER REQUEST HEADER
Host: localhost:49033
Content-Type: text/xml; charset=utf-8
Content-Length: 369
SOAPAction: "http://tempuri.org/MyLiteralMethod"
FIDDLER REQUEST BODY
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<MyLiteralMethod xmlns="http://tempuri.org/">
<MyOrderID>sdasd</MyOrderID>
</MyLiteralMethod>
</soap:Body>
</soap:Envelope>
FURTHER FINDINGS I am able to call the service and pass parameter from other web debugging proxy tools[STORM]. I think this is specific to fiddler
Problem Resolved
Seems like a issue with fiddler .went into tools->options->https.. Removed decrypt HTTPs traffic.. Restarted fiddler. Then re added those options back again and restarted. I dont know if this process solved the problem but i am able to make request via fiddler.