You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Dylan J Browne <dy...@lanergy.com> on 2001/06/26 13:00:49 UTC

Running with separate SOAP stacks?

Hi,

This is a difficult question to put into words, especially as I am new-ish
to SOAP, but I'll try....

All the examples given with SOAP2.2, and all the others I can find on the
web, are run using a single SOAP implementation(Ie on one machine). EG in
the AddressBook, the calling/instantion of GetAddress performs the
registering of the required objects, creating the other objects that are
needed on the same SOAP stack. What I am looking to do is run SOAP to
provide communication between two physically distinct devices, (joined by,
probably, ethernet). So using the AddressBook example, I would want to
create a number of Address objects and add them to the AddressBook in a
class called, for example, AddressBookInit which would be created on a
device, eg device1.

Then I would want to create a GetAddress example on another device, device2,
and for it to run (as it does in the example), to retrieve a given field, or
all fields, or whatever, from my AddressBook on device1.

I have tried to modify the AddressBook example to suit my needs, but have
been struggling for a couple of days. I'm fairly sure my problem lies in the
registering of my Objects or services. I create the initial AddressBook,
populate it with Addresses, and thats fine. But I am not sure of how I
register it, (and also alllow my remote instance of GetAddress to know the
details of this registry). I continually get "Null" faults from a Fault Code
of server, which I assume means it has no handle on the registry of my
objects.

I hope that made sense, almost certainly not....

Any help at all would be met with enormous waves of gratitude, (even
pointing me at some examples that demonstrate this)....

Thanks very much.





Accessing SOAP-Header on the server side

Posted by Kam Fung <Ka...@Sun.COM>.
Hi,

Does anyone have a suggestion on accessing the Header on the server side in
Apache-SOAP?  I don't think it can be navigated from SOAPContext, right?

Kam.


Accessing SOAP-Header on the server side

Posted by Kam Fung <Ka...@Sun.COM>.
Hi,

Does anyone have a suggestion on accessing the Header on the server side in
Apache-SOAP?  I don't think it can be navigated from SOAPContext, right?

Kam.


