PageMethods are part of the ASP.NET AJAX Framework (ScriptManager).
By default, ASP.NET AJAX uses JSON as opposed to SOAP.
This is by design, mainly because the ASP.NET AJAX Javascript library is optimized for working with JSON objects.
You can override this default value by specifying the [ResponseFormat] attribute in the web method.
Like this:
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Xml)] public XmlElement GetFoo(string url) {
Here 's a decent article on web services using PageMethods and ASP.NET AJAX.
source share