You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Evan Jehu <ev...@codepit.ca> on 2002/04/02 06:13:01 UTC

pass by reference in Axis

Is it possible to pass a remote reference using SOAP and Axis?  I would like
to establish a publisher-subscriber style relationship between a client
(which implements a listener interface) and an Axis web service.

I have created the web service class, event class (Serializable) and event
listener interface (modeled on SWING) but WSDL2Java creates a class for the
listener interface when I really need to pass a reference to the client for
the service to call when events occur.

Also is it possible to operate in the other direction, could a web service
create a new object which it passes as a remote reference to the client and
if so how could you do it?

I hope this is not a trivial question, I am still new to SOAP, totally
stumped and would appreciate the help.

Thanks

Evan


Re: pass by reference in Axis

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Evan Jehu" <ev...@codepit.ca>
To: <ax...@xml.apache.org>
Sent: Tuesday, April 02, 2002 7:11 AM
Subject: Re: pass by reference in Axis


> Sorry, I may have become sidetracked.
>
> Passing the clients IP/FQDN:port to the server to allow callback would
> effectively make the client a web service in itself?  To set this up would
I
> need to run the axis servlet (and servlet engine) on the client side as
> well, or is it possible to run a more minimal system there?

if the server needs to reopen a connection, then yes.

And then firewall problems come into play, NAT, etc.


> My thought was, could using Jabber solve the direct IP addressing and DNS
> lookup problems when the client is behind a masqueraded internet
connection
> or firewall?

Yup. I have seen it done a last week:
http://www.razorsoft.net/weblog/2002/03/27.html

 "SOAP over HTTP is so 5 minutes ago"







Re: pass by reference in Axis

Posted by Jim Dixon <jd...@dixons.org>.
On Tue, 2 Apr 2002, Evan Jehu wrote:

> Sorry, I may have become sidetracked.
>
> Passing the clients IP/FQDN:port to the server to allow callback would
> effectively make the client a web service in itself?

Indeed.

It isn't clear exactly what you are trying to accomplish.  The key
question is whether the client-server connection is going to be dropped.

If it is, then the client needs to pass back enough information to
allow a connection to be re-established.  This is at least the
IP/FQDN:port.  The client is going to have to listen for connections
on the port, so, yes, it's acting as a server as well.

>                                                  To set this up would I
> need to run the axis servlet (and servlet engine) on the client side as
> well, or is it possible to run a more minimal system there?

"How long is a piece of string?"  ;-)

It's impossible to answer the question without knowing more about your
intended application.  You say that the server will be publishing
information to multiple clients.  What protocol will you be using for
sending the information out?  What is the client doing with it?

Writing a minimal server to, say, receive information and store it to
a database is easy enough.  However, if you want it to appear on a
pop-up window, then perhaps yes using Jabber would make sense.

