cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2239) codegen fails to create classes, whereas wsimport succed
Date Wed, 27 May 2009 00:43:45 GMT

     [ https://issues.apache.org/jira/browse/CXF-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benson Margulies resolved CXF-2239.
-----------------------------------

       Resolution: Invalid
    Fix Version/s: 2.2.2
         Assignee: Benson Margulies

When I fetch the WSDL from the ? URL, I don't get the same thing that you do.

Your file copy contains:

<wsdl:types>
        <xsd:schema targetNamespace="http://tempuri.org/Imports">
            <xsd:import
                schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd0"
                namespace="http://tempuri.org/" />
            <xsd:import
                schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd1"
                namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
            <xsd:import
                schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd2"
                namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
        </xsd:schema>

Note that 'tempuri.org' URLs. These are invalid, since they contradict what the served XSD
states.

When I fetch from the ? URL, I get the following, and this works fine.


        <xsd:schema targetNamespace="http://api.microsofttranslator.com/v1/soap.svc/Imports">
            <xsd:import schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd0"
namespace="http://api.microsofttranslator.com/v1/soap.svc"/>
            <xsd:import schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd1"
namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
            <xsd:import schemaLocation="http://api.microsofttranslator.com/V1/Soap.svc?xsd=xsd2"
namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
        </xsd:schema>

> 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
>            Assignee: Benson Margulies
>             Fix For: 2.2.2
>
>         Attachments: pom.xml, translate.wsdl
>
>
> 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.


Mime
View raw message