You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Oshani Seneviratne <os...@gmail.com> on 2006/09/09 00:59:41 UTC
[XmlSchema] Problem in how schema includes are handled
Hi,
When I run a this [1] particular test case in Woden, which has a
included schema in it, I get runtime errors (see stacktrace below). I
somehow feel that this is the same reason which is causing the recent
Axis2 build break as reported here [2].
[1] http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-2G/getBalance.wsdl
[2] http://marc.theaimsgroup.com/?l=axis-dev&m=115774121107672&w=2
The schema is read like this:
XmlSchemaCollection xsc = new XmlSchemaCollection();
xsc.setBaseUri( baseURIOfWSDL );
XmlSchema schemaDef = new XmlSchema(xsc);
//Setting the prefixes explicitly
NamespaceMap prefixmap = new NamespaceMap( namespaceMapFromWSDL );
schemaDef.setNamespaceContext(prefixmap);
schemaDef = xsc.read ( wsdlInputSource , null );
//wsdlInputSource is of type org.xml.sax.InputSource
...
And I get the following stack trace after running the above piece of code:
Exception in thread "main" java.lang.IllegalStateException: The prefix
tns is not bound.
at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:515)
at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:496)
at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1390)
at org.apache.ws.commons.schema.SchemaBuilder.handleSequence(SchemaBuilder.java:956)
at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:584)
at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1417)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:143)
at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:67)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:294)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:286)
at org.apache.woden.internal.OMWSDLReader.parseSchemaInline(OMWSDLReader.java:1211)
at org.apache.woden.internal.OMWSDLReader.parseTypes(OMWSDLReader.java:245)
at org.apache.woden.internal.OMWSDLReader.parseDescription(OMWSDLReader.java:163)
at org.apache.woden.internal.OMWSDLReader.readWSDL(OMWSDLReader.java:103)
at WSDLReader.main(WSDLReader.java:30)
.....
Am I missing some thing here?
Thanks,
Oshani
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
Re: [XmlSchema] Problem in how schema includes are handled
Posted by Davanum Srinivas <da...@gmail.com>.
please log a jira bug.
-- dims
On 9/8/06, Oshani Seneviratne <os...@gmail.com> wrote:
> Hi,
>
> When I run a this [1] particular test case in Woden, which has a
> included schema in it, I get runtime errors (see stacktrace below). I
> somehow feel that this is the same reason which is causing the recent
> Axis2 build break as reported here [2].
>
> [1] http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-2G/getBalance.wsdl
>
> [2] http://marc.theaimsgroup.com/?l=axis-dev&m=115774121107672&w=2
>
> The schema is read like this:
>
> XmlSchemaCollection xsc = new XmlSchemaCollection();
> xsc.setBaseUri( baseURIOfWSDL );
>
> XmlSchema schemaDef = new XmlSchema(xsc);
>
> //Setting the prefixes explicitly
> NamespaceMap prefixmap = new NamespaceMap( namespaceMapFromWSDL );
> schemaDef.setNamespaceContext(prefixmap);
>
> schemaDef = xsc.read ( wsdlInputSource , null );
> //wsdlInputSource is of type org.xml.sax.InputSource
> ...
>
> And I get the following stack trace after running the above piece of code:
>
> Exception in thread "main" java.lang.IllegalStateException: The prefix
> tns is not bound.
> at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:515)
> at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:496)
> at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1390)
> at org.apache.ws.commons.schema.SchemaBuilder.handleSequence(SchemaBuilder.java:956)
> at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:584)
> at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1417)
> at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:143)
> at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:67)
> at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:294)
> at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:286)
> at org.apache.woden.internal.OMWSDLReader.parseSchemaInline(OMWSDLReader.java:1211)
> at org.apache.woden.internal.OMWSDLReader.parseTypes(OMWSDLReader.java:245)
> at org.apache.woden.internal.OMWSDLReader.parseDescription(OMWSDLReader.java:163)
> at org.apache.woden.internal.OMWSDLReader.readWSDL(OMWSDLReader.java:103)
> at WSDLReader.main(WSDLReader.java:30)
> .....
>
>
> Am I missing some thing here?
>
> Thanks,
> Oshani
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: commons-dev-help@ws.apache.org
>
>
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org