|
|
|
start date: Sat, 21 Jul 2007 23:16:58 -0700,
posted on: microsoft.public.dotnet.framework.aspnet.webservices
back
| Thread Index |
|
1
unknown
|
|
2
John Saunders [MVP] john.saunders at trizetto.com
|
|
3
unknown
|
webservice servicing multiple object instances.
Hi,
I have a webservice that provides access to multiple object instances.
Now from client I want to channel the calls to specific objects. I
could think of 2 options
1. The url for the service could take in the objectId, some identifier
that identifies the object uniquely
e.g. MyServiceInst.Url = "http://MyServer/MyService?objId=2"
MyServiceInst.foo(arg1, arg2);
2. Add objectId argument for each method call in the service
e.g. MyServiceInst.foo(objectId, arg1, arg2);
I am wondering if there are any other options that I could use in this
context.
Thanks
Date:Sat, 21 Jul 2007 23:16:58 -0700
Author:
|
Re: webservice servicing multiple object instances.
wrote in message
news:1185085018.371578.51020@d55g2000hsg.googlegroups.com...
> Hi,
>
> I have a webservice that provides access to multiple object instances.
> Now from client I want to channel the calls to specific objects. I
> could think of 2 options
> 1. The url for the service could take in the objectId, some identifier
> that identifies the object uniquely
> e.g. MyServiceInst.Url = "http://MyServer/MyService?objId=2"
> MyServiceInst.foo(arg1, arg2);
> 2. Add objectId argument for each method call in the service
> e.g. MyServiceInst.foo(objectId, arg1, arg2);
>
> I am wondering if there are any other options that I could use in this
> context.
You're better off with the object id as a parameter for each call, or else
by putting the object id in a SOAP Header. That way, the header could be
filled in once by the client, and supplied to the server on each call.
I presume that you are aware of issues with simultaneous modification of
shared objects by multiple web service requests? Also, I assume that you've
taken web farms into account to the extent necessary.
--
John Saunders [MVP]
Date:Sun, 22 Jul 2007 17:05:28 -0400
Author:
|
Re: webservice servicing multiple object instances.
Thanks for your reply. This application was originally using CORBA and
does take care of the concurrency issues. In CORBA the a remote method
can return object references and I can call methods using the object
reference. But this mechanism wasn't directly available through SOAP/
WSDL (if it did it escaped my senses). Hence looking for an
alternative to fake this. So I would like to avoid adding objectid in
the method call, but if this is the only sane option, we will have to
do this.
But, in your reply you mentioned "putting the object id in a SOAP
Header". How do you do it from a client written in VS2005? Can you
give a small example.
Thanks
--
Rajan
>
> > Hi,
>
> > I have a webservice that provides access to multiple object instances.
> > Now from client I want to channel the calls to specific objects. I
> > could think of 2 options
> > 1. The url for the service could take in the objectId, some identifier
> > that identifies the object uniquely
> > e.g. MyServiceInst.Url = "http://MyServer/MyService?objId=2"
> > MyServiceInst.foo(arg1, arg2);
> > 2. Add objectId argument for each method call in the service
> > e.g. MyServiceInst.foo(objectId, arg1, arg2);
>
> > I am wondering if there are any other options that I could use in this
> > context.
>
> You're better off with the object id as a parameter for each call, or else
> by putting the object id in a SOAP Header. That way, the header could be
> filled in once by the client, and supplied to the server on each call.
>
> I presume that you are aware of issues with simultaneous modification of
> shared objects by multiple web service requests? Also, I assume that you've
> taken web farms into account to the extent necessary.
> --
> John Saunders [MVP]
Date:Mon, 23 Jul 2007 08:45:03 -0700
Author:
|
|
|