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 java.io.Serializable.  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="http://java.sun.com/xml/ns/jaxws"; 
          xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
          xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
     <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 (https://issues.apache.org/jira/browse/CXF-1094).

Does anyone know what I am doing wrong here or why it does not work?

Thanks,
Jesse.


-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-error-when-using-%3Cjaxb%3Aserializable-%3E-binding-customization-tp15786637p15786637.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to