axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Unable to generate source code using WSDL2JAVA
Date Tue, 15 May 2007 22:41:24 GMT
That should be:

   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

If you are using a prefix called "xs", you must declare the prefix using a
xmlns:xs="http://www.w3.org/2001/XMLSchema" attribute.

Anne

On 5/15/07, Glen Mazza <grm7793@verizon.net> wrote:
> The error message you're getting ("The prefix xs is not bound") is
> fairly clear.  Where did you bind the xs prefix, or did you not bind it?
>
> If you look at [1] below, you will probably need something like this:
>
> <xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
> Glen
>
> [1] http://www.xfront.com/DefaultNamespace.html#Approach3
>
> Am Dienstag, den 15.05.2007, 15:33 +0800 schrieb Sharma, Vishal :
> > Hi,
> >
> > I am trying generate Java classes for a WSDL using WSDL2Java, but its
> > giving me the below mentioned exception.
> > Some further information:
> > 1. The WSDL contains only one operation
> > 2. The schema used for the operations input and output params is
> > complex. The schema includes features:
> >         a. Substitution Group
> >         b. Include
> >         c. Import
> > 3. Using Axis2 version: axis2-1.2
> > 4. I am able to generate the classes for the schema using IBM RAD
> >
> > Is there anything specific that I am missing and should look at.
> > Pls. help
> >
> > May 15, 2007 3:21:23 PM
> > org.apache.axis2.description.WSDL11ToAxisServiceBuilder
> > populateService
> > SEVERE: java.lang.RuntimeException: java.lang.RuntimeException:
> > java.lang.Illega
> > lStateException: The prefix  xs is not bound.
> > Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException
> > : Error parsing WSDL
> >         at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> > ionEngine.java:137)
> >         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> >         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > Caused by: org.apache.axis2.AxisFault: java.lang.RuntimeException:
> > java.lang.Ill
> > egalStateException: The prefix  xs is not bound.
> >         at
> > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
> > ce(WSDL11ToAxisServiceBuilder.java:298)
> >         at
> > org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
> > llServices(WSDL11ToAllAxisServicesBuilder.java:100)
> >         at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> > ionEngine.java:131)
> >         ... 2 more
> > Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> > java.lang.Ill
> > egalStateException: The prefix  xs is not bound.
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> > lder.java:1840)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> > lder.java:1856)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleInclude(SchemaBuilde
> > r.java:1628)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sch
> > emaBuilder.java:164)
> >         at
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> > tion.java:343)
> >         at
> > org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WS
> > DLToAxisServiceBuilder.java:137)
> >         at
> > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibl
> > eElements(WSDL11ToAxisServiceBuilder.java:1951)
> >         at
> > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
> > ce(WSDL11ToAxisServiceBuilder.java:258)
> >         ... 4 more
> > Caused by: java.lang.RuntimeException:
> > java.lang.IllegalStateException: The pref
> > ix  xs is not bound.
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> > lder.java:1840)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder
> > .java:1574)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sch
> > emaBuilder.java:170)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:7
> > 9)
> >         at
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> > tion.java:353)
> >         at
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> > tion.java:300)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> > lder.java:1838)
> >         ... 11 more
> > Caused by: java.lang.IllegalStateException: The prefix  xs is not
> > bound.
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.
> > java:539)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleSimpleType(SchemaBui
> > lder.java:378)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sch
> > emaBuilder.java:147)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:7
> > 9)
> >         at
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> > tion.java:353)
> >         at
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> > tion.java:300)
> >         at
> > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> > lder.java:1838)
> >         ... 17 more
> > C:\bea\TestingSchema>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Mime
View raw message