astronm
asked on
How to work with xsd2Code generated business objects .NET ?
Hello EE!
Having a trouble to figure out how to call methods of xsd2Code generated business objects .NET application.
Say for instance I have generated with xsd2Code with a
As it stated I have to call Root.Serialize()
to generate test XML.
in VB.NET it's just not working as well I can access only Deserialize() and ReadFromFile
but nothing else.
Where to begin to work with generated classes and how to pass a values to those classes during serialization?
Thank you.
Alex
CustomersOrders.xml
CustomersOrders.xsd
CustomersOrders.Designer.vb
Having a trouble to figure out how to call methods of xsd2Code generated business objects .NET application.
Say for instance I have generated with xsd2Code with a
Namespace CustomersOrders
...
Partial Public Class Root
....
As it stated I have to call Root.Serialize()
to generate test XML.
in VB.NET it's just not working as well I can access only Deserialize() and ReadFromFile
but nothing else.
Where to begin to work with generated classes and how to pass a values to those classes during serialization?
Thank you.
Alex
CustomersOrders.xml
CustomersOrders.xsd
CustomersOrders.Designer.vb
Looking at the designer class, there is a serialize method but it appears to be dummy and is expected to be overriden by your code.
ASKER
Hi Savant.
Oh, You right! it turns like need some constructions like
But how to build this Overrides Function for every element in generated classes ?
Can I just replace it in a classes declarations with same construction as Deserialize have :
In other words, what the use of those overridden functions if they are build in every separate Partial Public Class like Root or CustomerType or AddressType ...
May be you have some very simple example how to use them for serialization?
Thank you.
Alex
Oh, You right! it turns like need some constructions like
Public Overrides Function Serialize() As String
But how to build this Overrides Function for every element in generated classes ?
Can I just replace it in a classes declarations with same construction as Deserialize have :
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As Root, ByRef exception As System.Exception) As Boolean
In other words, what the use of those overridden functions if they are build in every separate Partial Public Class like Root or CustomerType or AddressType ...
May be you have some very simple example how to use them for serialization?
Thank you.
Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.