Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   SOAP encoding (http://www.velocityreviews.com/forums/t784950-soap-encoding.html)

Random 05-03-2005 06:21 PM

SOAP encoding
 
I have a WebMethod that is returning a custom class, but am having a
problem with the SOAP serialization. Everything actually works fine, except
the root node of the serialized class gets changed to match the WebMethod.

So, where I have my class...

Public Class MyCustomClass
........(class properties)
End Class

....in normal serialization, it all comes out the way I want,...

<MyCustomClass xmlns="http://wwwmynamespace.org/">
..........(xml serialized properties)
</MyCustomClass>


But my WebMethod...

<WebMethod(Description:="Returns a custom class")> _
Public Function MyMethod() As MyCustomClass
...(perform object instantiation and set properties)
End Function

gives me in the SOAP body...

<MyMethod xmlns=="http://wwwmynamespace.org/">
........(xml serialized properties)
</MyMethod>

I'm trying to apply various XmlRoot and SoapElement attributes to the
WebMethod, but VS keeps telling me that those attributes are not valid on
this declaration type. What am I missing??




All times are GMT. The time now is 02:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57