> My thought was, could using Jabber solve the direct IP addressing and DNS
> lookup problems when the client is behind a masqueraded internet connection
> or firewall?
>
> Evan
>
>
> ----- Original Message -----
> From: "Jim Dixon" <jd...@dixons.org>
> To: <ax...@xml.apache.org>
> Sent: Tuesday, April 02, 2002 09:44
> Subject: Re: pass by reference in Axis
>
>
> > On Tue, 2 Apr 2002, Evan Jehu wrote:
> >
> > > Would it be possible to do something like SOAP over Jabber (the open
> source
> > > chat system) this could allow a 2 way 'conversation' between the client
> and
> > > server?
> > >
> > > If you think that could work? is so any thoughts on how it could be
> > > implemented?
> >
> > The original question had to do with passing a remote reference, which
> > would be used to enable the server to publish information to a number
> > of clients.
> >
> > In the simplest approach, both parties understand how the information
> > is going to be structured.  In this case, the client just has to tell
> > the server how to reach it, so the client only has to tell the server
> > where to send the information.  This is most easily specified as
> > FQDN:port or ipAddress:port.
> >
> > If the structure isn't certain, the client could send to the server
> > FQDN:port plus a WSDL description of the communication.
> >
> > Or am I missing something?
> >
> > > Evan
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jim Dixon" <jd...@dixons.org>
> > > To: <ax...@xml.apache.org>
> > > Sent: Tuesday, April 02, 2002 09:10
> > > Subject: Re: pass by reference in Axis
> > >
> > >
> > > > On Tue, 2 Apr 2002, Steve Loughran wrote:
> > > >
> > > > > > Is it possible to pass a remote reference using SOAP and Axis?  I
> > > would
> > > > > like
> > > > > > to establish a publisher-subscriber style relationship between a
> > > client
> > > > > > (which implements a listener interface) and an Axis web service.
> > > > > >
> > > > > > I have created the web service class, event class (Serializable)
> and
> > > event
> > > > > > listener interface (modeled on SWING) but WSDL2Java creates a
> class
> > > for
> > > > > the
> > > > > > listener interface when I really need to pass a reference to the
> > > client
> > > > > for
> > > > > > the service to call when events occur.
> > > > > >
> > > > > > Also is it possible to operate in the other direction, could a web
> > > service
> > > > > > create a new object which it passes as a remote reference to the
> > > client
> > > > > and
> > > > > > if so how could you do it?
> > > > >
> > > > > do you meant that you want to do callbacks from a SOAP service to
> the
> > > > > client?
> > > > >
> > > > > If that is the case there is no easy solution at all, not one that
> works
> > > > > over HTTP and through firewalls and things. You need polling, or
> > > different
> > > > > transports like STMP somewhere in the solution.
> > > >
> > > > Couldn't he accomplish what he needs to do by passing to the server
> > > > the fully qualified domain name + the port he would be listening on?
> > > >
> > > > --
> > > > Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373
> 7881
> > > > ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer
> jdd@vbc.net --------
> > > >
> > > >
> > >
> > >
> >
> > --
> > Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
> > ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------
> >
>
>

--
Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------


Re: pass by reference in Axis

Posted by Evan Jehu <ev...@codepit.ca>.
Sorry, I may have become sidetracked.

Passing the clients IP/FQDN:port to the server to allow callback would
effectively make the client a web service in itself?  To set this up would I
need to run the axis servlet (and servlet engine) on the client side as
well, or is it possible to run a more minimal system there?

My thought was, could using Jabber solve the direct IP addressing and DNS
lookup problems when the client is behind a masqueraded internet connection
or firewall?

Evan


----- Original Message -----
From: "Jim Dixon" <jd...@dixons.org>
To: <ax...@xml.apache.org>
Sent: Tuesday, April 02, 2002 09:44
Subject: Re: pass by reference in Axis


> On Tue, 2 Apr 2002, Evan Jehu wrote:
>
> > Would it be possible to do something like SOAP over Jabber (the open
source
> > chat system) this could allow a 2 way 'conversation' between the client
and
> > server?
> >
> > If you think that could work? is so any thoughts on how it could be
> > implemented?
>
> The original question had to do with passing a remote reference, which
> would be used to enable the server to publish information to a number
> of clients.
>
> In the simplest approach, both parties understand how the information
> is going to be structured.  In this case, the client just has to tell
> the server how to reach it, so the client only has to tell the server
> where to send the information.  This is most easily specified as
> FQDN:port or ipAddress:port.
>
> If the structure isn't certain, the client could send to the server
> FQDN:port plus a WSDL description of the communication.
>
> Or am I missing something?
>
> > Evan
> >
> >
> > ----- Original Message -----
> > From: "Jim Dixon" <jd...@dixons.org>
> > To: <ax...@xml.apache.org>
> > Sent: Tuesday, April 02, 2002 09:10
> > Subject: Re: pass by reference in Axis
> >
> >
> > > On Tue, 2 Apr 2002, Steve Loughran wrote:
> > >
> > > > > Is it possible to pass a remote reference using SOAP and Axis?  I
> > would
> > > > like
> > > > > to establish a publisher-subscriber style relationship between a
> > client
> > > > > (which implements a listener interface) and an Axis web service.
> > > > >
> > > > > I have created the web service class, event class (Serializable)
and
> > event
> > > > > listener interface (modeled on SWING) but WSDL2Java creates a
class
> > for
> > > > the
> > > > > listener interface when I really need to pass a reference to the
> > client
> > > > for
> > > > > the service to call when events occur.
> > > > >
> > > > > Also is it possible to operate in the other direction, could a web
> > service
> > > > > create a new object which it passes as a remote reference to the
> > client
> > > > and
> > > > > if so how could you do it?
> > > >
> > > > do you meant that you want to do callbacks from a SOAP service to
the
> > > > client?
> > > >
> > > > If that is the case there is no easy solution at all, not one that
works
> > > > over HTTP and through firewalls and things. You need polling, or
> > different
> > > > transports like STMP somewhere in the solution.
> > >
> > > Couldn't he accomplish what he needs to do by passing to the server
> > > the fully qualified domain name + the port he would be listening on?
> > >
> > > --
> > > Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373
7881
> > > ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer
jdd@vbc.net --------
> > >
> > >
> >
> >
>
> --
> Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
> ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------
>


