Now, I can pass simple strings and get complex objects from .net web server.
Debugging Techniques I used:
[WebMethod]This is one of my web service method. First, I stores the request in RequestLogs folder using:
public Requestor LoadRequestorById(int requestorId)
{
//logs in the inforation
//stores request
base.Context.Request.SaveAs(base.Context.Request.PhysicalApplicationPath + "RequestLogs\\LoadRequestorById.xml", true);
//logs the information
TestMobilePortal.Insert("LoadRequestorById (" + requestorId + ")");
Requestor requestor = new Requestor();
requestor.Id = requestorId;
return requestor.LoadById();
}
base.Context.Request.SaveAs(base.Context.Request.PhysicalApplicationPath + "RequestLogs\\LoadRequestorById.xml", true);
This provides me all the html request that was posted to the server by my iPhone application.
Then, I store the method name and parameters passed in database:
TestMobilePortal.Insert("LoadRequestorById (" + requestorId + ")");
After that, I perform my task. Using these techniques, I can know what requests are coming. They helped me tracking down bugs.
No comments:
Post a Comment