how to remove XML tag from a web service response
-
Hi, I have a webservice in ASP.NET that has one exposed WebMethod that lets the outerworld send us some data and we return a response back after processing that data. We have a restriction though, our clients use a different develpment environment, and they do not use web services as we normally do. They will be using 'HTTP Post' to call the web method exposed by the web service in the following manner: http://mydomain.com/Webservice.asmx/ProcessData?=Parameter = Some Data And the response that they get back is as follows Response As a String Is there anyway that I can return only the response back to the client without the XML tags? My client is being really adamant about getting only the response back and we already have a running webservice that would be really hard to convert to any other format. Regards Mohan
-
Hi, I have a webservice in ASP.NET that has one exposed WebMethod that lets the outerworld send us some data and we return a response back after processing that data. We have a restriction though, our clients use a different develpment environment, and they do not use web services as we normally do. They will be using 'HTTP Post' to call the web method exposed by the web service in the following manner: http://mydomain.com/Webservice.asmx/ProcessData?=Parameter = Some Data And the response that they get back is as follows Response As a String Is there anyway that I can return only the response back to the client without the XML tags? My client is being really adamant about getting only the response back and we already have a running webservice that would be really hard to convert to any other format. Regards Mohan
I have done this with an aspx page, so it might be similar with a web service. With an aspx page you make sure you just have a page with only the <@Page header infomation. No tag or anything like that. Then in the page load you do processing based off the request you get. Then you take the Response object call the clear method and then do a Response.BinaryWrite You will need to convert your string into an array of bytes to pass into the binarywrite. Anyway, I haven't tried it with a web service yet, but I am pretty sure it would work. Hope that helps. Ben