You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Brian Uri! <br...@urizone.net> on 2006/09/28 16:42:57 UTC

JaxME WS Error: ComplexType believed to be simple.

Hello,

	I have a schema which validates correctly. When I attempt to parse it with 
ws-jaxme-0.5.1, I receive an IllegalStateException because the parser believes 
that one of my complexType constructs is a simpleType.




Here is the schema:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns="www.fgm.com/services/fgm/1.1"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="www.fgm.com/services/fgm/1.1"
    elementFormDefault="qualified">

    <xs:complexType name="BaseObject" />
    <xs:complexType name="BrokenObject">
       <xs:complexContent>
          <xs:extension base="BaseObject">
             <xs:sequence>
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="Choice" type="ExtendedBrokenObject" 
minOccurs="0" maxOccurs="unbounded"/>
                </xs:choice>
             </xs:sequence>
          </xs:extension>
       </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="ExtendedBrokenObject">
       <xs:complexContent>
          <xs:extension base="BrokenObject"/>
       </xs:complexContent>
    </xs:complexType>
</xs:schema>




Here is the error I receive when trying to parse it:

java.lang.IllegalStateException: The type 
{www.fgm.com/services/fgm/1.1}BrokenObject is simple.
   at org.apache.ws.jaxme.xs.impl.XSTypeImpl.getComplexType(XSTypeImpl.java:750)
   at 
org.apache.ws.jaxme.xs.impl.XSTypeImpl$XSComplexContentImpl.<init>(XSTypeImpl.java:318)
   at org.apache.ws.jaxme.xs.impl.XSTypeImpl.validate(XSTypeImpl.java:722)
   at org.apache.ws.jaxme.xs.impl.XSElementImpl.validate(XSElementImpl.java:194)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.addParticle(XSGroupImpl.java:224)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.addParticle(XSGroupImpl.java:158)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.initParticles(XSGroupImpl.java:144)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.validate(XSGroupImpl.java:282)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.addParticle(XSGroupImpl.java:181)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.addParticle(XSGroupImpl.java:158)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.initParticles(XSGroupImpl.java:144)
   at org.apache.ws.jaxme.xs.impl.XSGroupImpl.validate(XSGroupImpl.java:282)
   at 
org.apache.ws.jaxme.xs.impl.XSTypeImpl$XSComplexContentImpl.getGroupByParticle(XSTypeImpl.java:203)
   at 
org.apache.ws.jaxme.xs.impl.XSTypeImpl$XSComplexContentImpl.<init>(XSTypeImpl.java:324)
   at org.apache.ws.jaxme.xs.impl.XSTypeImpl.validate(XSTypeImpl.java:722)
   at org.apache.ws.jaxme.xs.impl.XSSchemaImpl.validate(XSSchemaImpl.java:431)
   at org.apache.ws.jaxme.xs.impl.XSSchemaImpl.validate(XSSchemaImpl.java:452)
   at 
org.apache.ws.jaxme.xs.impl.XSContentHandlerImpl.endDocument(XSContentHandlerImpl.java:83)
   at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.endDocument(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
   at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
   at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
   at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
   at 
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.ws.jaxme.xs.impl.XSLogicalParser.parse(XSLogicalParser.java:669)
   at org.apache.ws.jaxme.xs.XSParser.parse(XSParser.java:156)

If I change the type of the "Choice" element to be anything other than 
"ExtendedBrokenObject" (tried "xs:string" and "BaseObject"), the schema is 
parsed with no problems. Is there an issue with ws-jaxme, or an issue with my data?

Thanks for any help you can provide!

Regards,
BU


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JaxME WS Error: ComplexType believed to be simple.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 9/28/06, Brian Uri! <br...@urizone.net> wrote:

>         I have a schema which validates correctly. When I attempt to parse it with
> ws-jaxme-0.5.1, I receive an IllegalStateException because the parser believes
> that one of my complexType constructs is a simpleType.

This is now fixed in the 0.5 branch and in the 0.6 branch.

Jochen

-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JaxME WS Error: ComplexType believed to be simple.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 9/28/06, Brian Uri! <br...@urizone.net> wrote:

>         I have a schema which validates correctly. When I attempt to parse it with
> ws-jaxme-0.5.1, I receive an IllegalStateException because the parser believes
> that one of my complexType constructs is a simpleType.

I can reproduce the problem. It seems, that the issue is in fact that
you are using recursive extensions: The type BrokenObject is not yet
completely initialized when it is used in ExtendedBrokenObject. A
possible workaround seems to be to define ExtendedBrokenObject before
BrokenObject.

Please be so kind to file an issue in Jira.

Jochen

-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org