Re: Rephrased: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
>These are clients
> so they can talk to the service AddressBook from any machine, and it will
be
> initialized (with 0 records, if you've removed the addEntry lines) as soon
as
> any client does so.

I guess this is what I was trying to get around, I wanted the initialisation
to occur before the client made contact. Its not a major thing, but was just
trying it to understand the code better.

>    It might be better to edit the AddressBook constructor so it calls on
your
> utility code, though, to populate the address book within the same JVM.
Surely
> in anything realistic you'd be using a database of some sort?

Absolutely. Thanks for the help. (Again!)

Cheers.


Re: Rephrased: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
>These are clients
> so they can talk to the service AddressBook from any machine, and it will
be
> initialized (with 0 records, if you've removed the addEntry lines) as soon
as
> any client does so.

I guess this is what I was trying to get around, I wanted the initialisation
to occur before the client made contact. Its not a major thing, but was just
trying it to understand the code better.

>    It might be better to edit the AddressBook constructor so it calls on
your
> utility code, though, to populate the address book within the same JVM.
Surely
> in anything realistic you'd be using a database of some sort?

Absolutely. Thanks for the help. (Again!)

Cheers.


Re: Rephrased: Running with separate SOAP stacks?

Posted by Tom Myers <to...@dreamscape.com>.
At 03:15 PM 6/26/2001 +0100, Dylan J Browne wrote:


>In the example the AddressBook is self populating, it doesnt exist and isnt
>populated until I run GetAddress... (is this right?).

or PutAddress, or PutListings, or any of the other clients...


>What I want to do is remove the creation of AddressBook, (and its
>population), into a separate class that I can run (with a main method) so I
>know the AddressBook exists and is populated. So I've removed the addEntry
>lines from AddressBook constructor, so I can do it in my own separate class.
>Then I want to run GetAddress and talk to *that* AddressBook that I've
>already created and populated, but it tells me the AddressBook is null, IE
>it cant find the one that I've just created.....

Don't create a separate AddressBook object, just run PutAddress or PutListings,
editted as you please to add as many records as you please. These are clients
so they can talk to the service AddressBook from any machine, and it will be
initialized (with 0 records, if you've removed the addEntry lines) as soon as
any client does so. 
   It might be better to edit the AddressBook constructor so it calls on your
utility code, though, to populate the address book within the same JVM. Surely
in anything realistic you'd be using a database of some sort? 

Tom Myers


Re: Rephrased: Running with separate SOAP stacks?

Posted by Tom Myers <to...@dreamscape.com>.
At 03:15 PM 6/26/2001 +0100, Dylan J Browne wrote:


>In the example the AddressBook is self populating, it doesnt exist and isnt
>populated until I run GetAddress... (is this right?).

or PutAddress, or PutListings, or any of the other clients...


>What I want to do is remove the creation of AddressBook, (and its
>population), into a separate class that I can run (with a main method) so I
>know the AddressBook exists and is populated. So I've removed the addEntry
>lines from AddressBook constructor, so I can do it in my own separate class.
>Then I want to run GetAddress and talk to *that* AddressBook that I've
>already created and populated, but it tells me the AddressBook is null, IE
>it cant find the one that I've just created.....

Don't create a separate AddressBook object, just run PutAddress or PutListings,
editted as you please to add as many records as you please. These are clients
so they can talk to the service AddressBook from any machine, and it will be
initialized (with 0 records, if you've removed the addEntry lines) as soon as
any client does so. 
   It might be better to edit the AddressBook constructor so it calls on your
utility code, though, to populate the address book within the same JVM. Surely
in anything realistic you'd be using a database of some sort? 

Tom Myers


Rephrased: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
Ok. Try again. I was well off the mark earlier.   :o|

In the example the AddressBook is self populating, it doesnt exist and isnt
populated until I run GetAddress... (is this right?).

What I want to do is remove the creation of AddressBook, (and its
population), into a separate class that I can run (with a main method) so I
know the AddressBook exists and is populated. So I've removed the addEntry
lines from AddressBook constructor, so I can do it in my own separate class.
Then I want to run GetAddress and talk to *that* AddressBook that I've
already created and populated, but it tells me the AddressBook is null, IE
it cant find the one that I've just created.....

Thanks hugely again for any help...

Cheers.



----- Original Message -----
From: "Tom Myers" <to...@dreamscape.com>
To: <so...@xml.apache.org>
Cc: "soap" <so...@xml.apache.org>
Sent: Tuesday, June 26, 2001 1:17 PM
Subject: Re: Running with separate SOAP stacks?


> At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
> >Hi,
> >
> >This is a difficult question to put into words, especially as I am
new-ish
> >to SOAP, but I'll try....
> >
> >All the examples given with SOAP2.2, and all the others I can find on the
> >web, are run using a single SOAP implementation(Ie on one machine)...
>
> >  .....So using the AddressBook example, I would want to
> >create a number of Address objects ....which would be created on a
> >device, eg device1.
> >
> >Then I would want to create a GetAddress example on another device,
device2
> ...
>
> I'm not sure what you mean by saying that the examples run on one machine.
> The AddressBook objec, as part of the service, does need to be deployed on
> one particular machine, the server for that service; that service carries
> with it a JVM with a classpath, and samples.addressbook.AddressBook needs
> to be available to that JVM on that machine. However, when you run the
> PutAddress and GetAddress and so on, they communicate with the server via
> http, so they can live on device2, device3, .. deviceN, and the service
> (i.e., the AddressBook object, with whatever Address objects it contains)
> does not know and does not care.  Thus I have no trouble running a SOAP
> service on this machine and a client on another machine connected via
> ethernet...but maybe I'm just not understanding the difficulty.
>
> Tom Myers
>
>

Rephrased: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
Ok. Try again. I was well off the mark earlier.   :o|

In the example the AddressBook is self populating, it doesnt exist and isnt
populated until I run GetAddress... (is this right?).

What I want to do is remove the creation of AddressBook, (and its
population), into a separate class that I can run (with a main method) so I
know the AddressBook exists and is populated. So I've removed the addEntry
lines from AddressBook constructor, so I can do it in my own separate class.
Then I want to run GetAddress and talk to *that* AddressBook that I've
already created and populated, but it tells me the AddressBook is null, IE
it cant find the one that I've just created.....

Thanks hugely again for any help...

Cheers.



----- Original Message -----
From: "Tom Myers" <to...@dreamscape.com>
To: <so...@xml.apache.org>
Cc: "soap" <so...@xml.apache.org>
Sent: Tuesday, June 26, 2001 1:17 PM
Subject: Re: Running with separate SOAP stacks?


> At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
> >Hi,
> >
> >This is a difficult question to put into words, especially as I am
new-ish
> >to SOAP, but I'll try....
> >
> >All the examples given with SOAP2.2, and all the others I can find on the
> >web, are run using a single SOAP implementation(Ie on one machine)...
>
> >  .....So using the AddressBook example, I would want to
> >create a number of Address objects ....which would be created on a
> >device, eg device1.
> >
> >Then I would want to create a GetAddress example on another device,
device2
> ...
>
> I'm not sure what you mean by saying that the examples run on one machine.
> The AddressBook objec, as part of the service, does need to be deployed on
> one particular machine, the server for that service; that service carries
> with it a JVM with a classpath, and samples.addressbook.AddressBook needs
> to be available to that JVM on that machine. However, when you run the
> PutAddress and GetAddress and so on, they communicate with the server via
> http, so they can live on device2, device3, .. deviceN, and the service
> (i.e., the AddressBook object, with whatever Address objects it contains)
> does not know and does not care.  Thus I have no trouble running a SOAP
> service on this machine and a client on another machine connected via
> ethernet...but maybe I'm just not understanding the difficulty.
>
> Tom Myers
>
>

Re: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
I think my misunderstanding comes from how SOAP works.... after what you've
said, I should be able to run my stuff as is.... I'll try to achieve what I
want to again for a couple of days and re-post if I have any further
trouble.

(Sorry, ignore my previous mail for now).

Cheers.


----- Original Message -----
From: "Tom Myers" <to...@dreamscape.com>
To: <so...@xml.apache.org>
Cc: "soap" <so...@xml.apache.org>
Sent: Tuesday, June 26, 2001 1:17 PM
Subject: Re: Running with separate SOAP stacks?


> At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
> >Hi,
> >
> >This is a difficult question to put into words, especially as I am
new-ish
> >to SOAP, but I'll try....
> >
> >All the examples given with SOAP2.2, and all the others I can find on the
> >web, are run using a single SOAP implementation(Ie on one machine)...
>
> >  .....So using the AddressBook example, I would want to
> >create a number of Address objects ....which would be created on a
> >device, eg device1.
> >
> >Then I would want to create a GetAddress example on another device,
device2
> ...
>
> I'm not sure what you mean by saying that the examples run on one machine.
> The AddressBook objec, as part of the service, does need to be deployed on
> one particular machine, the server for that service; that service carries
> with it a JVM with a classpath, and samples.addressbook.AddressBook needs
> to be available to that JVM on that machine. However, when you run the
> PutAddress and GetAddress and so on, they communicate with the server via
> http, so they can live on device2, device3, .. deviceN, and the service
> (i.e., the AddressBook object, with whatever Address objects it contains)
> does not know and does not care.  Thus I have no trouble running a SOAP
> service on this machine and a client on another machine connected via
> ethernet...but maybe I'm just not understanding the difficulty.
>
> Tom Myers
>
>

Re: Running with separate SOAP stacks?

Posted by Dylan J Browne <dy...@lanergy.com>.
I think my misunderstanding comes from how SOAP works.... after what you've
said, I should be able to run my stuff as is.... I'll try to achieve what I
want to again for a couple of days and re-post if I have any further
trouble.

(Sorry, ignore my previous mail for now).

Cheers.


----- Original Message -----
From: "Tom Myers" <to...@dreamscape.com>
To: <so...@xml.apache.org>
Cc: "soap" <so...@xml.apache.org>
Sent: Tuesday, June 26, 2001 1:17 PM
Subject: Re: Running with separate SOAP stacks?


> At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
> >Hi,
> >
> >This is a difficult question to put into words, especially as I am
new-ish
> >to SOAP, but I'll try....
> >
> >All the examples given with SOAP2.2, and all the others I can find on the
> >web, are run using a single SOAP implementation(Ie on one machine)...
>
> >  .....So using the AddressBook example, I would want to
> >create a number of Address objects ....which would be created on a
> >device, eg device1.
> >
> >Then I would want to create a GetAddress example on another device,
device2
> ...
>
> I'm not sure what you mean by saying that the examples run on one machine.
> The AddressBook objec, as part of the service, does need to be deployed on
> one particular machine, the server for that service; that service carries
> with it a JVM with a classpath, and samples.addressbook.AddressBook needs
> to be available to that JVM on that machine. However, when you run the
> PutAddress and GetAddress and so on, they communicate with the server via
> http, so they can live on device2, device3, .. deviceN, and the service
> (i.e., the AddressBook object, with whatever Address objects it contains)
> does not know and does not care.  Thus I have no trouble running a SOAP
> service on this machine and a client on another machine connected via
> ethernet...but maybe I'm just not understanding the difficulty.
>
> Tom Myers
>
>

Re: Running with separate SOAP stacks?

Posted by Tom Myers <to...@dreamscape.com>.
At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
>Hi,
>
>This is a difficult question to put into words, especially as I am new-ish
>to SOAP, but I'll try....
>
>All the examples given with SOAP2.2, and all the others I can find on the
>web, are run using a single SOAP implementation(Ie on one machine)...

>  .....So using the AddressBook example, I would want to
>create a number of Address objects ....which would be created on a
>device, eg device1.
>
>Then I would want to create a GetAddress example on another device, device2
...

I'm not sure what you mean by saying that the examples run on one machine.
The AddressBook objec, as part of the service, does need to be deployed on
one particular machine, the server for that service; that service carries
with it a JVM with a classpath, and samples.addressbook.AddressBook needs 
to be available to that JVM on that machine. However, when you run the
PutAddress and GetAddress and so on, they communicate with the server via
http, so they can live on device2, device3, .. deviceN, and the service
(i.e., the AddressBook object, with whatever Address objects it contains)
does not know and does not care.  Thus I have no trouble running a SOAP
service on this machine and a client on another machine connected via
ethernet...but maybe I'm just not understanding the difficulty. 

Tom Myers


Re: Running with separate SOAP stacks?

Posted by Tom Myers <to...@dreamscape.com>.
At 12:00 PM 6/26/2001 +0100, Dylan J Browne wrote:
>Hi,
>
>This is a difficult question to put into words, especially as I am new-ish
>to SOAP, but I'll try....
>
>All the examples given with SOAP2.2, and all the others I can find on the
>web, are run using a single SOAP implementation(Ie on one machine)...

>  .....So using the AddressBook example, I would want to
>create a number of Address objects ....which would be created on a
>device, eg device1.
>
>Then I would want to create a GetAddress example on another device, device2
...

I'm not sure what you mean by saying that the examples run on one machine.
The AddressBook objec, as part of the service, does need to be deployed on
one particular machine, the server for that service; that service carries
with it a JVM with a classpath, and samples.addressbook.AddressBook needs 
to be available to that JVM on that machine. However, when you run the
PutAddress and GetAddress and so on, they communicate with the server via
http, so they can live on device2, device3, .. deviceN, and the service
(i.e., the AddressBook object, with whatever Address objects it contains)
does not know and does not care.  Thus I have no trouble running a SOAP
service on this machine and a client on another machine connected via
ethernet...but maybe I'm just not understanding the difficulty. 

Tom Myers