Re: pass by reference in Axis

Posted by Jim Dixon <jd...@dixons.org>.
On Tue, 2 Apr 2002, Evan Jehu wrote:

> Would it be possible to do something like SOAP over Jabber (the open source
> chat system) this could allow a 2 way 'conversation' between the client and
> server?
>
> If you think that could work? is so any thoughts on how it could be
> implemented?

The original question had to do with passing a remote reference, which
would be used to enable the server to publish information to a number
of clients.

In the simplest approach, both parties understand how the information
is going to be structured.  In this case, the client just has to tell
the server how to reach it, so the client only has to tell the server
where to send the information.  This is most easily specified as
FQDN:port or ipAddress:port.

If the structure isn't certain, the client could send to the server
FQDN:port plus a WSDL description of the communication.

Or am I missing something?

> Evan
>
>
> ----- Original Message -----
> From: "Jim Dixon" <jd...@dixons.org>
> To: <ax...@xml.apache.org>
> Sent: Tuesday, April 02, 2002 09:10
> Subject: Re: pass by reference in Axis
>
>
> > On Tue, 2 Apr 2002, Steve Loughran wrote:
> >
> > > > Is it possible to pass a remote reference using SOAP and Axis?  I
> would
> > > like
> > > > to establish a publisher-subscriber style relationship between a
> client
> > > > (which implements a listener interface) and an Axis web service.
> > > >
> > > > I have created the web service class, event class (Serializable) and
> event
> > > > listener interface (modeled on SWING) but WSDL2Java creates a class
> for
> > > the
> > > > listener interface when I really need to pass a reference to the
> client
> > > for
> > > > the service to call when events occur.
> > > >
> > > > Also is it possible to operate in the other direction, could a web
> service
> > > > create a new object which it passes as a remote reference to the
> client
> > > and
> > > > if so how could you do it?
> > >
> > > do you meant that you want to do callbacks from a SOAP service to the
> > > client?
> > >
> > > If that is the case there is no easy solution at all, not one that works
> > > over HTTP and through firewalls and things. You need polling, or
> different
> > > transports like STMP somewhere in the solution.
> >
> > Couldn't he accomplish what he needs to do by passing to the server
> > the fully qualified domain name + the port he would be listening on?
> >
> > --
> > Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
> > ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------
> >
> >
>
>

--
Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------


Re: pass by reference in Axis

Posted by Evan Jehu <ev...@codepit.ca>.
Would it be possible to do something like SOAP over Jabber (the open source
chat system) this could allow a 2 way 'conversation' between the client and
server?

If you think that could work? is so any thoughts on how it could be
implemented?

Evan


----- Original Message -----
From: "Jim Dixon" <jd...@dixons.org>
To: <ax...@xml.apache.org>
Sent: Tuesday, April 02, 2002 09:10
Subject: Re: pass by reference in Axis


