Sridhar
unread,May 10, 2013, 9:57:36 AM5/10/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to legsta...@googlegroups.com
Thank you very much. This will simplify my work a lot.
Meanwhile, I tried to work with a modified xsd. If this is any significant have a look at this.
I have modified my XSD and added choice element to make it generalized. So, that elements are unbound and any order.
<complexType name="WsOutData">
<sequence>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="headerLine" type="tns:HeaderLine">
........
</complexType>
In the generated WsOutData.java
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WsOutData", propOrder = {
"headerLineOrHeaderLine2OrHeaderLine3"
})
public class WsOutData
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElements({
@XmlElement(name = "offdutyWindowPoolData", type = OffdutyWindowPoolData.class),
@XmlElement(name = "positionLine", type = PositionLine.class),
@XmlElement(name = "offdutyDetailData", type = CrewOffdutyDetail.class),
@XmlElement(name = "crewOndutyDetail", type = CrewOndutyDetail.class),
@XmlElement(name = "headerLine3", type = HeaderLine3 .class),
@XmlElement(name = "headerLine2", type = HeaderLine2 .class),
@XmlElement(name = "crewRestDetail", type = CrewRestDetail.class),
@XmlElement(name = "headerLine", type = HeaderLine.class),
@XmlElement(name = "rsaDetail", type = RsaDetail.class)
})
protected List<Object> headerLineOrHeaderLine2OrHeaderLine3;
.......
Here the instance variable does not have coxb annotation. so the Ant task is failing with exception.
\COXB3\buildscript\build-coxb.xml:109: HostException No cobol annotations found for field headerLineOrHeaderLine2OrHeaderLine3
nd for field headerLineOrHeaderLine2OrHeaderLine3
te(CoxbBindingGenerator.java:135)
[coxbgen] No cobol annotations found for field headerLineOrHeaderLine2OrHeaderLine3
[coxbgen] at com.legstar.coxb.impl.reflect.ReflectBindingFactory.createBinding(ReflectBindingFactory.java:82)
[coxbgen] at com.legstar.coxb.impl.reflect.CComplexReflectBinding.initChildren(CComplexReflectBinding.java:217)
[coxbgen] at com.legstar.coxb.impl.reflect.CComplexReflectBinding.initComplexElement(CComplexReflectBinding.java:174)
[coxbgen] at com.legstar.coxb.impl.reflect.CComplexReflectBinding.<init>(CComplexReflectBinding.java:127)
[coxbgen] at com.legstar.coxb.impl.reflect.CComplexReflectBinding.<init>(CComplexReflectBinding.java:87)
[coxbgen] at com.legstar.coxb.gen.CoxbBindingGenerator.execute(CoxbBindingGenerator.java:112)