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
Parker Zhang [MSFT] - 12 Sep 2003 10:18 GMT
Hi,
When using RPC instead of Document, I don't think you are able to change
the return element name.
Please refer to
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcustomizingsoapina
spnetwebserviceswebserviceclients.asp.
If you have any Qs, please reply to this post.
--
Parker Zhang
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
atul agarwal - 24 Sep 2003 02:06 GMT
Hi
Actual if you use SoapElement instead of XmlElement you CAN
change the return Element Name !!!
Thanks
Atul Agarwal
atulapt@vsnl.com