Hi,

I am not abble to map a simple element to a Java class... 

Just look a part of my WSDL :
----
<wsdl:definitions ...>
 <wsdl:types> 
  <schema elementFormDefault="qualified" targetNamespace="http://name.com";> 
   <import namespace="http://xml.apache.org/xml-soap"/> 
   <element name="CALL_MYFUNCTION"> 
    <complexType> 
     <sequence> 
----

And my binding file :
----
<jaxws:bindings wsdlLocation="name.wsdl" 
  xmlns:jaxws="http://java.sun.com/xml/ns/";
  xmlns:xs="http://www.w3.org/2001/XMLSchema";
  xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>

<!-- it's work -->
    <jaxws:bindings node="wsdl:definitions">
        <jaxws:package name="com.name.project" />
    </jaxws:bindings>

<!-- it's work -->
    <jaxws:bindings node="wsdl:definitions/wsdl:portType">
        <jaxws:class name="ClasseName" />
    </jaxws:bindings>

<!-- it doesn't work :( -->
    <jaxws:bindings node="xs:eleme...@name='CALL_FUNCTION']">
        <jxb:schemaBindings>
            <jxb:elementName suffix="Element" />
        </jxb:schemaBindings>
    </jaxws:bindings>

</jaxws:bindings>
----

I have the error :
Thrown by JAXB : JAXB version attribute must be present

And when I add jxb:version="2.1" in first jaxws:bindings, I have the error :
Attribute "version" bound to namespace "http://java.sun.com/xml/ns/jaxb"; was
already specified for element "element".

It's crazy !

(It is the same with cxf version 2.1.4 and 2.2.2. I use maven dependency)

I just want a nice Java class Name... Without binding, the class name of
this element is : CALLFUNCTION.java and I want : CallFunction.java.

I need your help ;)
Thanks

Samuel
-- 
View this message in context: 
http://www.nabble.com/WSDL2Java-and-jaxb-binding-for-element-tp24588503p24588503.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to