S
SiJP
Hi,
My vb.net project sends an Input object to a webservice and retrieves
a Results object.
The webservice is maintained by a third party, and is pretty huge.
I am using the following procedure to serialize both the input and
result objects to Xml:
Public Function Serialize(Of T)(ByVal obj As T) As String
Try
Dim returnXML As String = String.Empty
Dim serializer As New
Serialization.XmlSerializer(GetType(T))
Using writer As New IO.StringWriter
serializer.Serialize(New XmlTextWriter(writer), obj)
returnXML = writer.ToString()
End Using
Return returnXML
Catch ex As Exception
Msgbox(ex.ToString)
End Try
End Function
The Xml generated from the Results object includes Integers and
Booleans. My problem is the Input object (although is enumerated with
correct values) does not seem to serialize any integers or booleans to
Xml (strings are fine).
Is there anything obvious I should be looking out for?
Thanks
My vb.net project sends an Input object to a webservice and retrieves
a Results object.
The webservice is maintained by a third party, and is pretty huge.
I am using the following procedure to serialize both the input and
result objects to Xml:
Public Function Serialize(Of T)(ByVal obj As T) As String
Try
Dim returnXML As String = String.Empty
Dim serializer As New
Serialization.XmlSerializer(GetType(T))
Using writer As New IO.StringWriter
serializer.Serialize(New XmlTextWriter(writer), obj)
returnXML = writer.ToString()
End Using
Return returnXML
Catch ex As Exception
Msgbox(ex.ToString)
End Try
End Function
The Xml generated from the Results object includes Integers and
Booleans. My problem is the Input object (although is enumerated with
correct values) does not seem to serialize any integers or booleans to
Xml (strings are fine).
Is there anything obvious I should be looking out for?
Thanks