.net - wcf request wrapper name -
is there way change wrapper used wcf request uses webmessagebodystyle.wrapped or webmessagebodystyle.wrappedrequest instead of using operation name?
so following:
[operationcontract()] [webinvoke(method = "put", bodystyle = webmessagebodystyle.wrappedrequest, uritemplate = "foo")] bool putsomevalue(string id, string bar); instead of request being:
<putsomevalue> <id>1234</id> <bar>myvalue</bar> </putsomevalue> i want be:
<mynewwrappername> <id>1234</id> <bar>myvalue</bar> </mynewwrappername> i know it's possible response , can change individual parameters on request can't find information changing request wrapper.
edit: reason want change wrapper generic "parameters" or "request" , preferrably have same wrapper each of operations. think cleaner , more user friendly requiring client worry each request's wrapper, plus reveal less metadata.
similar question here; how can control name of generic wcf return types?
and answer https://stackoverflow.com/a/172370/929902
[operationcontract] [return: messageparameter(name="yourname")] response<list<customer>> getcustomers();
Comments
Post a Comment