Reputation: 11
I have an ASMX web service running on IIS 8.0. I have a C# web method [methodName] created, it returns a value of type [typeName], the resulting soap body looks like this:
<[methodName]Response><[methodName]Result><[property1 in typeName]> ...
How do I get rid of the first two tags? Thanks
Upvotes: 1
Views: 601
Reputation: 3491
Try adding this attribute to your webMethod:
[SoapDocumentMethod(ParameterStyle = SoapParameterStyle.Bare)]
It suppose to remove the methodName and the result tag. For more information read this:
http://forums.asp.net/t/1460873.aspx?Removing+result+tag+from+the+response+tag+in+a+soap+response
Upvotes: 1