0 Replies Latest reply on Jun 9, 2010 8:51 AM by Andrea Previati

    Strange behaviour on WebService annotated class

    Andrea Previati Newbie

      Hello,
      i'm developing en EJB3 module on JBoss 5.1.10. It contains several beans with relative webservice class using @WebService() annotation.
      My dev environment is NetBeans 6.8 on Winxp; i also have a test environment on a linux server.
      It works all fine except for an operation: on my Winxp server instance, there's a missing complex type in the wsdl exposed, but the same EAR deployed on the test linux server works fine.

      Let me explain with a scrap of source:

       

      EJB source:

       

      public MessageListResponse getSentMessages(Integer limit, Integer offset) {
      ...

       

      DTO sources:

       

      public class MessageListResponse extends Response implements Serializable, Cloneable {

       

          private static final long serialVersionUID = -8044091577142524000L;
         
          private List<Message> messages = null;

       

          public MessageListResponse() {
          }

       

          public MessageListResponse(List<Message> messages) {
              this.messages = messages;
          }

       

          ...getters+setters...
         
      ----------------

       

      public class Response implements Serializable, Cloneable {

       

          private static final long serialVersionUID = -5113231551096825487L;

       

          private Boolean error = false;
          private Boolean warning = false;
          private Boolean info = false;
          private String errorMsg = null;
          private String warningMsg = null;
          private String infoMsg = null;
         
          ...getters+setters...


      WS class source:

       

      @WebMethod(operationName = "getSentMessages")
      public MessageListResponse getSentMessages(@WebParam(name = "limit")
      Integer limit, @WebParam(name = "offset")
      Integer offset) {
          return ejbRef.getSentMessages(limit, offset);
      }

       

      Ok. Take a look at the generated wsdl:

       

      WSDL generated on localhost (winxp):

       

      <xs:complexType name='getSentMessagesResponse'>
          <xs:sequence>
              <xs:element minOccurs='0' name='return' type='tns:response'/>
          </xs:sequence>
      </xs:complexType>

       

      WSDL generated on test env (linux):

       

      <xs:complexType name='getSentMessagesResponse'>
          <xs:sequence>
              <xs:element minOccurs='0' name='return' type='tns:messageListResponse'/>
          </xs:sequence>
      </xs:complexType>

       

      Any ideas?

      Need more infos about platform/dev environment?
      Thankyou very much.