alfa123456
Programmer
Hi
I'm using PB 11.2 built 8739
I have a wsdl file and I'm trying to use serialization classes in my
PB APP.
I wrote the below code
po_header.PO_No=mystring2'
po_header.mystring='mystring'
#if defined PBDOTNET THEN
@system.object SO
SO=create dt_purchaseorder_header
SO=po_header
@System.Xml.Serialization.XmlSerializer serializer
serializer=CREATE @System.Xml.Serialization.XmlSerializer(SO.gettype
())
@System.IO.StreamWriter WriteFileStream
WriteFileStream = create @System.IO.StreamWriter("C:\XML_TEST
\test.xml")
serializer.Serialize(WriteFileStream, SO)
WriteFileStream.Close()
#end if
But when it comes to the below line of code
serializer.Serialize(WriteFileStream, SO)
I'm getting an exception.
SystemInvalidOperationException void checksupported of object
system.xml.serialization.typedesc
dt_purchaseorder_header contains as public instances two strings.
If I try to serialize the same object in Visual Studio everything
works OK !. So It have to do something with Powerbuilder.
I think it has something to do with the System.Object ? Does not
recognize what type of object it is ? I don't Know.
How can I use serialization classes in Powerbuilder or is it
something I did wrong ?
Thank you
I'm using PB 11.2 built 8739
I have a wsdl file and I'm trying to use serialization classes in my
PB APP.
I wrote the below code
po_header.PO_No=mystring2'
po_header.mystring='mystring'
#if defined PBDOTNET THEN
@system.object SO
SO=create dt_purchaseorder_header
SO=po_header
@System.Xml.Serialization.XmlSerializer serializer
serializer=CREATE @System.Xml.Serialization.XmlSerializer(SO.gettype
())
@System.IO.StreamWriter WriteFileStream
WriteFileStream = create @System.IO.StreamWriter("C:\XML_TEST
\test.xml")
serializer.Serialize(WriteFileStream, SO)
WriteFileStream.Close()
#end if
But when it comes to the below line of code
serializer.Serialize(WriteFileStream, SO)
I'm getting an exception.
SystemInvalidOperationException void checksupported of object
system.xml.serialization.typedesc
dt_purchaseorder_header contains as public instances two strings.
If I try to serialize the same object in Visual Studio everything
works OK !. So It have to do something with Powerbuilder.
I think it has something to do with the System.Object ? Does not
recognize what type of object it is ? I don't Know.
How can I use serialization classes in Powerbuilder or is it
something I did wrong ?
Thank you