1 Reply Latest reply on May 11, 2008 11:46 PM by Ron Sigal

    Problem with Web service method call using JBoss Remoting Cl

    raghavendra naik Newbie

      Hello,
      I have written a web service using jboss ws. I have exposed one of methods as follows:

      @WebMethod
       public String getDevDetails(@WebParam(name="dev") String devName)
       {
       String devDetails = null;
       try
       {
       if(null != devName)
       {
       devDetails = genericAccess.getDeviceDetails(devName);
       }
       }
       catch (DAOException e)
       {
       e.printStackTrace();
       }
       return devDetails ;
       }
      
      


      Now in the above method instead of returning a string object i want to return a user defined object of type DeviceDetails say devObj as follows.


      @WebMethod
       public DeviceDetails getDevDetails(@WebParam(name="dev") String devName)
      {
       DeviceDetails devObj = null;
       devObj = access.getDevDetails(devName);
      
       return devObj;
      }
      


      How do i achieve this ?

      And my client code makes use of jboss remoting apis to invoke the above method.

      InvokerLocator locator = new InvokerLocator(protocol + host_address + port);
       if(null == remotingClient)
       {
       remotingClient = new Client(locator);
       }
       remotingClient.connect();
      Object response = remotingClient.invoke(soapMessage);
      


      Here the response i get is SOAP response. But i am expecting an object of type DeviceDetails as a response.
      How do i achieve this ?

      Someone please help me .. :(

      Thanks
      R.Naik