R
Random
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??
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??