Modifying Soap Response: after removing result tag from soap response it also remove MethodName tag

Hi,

I want to remove restult tag from soap response and want to make soap response looks like following

Soap Response Desired:

 

 

 

 

 

 

some xml data 

 

 


 

I use following code to remove result tag.

 

[WebMethod] 
[SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare)]
 [return: XmlElement("MethodNameResponse")]

 

But after using this code it also remove method name tag from soap request as following you can see below there is no method name tag exists.

Soap Request After removing Result Tag

 

 

 

 

 



UserName

Password 

 

 

 

Some XML Data 

 

 


 

But I want to keep method name tag in Soap Request and want to remove result tag from Soap Response I want to make look Soap Request after removing result tag from soap response as following

Soap Request Desired After removing Result Tag from Soap Response:

 

 

 

 

 

 



UserName

Password

  

 

 

Some XML Data 

 

 

 


 

So please suggest my issue is that after removing result tag from soap response it also remove MethodName tag from soap request.

 

First, can you please clean up your post. It’s very difficult to read.Second, can you show the code that produces this XML?

Hey,following is the code I am using in webservice.using System;

300