cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <>
Subject Re: Invalid WSDL with a Jax-ws schemaLocation (XSD) specified
Date Mon, 12 Jul 2010 19:06:01 GMT

(Note, I had to mangle the word "C r e d i t" below because it activated
Nabble's spam detector)

I didn't know about ASM:  BTW, your sample POM is
missing this repository in case others want to test it:

       <name> Maven 2 Repository</name>

Anyway, I looked at the WSDL generated at
http://localhost:8080/creditcard/creditCard?wsdl with both the pom with ASM
(which doesn't work) and the pom without it (which apparently does work). 
They're different for some reason.  The failing WSDL has this schema

<xsd:schema attributeFormDefault="unqualified"
  <xsd:element name="getCritCardStatus" nillable="true"
  <xsd:element name="getCritCardStatusResponse" nillable="true"

While the good WSDL has this instead:

<xsd:schema attributeFormDefault="unqualified"
xmlns:ns0="" xmlns:tns=""
  <xsd:import namespace="" />
  <xsd:element name="getCditCardStatus" type="tns:getCritCardStatus" />
  <xsd:complexType name="getCritCardStatus">
      <xsd:element minOccurs="0" ref="ns0:CditCardRequest" />
  <xsd:element name="getCritCardStatusResponse"
type="tns:getCditCardStatusResponse" />
  <xsd:complexType name="getCditCardStatusResponse">
      <xsd:element minOccurs="0" ref="ns0:CritCardResponse" />

i.e., you're missing a couple of complexType definitions.  I don't know
why--I guess it's something about the dependencies that ASM itself brings
in.  This is probably a rare bug, possibly due to the manner in which you're
generating your project.

Possible solutions:
1.) Include the working (good) WSDL in your web service (If helpful, see
here[1] for where to include it in a Mavenized project, and [2] for how to
host it on Jetty) so you know the version that Jetty is using.


2.) Don't use the maven-jaxb-plugin.  CXF's own codegen plugin [1] will
generate all the necessary artifacts both JAX-WS and JAXB (you're only going
to get the latter with the jaxb plugin), and it can also handle any JAXB
customizations you may wish to do[3].  If you like to split out your JAXB
objects you can use Maven's Assembly plugin[1] for that.  That might also
allow you to get rid of the repository from your POM files, and
hence any download inconsistencies between that and the standard Maven

[1] (also
the cxf-servlet.xml file in Step #7)

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message