views:

247

answers:

0

I have a web service implemented in VS2005/C#. The ASMX page has a few web methods that are pure SOAP, and I want to add an additional method that has a RESTful interface.

I want one of the methods to simply return a JPG image (image/jpeg), and not an XML response. Now, I know that ASP.Net automatically creates a REST interface for web methods that have primitive-type arguments. The question is can I modify the return type to return an image instead of an XML/SOAP response?

Basically, I'm trying to reuse the existing REST interface that ASP.Net gives me, but circumvent the response mechanism and return a custom HTTP response (non SOAP).

Is this possible? What would the method's signature look like?