cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Queste (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2891) Invalid WSDL when using <jax-ws:schemaLocation> (XSD) and ASM present in the classpath
Date Tue, 13 Jul 2010 09:34:49 GMT
Invalid WSDL when using <jax-ws:schemaLocation> (XSD) and ASM present in the classpath
--------------------------------------------------------------------------------------

                 Key: CXF-2891
                 URL: https://issues.apache.org/jira/browse/CXF-2891
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.2.9, 2.2.8, 2.2.7, 2.2.6
            Reporter: Thomas Queste


CXF produces an invalid wsdl when a <jaxws:schemaLocation> (XSD) is specified.
The error messages is : GRAVE: Schema element [...] references undefined type [...]
The generated wsdl can not be read by SoapUI.

*BUT*, there is no error messages and *the WSDL is fully working* if :
* I remove the <jaxws:schemaLocation> configuration element
* _OR_, the ASM library is completely excluded from the classpath

I think there is an incompatibility between the use of an XSD (jaxws:schemaLocation) and the
ASM library.

A sample webapp is attached and it makes easier to reproduce the problem (see below for details).


h4. Versions

Tested with :
- CXF : 2.2.6 to 2.2.9
- ASM 2.2.3, 3.0, 3.1

CXF depends on ASM 2.2.3 but this dependency is optional.
ASM 3.1 is provided by JBoss so it will be available anyway in the classpath.
So I was not able to deploy the sample webapp on JBoss 5.

With ASM 1.5.3, there is no error.


h4. Full log messages

{code}
12 juil. 2010 15:25:42 org.apache.cxf.service.factory.ReflectionServiceFactoryBean
GRAVE: Schema element{http://creditcard.example.com/}getCreditCardStatusResponse references
undefined type 
{http://creditcard.example.com/}getCreditCardStatusResponse for service {http://creditcard.example.com/}
12 juil. 2010 15:25:42 org.apache.cxf.service.factory.ReflectionServiceFactoryBean
GRAVE: Schema element {http://creditcard.example.com/}getCreditCardStatus references undefined
type 
{http://creditcard.example.com/}getCreditCardStatus for service {http://creditcard.example.com/}CreditCardWebServiceImplService.
{code}

h4. Full Jax-ws declaration

{code:xml}
  <jaxws:endpoint
      id="creditCardWebService"
      implementor="com.example.creditcard.CreditCardWebServiceImpl"
      address="/creditCard">
    <jaxws:schemaLocations>
      <jaxws:schemaLocation>schemas/creditCard.xsd</jaxws:schemaLocation>
    </jaxws:schemaLocations>
  </jaxws:endpoint>
{code}

h4. The sample project

Attached is a very simple webapp which can be run with : mvn jetty:run
This is a maven project which contains a simple XSD.
The XSD is used to generate the sample java beans used in the webService java code.
The XSD is also declared in the jaxws:endpoint in the spring applicationContext file.
The error is shown in the console when the endpoint is created, when CXF is started.
The pom.xml is fully documented and prepared to enable/disable the ASM dependency.

The generated WSDL are also provided (with/without schemaLocation combined with/without ASM).





Thanks for your help and the time you will take to fix this.


-- 
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