cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse McLaughlin <>
Subject Re: WSDL2Java error when using <jaxb:serializable/> binding customization
Date Mon, 03 Mar 2008 09:24:04 GMT

Thanks Jim.  I've figured out why it didn't work for me.  It seems that this
binding file won't work because I am importing my type definitions (which
are in a seperate xsd file) as opposed to including them inline in the WSDL
document itself.  Here's what the preamble of my WSDL looks like:

<?xml version="1.0" encoding="utf-8"?>
    <import namespace="" location="types.xsd"/>


I verified this by removing the import and in-lining my types, and
everything works.

My problem is that I don't know how to construct a binding file that works
when an import is used.  Do I now need to specify a schemaLocation
attribute? If so, what is the value?  And what would be the proper value for
the node attribute on the <jaxb:bindings> element in this case?

Could someone provide an example of a binding file that would work?


jim ma wrote:
> Hi Jesse,
> I just tried this binding file with hello_world.wsdl and it works.
> Can you check if there is some typo/error in your wsdl and make sure the
> xpath expression is right for your wsdl .
> Cheers
> Jim Ma
> On Sun, Mar 2, 2008 at 7:13 PM, Jesse McLaughlin <>
> wrote:
>> Hi there,
>> I am trying to use CXF to generate a JAXB client from a WSDL, and I want
>> all
>> the generated objects to implement  To do this, I
>> pass
>> the following bindings file to WSDL2Java, using the -b option:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema"
>>          xmlns:jaxws=""
>>          xmlns:jaxb=""
>>          xmlns:wsdl=""
>>          xmlns:xsd="">
>>     <jaxb:globalBindings>
>>        <jaxb:serializable/>
>>     </jaxb:globalBindings>
>> </jaxws:bindings>
>> When I run WSDL2Java, it gives me the following error:
>>    "WSDLToJava Error : Could not find any node with the XPath expression:
>> //wsdl:definitions/wsdl:types/xsd:schema"
>> The client is generated normally if I don't pass this file.  I am using
>> CXF
>> 2.0.4 with JDK5 on OS X.
>> Note that I have read on JIRA that since CXF 2.0.3, neither the
>> wsdlLocation
>> nor schemaLocation attributes are required when doing this sort of
>> customization (
>> Does anyone know what I am doing wrong here or why it does not work?
>> Thanks,
>> Jesse.
>> --
>> View this message in context:
>> Sent from the cxf-user mailing list archive at

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

View raw message