xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Wang <kensxsdquest...@gmail.com>
Subject Errors occured when parsing a seemingly valid WSDL file
Date Wed, 19 Aug 2009 21:49:13 GMT
Hi there,

The file passed the validation in both XMLSpy and soapUI. However, when I
call
    XMLSchemaLoader parser = new XMLSchemaLoader();
    XSGrammarPool grammarPool = new XSGrammarPool();
     parser.setProperty(GRAMMAR_POOL, grammarPool);
    parser.setErrorHandler(errHandler);
    parser.loadGrammar(inputSrcArry) where inputSrcArry is an XMLInputSource
array containing schema definitions as element

from my java application using Xerces-J 2.8.0. I received a long list of
errors. Most of them are like:

[Error] askOrderService.wsdl:7:102: src-resolve: Cannot resolve the name
'java:AbstractType' to a(n) 'type definition' component.
[Error] askOrderService.wsdl:27:95: src-resolve: Cannot resolve the name
'java:AbstractBean' to a(n) 'type definition' component.
[Error] askOrderService.wsdl:7:26: cos-ct-extends.1.4.3.2.2.1.a: The content
type of a derived type and that of its base must both be mixed or both be
element-only. Type 'Service' is element only, but its base type is not.
[Error] askOrderService.wsdl:43:26: cos-ct-extends.1.4.3.2.2.1.a: The
content type of a derived type and that of its base must both be mixed or
both be element-only. Type 'LineOfBusiness' is element only, but its base
type is not.
[Error] askOrderService.wsdl:52:26: cos-ct-extends.1.4.3.2.2.1.a: The
content type of a derived type and that of its base must both be mixed or
both be element-only. Type 'DataReference' is element only, but its base
type is not.

The WSDL contains 18 schemas in total. I loaded Xerces2.8.0 source code into
my IDE, found the "src-resolve" error was thrown from
XSDHandler.java(Ln:1392). It seems the parser only looks for referenced
schema from the schemas it has traversed earlier ( in fGrammarBucket), when
a referenced schema is positioned after the current schema in the file, the
parser won't look for it, even if an <import namespace=""> has existed in
the current schema definition. I then changed the sequence of schema
definition positions in the file, and got errors about different elements.

Can anybody shed some light on this?

Thanks.

Mime
View raw message