[jboss-user] [Remoting] - Problem with Web service method call using JBoss Remoting Cl

rknaik do-not-reply at jboss.com
Wed May 7 06:59:24 EDT 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149058#4149058

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149058



More information about the jboss-user mailing list