You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by vpl <vp...@gmail.com> on 2007/09/21 09:52:19 UTC
Axis2 POJO or RMI. Problem of new Class access from Client
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 ?
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
Re: Axis2 POJO or RMI. Problem of new Class access from Client
Posted by Amila Suriarachchi <am...@gmail.com>.
On 9/21/07, vpl <vp...@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.