3 Replies Latest reply on Nov 9, 2006 4:39 AM by micho

    annotation for return class

    micho

      Hello,

      what annotation I have to define for an Class I want to use as returnvalue or parameter for my webservice.

      @WebMethod
       public returnClass method1(String a, paramClass b)


      Is it required to define Interfaces for the returnvalue or parameter Class

        • 1. Re: annotation for return class
          atamur

           

          "micho" wrote:
          Hello,

          what annotation I have to define for an Class I want to use as returnvalue or parameter for my webservice.

          @WebMethod
           public returnClass method1(String a, paramClass b)


          Is it required to define Interfaces for the returnvalue or parameter Class
          Nope, you don't need any annotation, but this class should implement Serializable interface

          • 2. Re: annotation for return class
            micho

            Hi

            returnClass implements Serializable, but calling the webservice

            ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation, serviceName);

            throws the following exception.

            org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://server/jaws}returnClass




            • 3. Re: annotation for return class
              micho

              An additional Info.
              With a "standard" java Client everything works fine.
              The Problem occurs, if I try to use it as a Webservice.