[xsd-users] Help needed - codesynthesis on HP-UX 11.31 with aC++
using xsd:choice
Bhave, Abhay V
abhave at telcordia.com
Thu Nov 3 18:57:04 EDT 2011
HP-UX B.11.31 U ia64
Generated hxx and cxx files from my XSDs.
I need help trying to parse a given XML.
The XSD is like below
------
<xsd:element name = "GetDetailsResp" type = "GetDetailsResp" />
<xsd:complexType name = "GetDetailsResp" >
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1" >
<xsd:element name = "Work" type = "GetJobWork" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WSFaults" type = "force:WSFaults" minOccurs="1" maxOccurs="1" >
</xsd:element>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:string" use="optional"/>
</xsd:complexType>
-----
<xsd:element name = "GetJobWork" type = "GetJobWork" />
<xsd:complexType name = "GetJobWork" >
<xsd:sequence>
<xsd:choice minOccurs="1" maxOccurs="1" >
<xsd:element name = "WorkForLMOS" type = "WorkForLMOS" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForWFAC" type = "WorkForWFAC" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForWFACTIRKS" type = "WorkForWFACTIRKS" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForTIRKS" type = "WorkForTIRKS" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForTTM" type = "WorkForTTM" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForPROV" type = "WorkForProvisioning" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForGUI" type = "WorkForGUI" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForRWG" type = "WorkForRWG" minOccurs="1" maxOccurs="1" >
</xsd:element>
<xsd:element name = "WorkForFOMS" type = "WorkForFOMS" minOccurs="1" maxOccurs="1" >
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
---
Using the document and example as a guide my code like below
auto_ptr<Job::v1::GetDetailsResp> getDetailsRespPtr(0);
getDetailsRespPtr = Job::v1::GetDetailsResp_(argv[1], flags::dont_validate);
( getDetailsRespPtr.get())->Work();
Question: how do I figure out the type of Work?
Any help is appreciated.
Abhay
More information about the xsd-users
mailing list