views:

28

answers:

1

I am creating a few basic web services using c#, and I am trying to have the web service return back just a normal name=value&name=value without any kind of xml or json format. The legacy system hitting these services is fairly old and doesn't support xml or json. Is doing this possible?

+1  A: 

If the legacy service that's targeting this web service is that old, how exactly are you calling the web service from it? It may be easier to create an .aspx page (or even better, .ashx) that parses the request and makes the response simply using Response.Write.

If you update your question/add a comment with the detail about how you're calling the service, I'll update my answer accordingly =)

Rob
We are hitting the web services with POST methods, I use old as in 2-3 years. using straight aspx pages was looked at but using the web methods were preferred.
Ropsody
So are you actually calling the web service(s) with valid SOAP calls or manually constructing the SOAP envelope yourselves in the legacy service? As far as I'm aware there's no way to get a .net service to output plain text (but, I might be wrong!), hence suggesting the plain aspx/ashx pages.
Rob
Ropsody
@Ropsody, not afaik. But, if you do end up using a "plain page", an ashx will be fractionally quicker than an aspx as it won't implement all the construction/teardown of WebForms, so is a bit cleaner.
Rob