codegen fails to create classes, whereas wsimport succed
--------------------------------------------------------
Key: CXF-2239
URL: https://issues.apache.org/jira/browse/CXF-2239
Project: CXF
Issue Type: Bug
Affects Versions: 2.2.1
Environment: Maven version: 2.0.10
Java version: 1.6.0_07
OS name: "mac os x" version: "10.5.7" arch: "x86_64" Family: "mac"
Reporter: Valerio Schiavoni
The wsdl is at http://api.microsofttranslator.com/V1/Soap.svc?WSDL
This works fine:
wsimport -keep http://api.microsofttranslator.com/V1/Soap.svc?WSDL
Instead, running the profile -Pbuild:wsdl in the attached pom produces:
Caused by: java.lang.RuntimeException:
org.apache.ws.commons.schema.XmlSchemaException: An imported schema was
announced to have the namespace http://tempuri.org/, but has the namespace
http://api.microsofttranslator.com/v1/soap.svc
at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1907)
at
org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1615)
at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:523)
at
org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:176)
at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:133)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73)
at
org.apache.cxf.tools.validator.internal.WSDLRefValidator.getSchemas(WSDLRefValidator.java:115)
at
org.apache.cxf.tools.validator.internal.WSDLRefValidator.processSchemas(WSDLRefValidator.java:127)
... 29 more
Caused by: org.apache.ws.commons.schema.XmlSchemaException: An imported schema
was announced to have the namespace http://tempuri.org/, but has the namespace
http://api.microsofttranslator.com/v1/soap.svc
at
org.apache.ws.commons.schema.SchemaBuilder$1.validate(SchemaBuilder.java:1605)
at
org.apache.ws.commons.schema.SchemaBuilder.setNamespaceAttributes(SchemaBuilder.java:369)
at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:134)
at
org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:509)
at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:382)
at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1901)
... 37 more
[INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.