A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
Castor fail to marshal/un-marshal valid instance of sequence-of-choice schema.
Joined: Mar 13, 2012
Mar 13, 2012 05:21:45
I am using the castor v 0.96 to generate the castor from my XSD, XSD having the following type of contants having choice inside sequence and sequence inside some complex tag.
<xsd:choice minOccurs="0"> <xsd:element name="commission_entitlement" type="origo:CommissionEntitlementRequest" maxOccurs="unbounded" /> - <xsd:element name="nil_adviser_charges_ind" fixed="Yes"> - <xsd:annotation> <xsd:documentation>Business Term: Nil Adviser Charges Indicator</xsd:documentation> <xsd:documentation>Definition: Specifies that the quote is for an adviser charge product variant but that no adviser charges are to be taken from the contract.</xsd:documentation> </xsd:annotation> - <xsd:complexType> - <xsd:simpleContent> - <xsd:extension base="origo:YesNo"> <xsd:attribute name="id" type="xsd:ID" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> - <xsd:element name="adviser_charges" type="origo:AdviserChargeCollection"> - <xsd:annotation> <xsd:documentation>Business Term: Adviser Charges</xsd:documentation> <xsd:documentation>Definition: Details of all the Initial and/or Ongoing charges that will apply to the contract.</xsd:documentation> </xsd:annotation> </xsd:element> </xsd:choice> <xsd:element name="tpsdata" type="origo:Tpsdata" minOccurs="0" /> </xsd:sequence>
duing converting xml
business object (unmarshall). it is failing because of this structure.
After that we have gone thru below link
Which is suggesting to use the 1.2 version (castor-1.2-xml.jar) for fixing problem (sequence-of-choice structure in schema) but it is also not worked.
(Edit: code put into "Code" tags -- Paul C)
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Castor fail to marshal/un-marshal valid instance of sequence-of-choice schema.
How to modify XSD that allows XML to hold the base and derived element types in any order?
Simple Type Inheritance
WDSL2Java using Axis2 via Ant in Eclipse
For all SCWCD guys : Doubts
Can't generate java classes from WSDL file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013