axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: Axis2 POJO or RMI. Problem of new Class access from Client
Date Mon, 24 Sep 2007 04:57:25 GMT
On 9/21/07, vpl <vpl.profess@gmail.com> wrote:
>
>
> Hi,
>
> I'm facing a Axis2 POJO problem for which I need some support.
>
> My current problem is the following
> I would like to expose such Java class through Web service.
>
> public class MyService {
>
>     public IcUser logon() {
>         return new A_User("");
>     }
> }
> public class A_User {
>         private String userName ="";
>         public A_User(String user) {
>                 System.out.println("User:"+user+" created");
>                 userName = user;
>         }
>         public String getUserName() {
>                 return userName;
>         }
> }
>
>
> My current problem with POJO is that the logon method returns a new
> Object.
> When reading the Axis2 POJO documentation, such operation can be done only
> if the A_User has already been initialized by the Web-Service Client or
> initialized using Spring. This is clearly exposed in the 1.3 Axis POJO
> Guide.  In my case, this is the server which creates this new User.
>
> Question-1:
>         Am I right to consider that Axis2 POJO will not support such use
> case ? (in
> the version we have 1.3)
> Question-2:
>         Does the Axis2 rmi recently proposed in a nighbuild of Axis2 may
> support
> this use case ?


On thing,
In your service class  the return type is declared as IcUser and A_User is
not neither extended nor implement this interface.
Axis2 rmi supports this. you have to declare A_User as an extension class
1. at the server side using config.xml
2. at client using configurator object.
please see the rmi sample TestService4

Amila.

Could you clarify please ?
>
> Thanks very much for your support
>
> Cheers
>
> --
> View this message in context:
> http://www.nabble.com/Axis2-POJO-or-RMI.-Problem-of-new-Class-access-from-Client-tf4492378.html#a12812313
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message