Hello,

I have a problem with the wsdl generation. I'm using xFire (sync on the SVN
trunc) from servicemix and I'm using the typeBinding "jaxb2". I would like
to use the annotation to change the field/Methods name.

I wrote this simple POJO class with annotation:

@XmlAccessorType(AccessType.FIELD)
@XmlType(name = "testA", propOrder = {
   "data", "creationDateTo"}, namespace="http://agentws.se.tag.temenos.com";)
public class TestA {
        
         @XmlElement(name="DAATA", 
namespace="http://agentws.se.tag.temenos.com";)
        protected Integer data = 1;

         @XmlElement(namespace = "http://agentws.se.tag.temenos.com";)
        protected XMLGregorianCalendar creationDateTo;

        public Integer getData() {
                return data;
        }
}

And the WS is using it as parameter:

@WebService
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use =
SOAPBinding.Use.ENCODED, parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class ReceiverService {

@WebMethod
        @WebResult(name = "TestResult")
        public int test(@WebParam(name = "test")
        TestA test) {

                return 1;
        }
}

In the generated wsdl the namespace is empty:
 <xsd:schema targetNamespace="http://agentws.se.tag.temenos.com";
elementFormDefault="qualified" attributeFormDefault="qualified" />

If I remove the "@XmlType(name = "testA", propOrder = { ...." from the POJO

Then I have the following:

<xsd:schema targetNamespace="http://agentws.se.tag.temenos.com";
elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:complexType name="TestA">
        <xsd:sequence>
          <xsd:element name="data" type="xsd:int" minOccurs="0"
nillable="true" />
          <xsd:any minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:anyAttribute />
      </xsd:complexType>
    </xsd:schema>

How could I setup xFire to use the annotations ?

Thanks in advance,

Nicolas
--
View this message in context: 
http://www.nabble.com/jaxb2-binding-annotations-t1583178.html#a4296440
Sent from the XFire - Dev forum at Nabble.com.

Reply via email to