axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Chow" <eric...@gmail.com>
Subject org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
Date Tue, 22 Apr 2008 09:16:44 GMT
Hello,

When I tried to use wsdl2java to generate the Java Stub client, it
just raised the CodeGenerationException: Error parsing WSDL.

The attachment is my WSDL.

Please help me how can I generate the Java Client with Axis2 or Axis-1.4 ?



The following is the exception when using Axis2:

Buildfile: D:\Projects\workspace\office\eDocAlert\build.xml
init:
wsdl2java:
    [java] log4j:WARN No appenders could be found for logger
(org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).
    [java] log4j:WARN Please initialize the log4j system properly.
    [java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
WSDL
    [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
    [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    [java] Caused by: org.apache.axis2.AxisFault: Schema for
namespace 'http://context.axis2.apache.org/xsd' already contains type
'ConfigurationContext
    [java]     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
    [java]     at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:291)
    [java]     at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109)
    [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:141)
    [java]     ... 2 more
    [java] Caused by: java.lang.RuntimeException: Schema for
namespace 'http://context.axis2.apache.org/xsd' already contains type
'ConfigurationContext
    [java]     at
org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:311)
    [java]     at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:158)
    [java]     at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:347)
    [java]     at
org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:140)
    [java]     at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2186)
    [java]     at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:306)
    [java]     at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:297)
    [java]     at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:265)
    [java]     ... 4 more
    [java] Java Result: 1
clean:
jar:
BUILD SUCCESSFUL
Total time: 1 second



Best regards,
Eric

Mime
View raw message