> On Tue, 2 Apr 2002, Steve Loughran wrote:
>
> > > Is it possible to pass a remote reference using SOAP and Axis?  I
would
> > like
> > > to establish a publisher-subscriber style relationship between a
client
> > > (which implements a listener interface) and an Axis web service.
> > >
> > > I have created the web service class, event class (Serializable) and
event
> > > listener interface (modeled on SWING) but WSDL2Java creates a class
for
> > the
> > > listener interface when I really need to pass a reference to the
client
> > for
> > > the service to call when events occur.
> > >
> > > Also is it possible to operate in the other direction, could a web
service
> > > create a new object which it passes as a remote reference to the
client
> > and
> > > if so how could you do it?
> >
> > do you meant that you want to do callbacks from a SOAP service to the
> > client?
> >
> > If that is the case there is no easy solution at all, not one that works
> > over HTTP and through firewalls and things. You need polling, or
different
> > transports like STMP somewhere in the solution.
>
> Couldn't he accomplish what he needs to do by passing to the server
> the fully qualified domain name + the port he would be listening on?
>
> --
> Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
> ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------
>
>


Re: pass by reference in Axis

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Jim Dixon" <jd...@dixons.org>
To: <ax...@xml.apache.org>
Sent: Tuesday, April 02, 2002 6:10 AM
Subject: Re: pass by reference in Axis

> > do you meant that you want to do callbacks from a SOAP service to the
> > client?
> >
> > If that is the case there is no easy solution at all, not one that works
> > over HTTP and through firewalls and things. You need polling, or
different
> > transports like STMP somewhere in the solution.
>
> Couldn't he accomplish what he needs to do by passing to the server
> the fully qualified domain name + the port he would be listening on?

only if the caller is visible to the server, running its own web server of
some sort or other, and having a constant hostname (i.e. not a roaming ipv4
laptop)

All that ws-routing stuff is about sending events back to things through a
firewall and to dynamically pick a destination; the IM protocols work as the
IM servers are effectively as acting as callback endpoints outside the
firewall.





Re: pass by reference in Axis

Posted by Jim Dixon <jd...@dixons.org>.
On Tue, 2 Apr 2002, Steve Loughran wrote:

> > Is it possible to pass a remote reference using SOAP and Axis?  I would
> like
> > to establish a publisher-subscriber style relationship between a client
> > (which implements a listener interface) and an Axis web service.
> >
> > I have created the web service class, event class (Serializable) and event
> > listener interface (modeled on SWING) but WSDL2Java creates a class for
> the
> > listener interface when I really need to pass a reference to the client
> for
> > the service to call when events occur.
> >
> > Also is it possible to operate in the other direction, could a web service
> > create a new object which it passes as a remote reference to the client
> and
> > if so how could you do it?
>
> do you meant that you want to do callbacks from a SOAP service to the
> client?
>
> If that is the case there is no easy solution at all, not one that works
> over HTTP and through firewalls and things. You need polling, or different
> transports like STMP somewhere in the solution.

Couldn't he accomplish what he needs to do by passing to the server
the fully qualified domain name + the port he would be listening on?

--
Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881
---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@vbc.net --------


Re: pass by reference in Axis

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Evan Jehu" <ev...@codepit.ca>
To: "axis user mailing list" <ax...@xml.apache.org>
Sent: Monday, April 01, 2002 8:13 PM
Subject: pass by reference in Axis


> Is it possible to pass a remote reference using SOAP and Axis?  I would
like
> to establish a publisher-subscriber style relationship between a client
> (which implements a listener interface) and an Axis web service.
>
> I have created the web service class, event class (Serializable) and event
> listener interface (modeled on SWING) but WSDL2Java creates a class for
the
> listener interface when I really need to pass a reference to the client
for
> the service to call when events occur.
>
> Also is it possible to operate in the other direction, could a web service
> create a new object which it passes as a remote reference to the client
and
> if so how could you do it?

do you meant that you want to do callbacks from a SOAP service to the
client?

If that is the case there is no easy solution at all, not one that works
over HTTP and through firewalls and things. You need polling, or different
transports like STMP somewhere in the solution.