Hi,
I've been stuck on this for weeks now, I'm an inexperienced developer and unfortunately I've been landed with a large system that integrates with multiple web services.
A third pary we connect to has updated their xml schema and I've subsequently got an new XSD with various field changes. Unfortunately they have added a new choice element which I'm having great difficulty with. (their support team only develops in java so cant assist me)
schema code:
Basically I've used the xsd.exe to generate a vb.net class which seems to be fine for the majority of fields except the choice element, the code generated is as below:
it seems like a generic Item object? how can I manually change the generated code so it lets me select 'Q1BankruptcySearchComplexNameType' or 'Q1BankruptcySearchPrivateIndividual'.
I hope this makes sense. Any input would be greatly appreciated as this is causing me real problems and I really need to get these changes working before the old schema is disabled..
thanks for reading
I've been stuck on this for weeks now, I'm an inexperienced developer and unfortunately I've been landed with a large system that integrates with multiple web services.
A third pary we connect to has updated their xml schema and I've subsequently got an new XSD with various field changes. Unfortunately they have added a new choice element which I'm having great difficulty with. (their support team only develops in java so cant assist me)
schema code:
VB.NET:
- <xs:complexType name="Q1LandChargesBankruptcySearchType">
- <xs:annotation>
<xs:documentation>Choice of Private Individual search or Complex Name search</xs:documentation>
</xs:annotation>
- <xs:sequence>
- <xs:choice>
<xs:element name="BankruptcySearchPrivateIndividual" type="Q1BankruptcySearchPrivateIndividualType" />
<xs:element name="BankruptcySearchComplexName" type="Q1BankruptcySearchComplexNameType" />
</xs:choice>
Basically I've used the xsd.exe to generate a vb.net class which seems to be fine for the majority of fields except the choice element, the code generated is as below:
VB.NET:
<System.Xml.Serialization.XmlElementAttribute("BankruptcySearchComplexName", GetType(Q1BankruptcySearchComplexNameType)), _
System.Xml.Serialization.XmlElementAttribute("BankruptcySearchPrivateIndividual", GetType(Q1BankruptcySearchPrivateIndividualType))> _
Public Property Item() As Object
Get
Return Me.itemField
End Get
Set(ByVal value As Object)
Me.itemField = Value
End Set
End Property
it seems like a generic Item object? how can I manually change the generated code so it lets me select 'Q1BankruptcySearchComplexNameType' or 'Q1BankruptcySearchPrivateIndividual'.
I hope this makes sense. Any input would be greatly appreciated as this is causing me real problems and I really need to get these changes working before the old schema is disabled..
thanks for reading