Return-Path: Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 49399 invoked by uid 500); 17 Jun 2003 12:33:15 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 49388 invoked from network); 17 Jun 2003 12:33:15 -0000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C334CC.9FDE3AE0" X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: RE: passing objects by reference in SOAP - How would it work? Date: Tue, 17 Jun 2003 05:33:15 -0700 Message-ID: <07EC20A3290A504EA73D914B4C08A48602720BFC@usmail14.informatica.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: passing objects by reference in SOAP - How would it work? Thread-Index: AcM0yJu5Lgr0XbClTnOU6hWhRzLKwwAA+0Ww From: "Agarwal, Naresh" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C334CC.9FDE3AE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Sergey, =20 The problem here is not the session (also most SOAP toolkits support = session via HTTP cookies and SOAP headers). The problem is that SOAP = does not support passing objects by reference (which is supported in = other distributed computing technoloies like DCOM and CORBA) =20 thanks, =20 Naresh Agarwal -----Original Message----- From: Sergey Beryozkin [mailto:sberyozkin@zandar.com] Sent: Tuesday, June 17, 2003 5:05 AM To: axis-dev@ws.apache.org Subject: Re: passing objects by reference in SOAP - How would it work? Hi, In most cases you don't want to do the same in SOAP. Often, a good = approach is to create a simple wrapper application which will handle = internally all the session-oriented staff.=20 With WSDL 1.2 you can GET a session first and then POST to it Cheers Sergey Beryozkin=20 ----- Original Message -----=20 From: Agarwal, Naresh =20 To: axis-dev@ws.apache.org=20 Sent: Tuesday, June 17, 2003 12:56 PM Subject: passing objects by reference in SOAP - How would it work? Hi A typical SDK is object-oriented and involves passing objects/data by references (pointers). This will work as long as the client using the = SDK is in the same address space of the SDK. However, if client and SDK (i.e., = the service which provides SDK functions) are in different address spaces, = then this will not work "AS IS", and we need some kind of marshalling/demarshalling mechanism used in DCOM and CORBA etc. How does such a thing will work in SOAP given the fact that SOAP does = NOT support passing objects by reference? Consider the example of a typical SDK given below: Z, A, B, C, D and E are some classes. a, b, c, d and e are instances of = A, B, C, D, E respectively. Classes Z, A, B, C, D and E have various = functions, which could be used for various purposes. consider the code below, which shows how to use a function "getE" of class E. ---------- A a =3D Z.getA(some parameters - p1) // getA is static function B b =3D a.getB(some parameters - p2) C c =3D b.getC(some parameters - p3) D d =3D c.getD(some parameters - p4) E e =3D d.getE(some parameters - p5) --------- Now if I wish to expose such a SDK as a WebService, then I cann't do = this "as is" because SOAP does not support passing objects by references. = Thus, I cannot expose "getA" function as WebService, as it returns instance of = class A, which inturn has functions (executed at service side), which return = other objects (like b) Thus AFAIK, the only way out is to expose a single function "getE", = which in turn will do all the stuff, i.e., getE(p1, p2, p3, p4, p5) { A a =3D Z.getA(p1) // getA is static function B b =3D a.getB(p2) C c =3D b.getC( p3) D d =3D c.getD(p4) E e =3D d.getE(p5) return e; } Is there a better way out? Or this is the only way to expose such = existing SDKs as Web Services? thanks & regards, Naresh Agarwal ------_=_NextPart_001_01C334CC.9FDE3AE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi = Sergey,
 
The problem here is = not the=20 session (also most SOAP toolkits support session via HTTP cookies and = SOAP=20 headers). The problem is that SOAP does not support passing objects by = reference=20 (which is supported in other distributed computing technoloies like DCOM = and=20 CORBA)
 
thanks,
 
Naresh=20 Agarwal
-----Original Message-----
From: Sergey Beryozkin=20 [mailto:sberyozkin@zandar.com]
Sent: Tuesday, June 17, 2003 = 5:05=20 AM
To: axis-dev@ws.apache.org
Subject: Re: passing = objects=20 by reference in SOAP - How would it work?

Hi,
In most cases you don't want to do the same in = SOAP. Often,=20 a good approach is to create a simple wrapper application which will = handle=20 internally all the session-oriented staff.
With WSDL 1.2 you can GET a session first and then = POST to=20 it
Cheers
Sergey Beryozkin 
----- Original Message -----
From:=20 Agarwal, Naresh
Sent: Tuesday, June 17, 2003 = 12:56=20 PM
Subject: passing objects by = reference=20 in SOAP - How would it work?

Hi

A typical SDK is = object-oriented=20 and involves passing objects/data by
references (pointers). This = will=20 work as long as the client using the SDK is
in the same address = space of=20 the SDK. However, if client and SDK (i.e., the
service which = provides SDK=20 functions) are in different address spaces, then
this will not = work "AS=20 IS", and we need some kind of
marshalling/demarshalling mechanism = used in=20 DCOM and CORBA etc.

How does such a thing will work in SOAP = given the=20 fact that SOAP does NOT
support passing objects by=20 reference?

Consider the example of a typical SDK given=20 below:

Z, A, B, C, D and E are some classes. a, b, c, d and e = are=20 instances of A,
B, C, D, E respectively. Classes Z, A, B, C, D = and E have=20 various functions,
which could be used for various purposes. = consider the=20 code below, which
shows how to use a function "getE" of class=20 E.

----------

A a =3D Z.getA(some parameters - p1) // = getA is=20 static function

B b =3D a.getB(some parameters - p2)

C = c =3D=20 b.getC(some parameters - p3)

D d =3D c.getD(some parameters - = p4)

E e =3D d.getE(some parameters - = p5)

---------

Now if=20 I wish to expose such a SDK as a WebService, then I cann't do = this
"as=20 is" because SOAP does not support passing objects by references. = Thus,=20 I
cannot expose "getA" function as WebService, as it returns = instance of=20 class
A, which inturn has functions (executed at service side), = which=20 return other
objects (like b)

Thus AFAIK, the only way out = is to=20 expose a single function "getE", which in
turn will do all the = stuff,=20 i.e.,

getE(p1, p2, p3, p4, p5) {

A a =3D Z.getA(p1) // = getA is=20 static function

B b =3D a.getB(p2)

C c =3D b.getC( = p3)

D d=20 =3D c.getD(p4)

E e =3D d.getE(p5)

return = e;

}

Is=20 there a better way out? Or this is the only way to expose such=20 existing
SDKs as Web Services?

thanks & = regards,

Naresh=20 = Agarwal


------_=_NextPart_001_01C334CC.9FDE3AE0--