Changing the default elementName for the return value of a Web Method

A

Atul Agarwal

Hello

Lets say I have a WebMethod with the following Attributes

[SoapRpcMethod()]
[WebMethod(MessageName="MyAction",Description="MyAction")]
public short method()
{
return 1;
}

The WSDL for the above Method has the following
<message name="MyActionSoapIn">
</message>
<message name="MyActionSoapout">
<part name="MyActionResult" type="s:short" />
</message>

What do I need to do so that name="MyActionResult" changes to say
name="MyResult" in the above WSDL ?

I tried specifying [return:XmlElement(ElementName="MyResult")]
but that did not help.

Thank you.

Atul Agarwal
 
A

atul agarwal

Hi

Actual if you use SoapElement instead of XmlElement you CAN
change the return Element Name !!!

Thanks

Atul Agarwal
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top