webmethod not calling in fiddler so ca't get request



While trying to post xml,. I can't get the xml request. I am testing my web method in fiddler tool. what i miss here?


C# Class & WebMethod -



public struct Employee
{
public string Name;
public int Age;
public float Salary;
}

[WebMethod]
public Employee HelloWorld(Employee emp)
{
emp.Name = "Mr " + emp.Name;
emp.Age += 1;
emp.Salary += 5000.0f;
return emp;
}


XML Request -



<?xml version="1.0" encoding="utf8" ?>
<soap:Envelope xmlns:soap="http://ift.tt/sVJIaE" xmlns:xsi="http://ift.tt/1nHAjlb" xmlns:xsd="http://ift.tt/tphNwY">
<soap:Body>
<HelloWorld xmlns="http://ift.tt/14KOGyz">
<emp>
<Name>Bob</Name>
<Age>20</Age>
<Salary>60000</Salary>
</emp>
</HelloWorld>
</soap:Body>
</soap:Envelope>


Result in Raw Format -



POST http://localhost:49633/xmlRequest.aspx/HelloWorld HTTP/1.1
User-Agent: Fiddler
Host: localhost:49633
Content-Type: text/xml
Content-Length: 521

<?xml version="1.0" encoding="utf8" ?>
<soap:Envelope xmlns:soap="http://ift.tt/sVJIaE" xmlns:xsi="http://ift.tt/1nHAjlb" xmlns:xsd="http://ift.tt/tphNwY">
<soap:Body>
<HelloWorld xmlns="http://ift.tt/14KOGyz">
<emp>
<Name>Bob</Name>
<Age>20</Age>
<Salary>60000</Salary>
</emp>
</HelloWorld>
</soap:Body>
</soap:Envelope>

No comments:

Post a Comment