[ 
http://jira.codehaus.org/browse/JIBX-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=134016#action_134016
 ] 

Keith Hyland commented on JIBX-154:
-----------------------------------

I am also getting this problem. Using jibx 1.1.5 and xsd2jibx-beta0.2b.

The following xsd will produce the problem. Unfortunately we are not in a 
position to be able to change the xsd.

Does anybody know of any workarounds, or updates?

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://www.domain.com/Contact/v1";
        xmlns:con="http://www.domain.com/Contact/v1";
        elementFormDefault="qualified" attributeFormDefault="unqualified">

        <xs:group name="ContactGroup">
                <xs:sequence>
                        <xs:element name="Address1" type="xs:string"/>
                        <xs:element name="Address2"     type="xs:string" />
                        <xs:element name="Address3" type="xs:string"/>
                </xs:sequence>
        </xs:group>

        <xs:element name="Contact">
                <xs:complexType>
                        <xs:group ref="con:ContactGroup" />
                </xs:complexType>
        </xs:element>
</xs:schema>

> Fails when <xsd:group> falls within an <xsd:complexType> block
> --------------------------------------------------------------
>
>                 Key: JIBX-154
>                 URL: http://jira.codehaus.org/browse/JIBX-154
>             Project: JiBX
>          Issue Type: Bug
>          Components: xsd2jibx
>    Affects Versions: xsd2jibx-beta0.2
>         Environment: Suse SLED10 Linux, Sun Java 1.5.0_11
>            Reporter: Randal Cobb
>            Priority: Critical
>         Attachments: PayrollFederalTaxWithholding-RAC.wsdl~, 
> PayrollFederalTaxWithholding-RAC.xsd, soap_encoding.xsd
>
>
> When using the xsd2jibx tool (rebuilt  and repackaged to use the jibx 1.1.3 
> libraries) on the attached xsd, the following exception is thrown:
> org.jibx.xsd2jibx.GeneratorException: unable to unmarshall
> Root cause: org.jibx.runtime.JiBXException: Expected "complexType" end tag, 
> found "group" start tag (line 18, col 31)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:380)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:254)
>       at org.jibx.xsd2jibx.Generator.execute(Generator.java:170)
>       at org.jibx.xsd2jibx.Generate.generate(Generate.java:131)
>       at org.jibx.xsd2jibx.Generate.main(Generate.java:182)
> Caused by: org.jibx.runtime.JiBXException: Expected "complexType" end tag, 
> found "group" start tag (line 18, col 31)
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:793)
>       at org.jibx.xsd2jibx.JiBX_xsdXsdComplexType_access.unmarshal()
>       at org.jibx.xsd2jibx.JiBX_MungeAdapter.JiBX_xsd_unmarshal_1_1()
>       at org.jibx.xsd2jibx.XsdSchema.JiBX_xsd_unmarshal_1_0(XsdSchema.java)
>       at org.jibx.xsd2jibx.JiBX_xsdXsdSchema_access.unmarshal()
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2538)
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2681)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:378)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:254)
>       at org.jibx.xsd2jibx.Generator.execute(Generator.java:170)
>       at org.jibx.xsd2jibx.Generate.generate(Generate.java:131)
>       at org.jibx.xsd2jibx.Generate.main(Generate.java:182)
> Cause: org.jibx.runtime.JiBXException: Expected "complexType" end tag, found 
> "group" start tag (line 18, col 31)
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:793)
>       at org.jibx.xsd2jibx.JiBX_xsdXsdComplexType_access.unmarshal()
>       at org.jibx.xsd2jibx.JiBX_MungeAdapter.JiBX_xsd_unmarshal_1_1()
>       at org.jibx.xsd2jibx.XsdSchema.JiBX_xsd_unmarshal_1_0(XsdSchema.java)
>       at org.jibx.xsd2jibx.JiBX_xsdXsdSchema_access.unmarshal()
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2538)
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2681)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:378)
>       at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:254)
>       at org.jibx.xsd2jibx.Generator.execute(Generator.java:170)
>       at org.jibx.xsd2jibx.Generate.generate(Generate.java:131)
>       at org.jibx.xsd2jibx.Generate.main(Generate.java:182)
> This same xsd works fine when used with XMLBeans

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to