2 Replies Latest reply on Feb 16, 2011 3:14 AM by jan piel

    Can't create Web Service for JBOSS

    Sam W Expert

      Hello,

       

      With Eclipse 3.6 EE Developer, I tried to create a Web Service from an EJB class for JBOSS 6.0, but it failed with the following statement:

      ========================================

       

      The service class "au.com.housewareonline.dao.facade.RoleFacade" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.

      The method "create" on the service class "au.com.housewareonline.dao.facade.RoleFacade" is overloaded. Overloaded methods are allowed by chapter 5.5.5 of the JAX-RPC 1.1 specification, however, some JAX-RPC 1.1 compliant tools may not allow overloaded methods or may generate WSDL with overloaded operations as contrary to rule R2304 of the WS-I Basic Profile.

      The method "find" on the service class "au.com.housewareonline.dao.facade.RoleFacade" uses a data type, "java.lang.Object", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.

      The method "findAll" on the service class "au.com.housewareonline.dao.facade.RoleFacade" uses a data type, "java.util.List", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.

      The method "findRange" on the service class "au.com.housewareonline.dao.facade.RoleFacade" uses a data type, "java.util.List", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.

      ==========================================

       

      This EJB class is copied from the one I created in Netbeans. When I used Netbeans to create a web services, there is no problem at all.

       

      Can anyone tell me what causes this issue?

      What kind of Web Services does Eclipse required from an EJB class and how to make it deployable to JBOSS?

       

      Your suggestion would be appreciated.

       

      SS

        • 1. Can't create Web Service for JBOSS
          jaikiran pai Master

          Those error messages clearly say what's wrong.

          • 2. Can't create Web Service for JBOSS
            jan piel Newbie

            I use JBoss 5.1 but I think you have to consider the following points:

             

            1. Complexe classes as a return type must implement java.io.Serializable

            2. If you want to return lists, then change the return type to an array and convert the list with a statement like this:

             

            SomeObject[] arr = (SomeObject[]) list

                                .toArray(new SomeObject[list.size()]);

             

            In eclipse you will retrieve a pattern for this command with 'toarray'

             

            And Overloading is unfortunately not allowed.

             

            Hope it helps.