Hi,
I am using webservice in my project and i have tricky scenario to produce the ResponseFormat(json and XML).
I have a scenario to to produce the webservice output as json and xml. have to provide this fesibility to the consumer who is consuming the webservice.
for json :
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
for xml :
[ScriptMethod(ResponseFormat = ResponseFormat.xml)]
how can i provide the feasibility to the consumenr to choose which responseformat they want. i can write two methods one is for xml and another noe is for Json. Is it possible to write one method and any custom paramater can be set to choose which reposneformat they want.
is there any way to pass the responseformat to webservice to choose which one ot produce the output.