You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "c.jones" <jo...@magma.ca> on 2001/10/03 20:49:11 UTC
Soap messa
Hello all,
I need some clarification. I am relatively new to SOAP development and am unable to
differentiate between two scenarios...
I have a client java class which invokes a call across SOAP and calls a method of a
particular class with its respective parameters. now, in the examples, ive seen this
parameter passing done two ways (there are probably more, however).
1) the method on the server side is implemented with the parameters as they are set in
the parameters vector, for example
call.setMethodName("MyMethod");
Vector params = new Vector();
Parameter nameParam = new Parameter("name", java.lang.String.class, name, null);
params.addElement(nameParam);
nameParam = new Parameter("othername", java.lang.String.class, name2, null);
params.addElement(nameParam);
call.setParams(params);
... then the call is invoked.
Now on the server side, the method MyMethod would be
public String MyMethod (String name1, String name2) throwing appropriate exceptions
2) the second case, the same scenario is used above, except that the method on the server
side would be implemented as
public String MyMethod(Envelope env, SOAPContext reqCtx, SOAPContext resCtx) throwing
appropriate exceptions
how do these two scenarios differ?
thanks,
cj.
Re: Soap messa
Posted by Bob Cotton <bc...@synxis.com>.
>>>>> "cj" == c jones <jo...@magma.ca> writes:
cj> Hello all, I need some clarification. I am relatively new to
cj> SOAP development and am unable to differentiate between two
cj> scenarios...
cj> I have a client java class which invokes a call across SOAP
cj> and calls a method of a particular class with its respective
cj> parameters. now, in the examples, ive seen this parameter
cj> passing done two ways (there are probably more, however).
cj> 1) the method on the server side is implemented with the
cj> parameters as they are set in
cj> the parameters vector, for example
cj> call.setMethodName("MyMethod"); Vector params = new Vector();
cj> Parameter nameParam = new Parameter("name",
cj> java.lang.String.class, name, null);
cj> params.addElement(nameParam);
cj> nameParam = new Parameter("othername", java.lang.String.class,
cj> name2, null); params.addElement(nameParam);
cj> call.setParams(params);
cj> ... then the call is invoked. Now on the server side, the
cj> method MyMethod would be public String MyMethod (String name1,
cj> String name2) throwing appropriate exceptions
cj> 2) the second case, the same scenario is used above, except
cj> that the method on the server
cj> side would be implemented as public String MyMethod(Envelope
cj> env, SOAPContext reqCtx, SOAPContext resCtx) throwing
cj> appropriate exceptions
cj> how do these two scenarios differ?
Scenario 1 is referred to as SOAP-RPC.
Scenario 2 is referred to as SOAP-Messaging.
SOAP-RPC is just that, Remote Procedure Call. It has special encoding
rules.
Soap Messaging is just moving a body of XML from one place to
another. This XML can look like anything you want.
At least that's how I understand it.
- Bob
--
SynXis Corporation | bob@synxis.com | Obstacles are those frightful
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | things you see when you take your
Denver, CO 80202 | Fax:(303)534-4257 | eyes off your goal. -Henry Ford
Re: Soap messa
Posted by Bob Cotton <bc...@synxis.com>.
>>>>> "cj" == c jones <jo...@magma.ca> writes:
cj> Hello all, I need some clarification. I am relatively new to
cj> SOAP development and am unable to differentiate between two
cj> scenarios...
cj> I have a client java class which invokes a call across SOAP
cj> and calls a method of a particular class with its respective
cj> parameters. now, in the examples, ive seen this parameter
cj> passing done two ways (there are probably more, however).
cj> 1) the method on the server side is implemented with the
cj> parameters as they are set in
cj> the parameters vector, for example
cj> call.setMethodName("MyMethod"); Vector params = new Vector();
cj> Parameter nameParam = new Parameter("name",
cj> java.lang.String.class, name, null);
cj> params.addElement(nameParam);
cj> nameParam = new Parameter("othername", java.lang.String.class,
cj> name2, null); params.addElement(nameParam);
cj> call.setParams(params);
cj> ... then the call is invoked. Now on the server side, the
cj> method MyMethod would be public String MyMethod (String name1,
cj> String name2) throwing appropriate exceptions
cj> 2) the second case, the same scenario is used above, except
cj> that the method on the server
cj> side would be implemented as public String MyMethod(Envelope
cj> env, SOAPContext reqCtx, SOAPContext resCtx) throwing
cj> appropriate exceptions
cj> how do these two scenarios differ?
Scenario 1 is referred to as SOAP-RPC.
Scenario 2 is referred to as SOAP-Messaging.
SOAP-RPC is just that, Remote Procedure Call. It has special encoding
rules.
Soap Messaging is just moving a body of XML from one place to
another. This XML can look like anything you want.
At least that's how I understand it.
- Bob
--
SynXis Corporation | bob@synxis.com | Obstacles are those frightful
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | things you see when you take your
Denver, CO 80202 | Fax:(303)534-4257 | eyes off your goal. -Henry Ford
RE: Soap messa
Posted by Francis Ho <fh...@post.com>.
hi c!,
I think what your are asking is the difference between SOAP-RPC and
SOAP-Messaging.
The first scenario that you outline is a remote procedure call (RPC).
In the second scenario, you are describing a server side message service.
Additionally, to send a message on the client side, you would use an-end
point servlet such as
http://localhost/soap/servlet/messagerouter. This is not the same as the
RPC-router used in the first scenario. Once the message is passed to the
messag service. Processing of the message can take place asynchronously and
you have a lot of freedom in which you do with the SOAP envelope.
The best metaphors is that the first scenario (SOAP-RPC) is akin to using
RMI and the SOAP-messaging is closer to JMS.
francis
>> -----Original Message-----
>> From: c.jones [mailto:jonesc@magma.ca]
>> Sent: Wednesday, October 03, 2001 2:49 PM
>> To: soap-user@xml.apache.org
>> Subject: Soap messa
>>
>>
>> Hello all,
>>
>> I need some clarification. I am relatively new to SOAP
>> development and am unable to
>> differentiate between two scenarios...
>>
>> I have a client java class which invokes a call across SOAP and
>> calls a method of a
>> particular class with its respective parameters. now, in the
>> examples, ive seen this
>> parameter passing done two ways (there are probably more, however).
>> 1) the method on the server side is implemented with the
>> parameters as they are set in
>> the parameters vector, for example
>>
>> call.setMethodName("MyMethod");
>> Vector params = new Vector();
>>
>> Parameter nameParam = new Parameter("name",
>> java.lang.String.class, name, null);
>> params.addElement(nameParam);
>>
>> nameParam = new Parameter("othername", java.lang.String.class,
>> name2, null);
>> params.addElement(nameParam);
>>
>> call.setParams(params);
>>
>> ... then the call is invoked.
>> Now on the server side, the method MyMethod would be
>> public String MyMethod (String name1, String name2) throwing
>> appropriate exceptions
>>
>> 2) the second case, the same scenario is used above, except that
>> the method on the server
>> side would be implemented as
>> public String MyMethod(Envelope env, SOAPContext reqCtx,
>> SOAPContext resCtx) throwing
>> appropriate exceptions
>>
>> how do these two scenarios differ?
>>
>> thanks,
>> cj.
>>
>>
>>
RE: Soap messa
Posted by Francis Ho <fh...@post.com>.
hi c!,
I think what your are asking is the difference between SOAP-RPC and
SOAP-Messaging.
The first scenario that you outline is a remote procedure call (RPC).
In the second scenario, you are describing a server side message service.
Additionally, to send a message on the client side, you would use an-end
point servlet such as
http://localhost/soap/servlet/messagerouter. This is not the same as the
RPC-router used in the first scenario. Once the message is passed to the
messag service. Processing of the message can take place asynchronously and
you have a lot of freedom in which you do with the SOAP envelope.
The best metaphors is that the first scenario (SOAP-RPC) is akin to using
RMI and the SOAP-messaging is closer to JMS.
francis
>> -----Original Message-----
>> From: c.jones [mailto:jonesc@magma.ca]
>> Sent: Wednesday, October 03, 2001 2:49 PM
>> To: soap-user@xml.apache.org
>> Subject: Soap messa
>>
>>
>> Hello all,
>>
>> I need some clarification. I am relatively new to SOAP
>> development and am unable to
>> differentiate between two scenarios...
>>
>> I have a client java class which invokes a call across SOAP and
>> calls a method of a
>> particular class with its respective parameters. now, in the
>> examples, ive seen this
>> parameter passing done two ways (there are probably more, however).
>> 1) the method on the server side is implemented with the
>> parameters as they are set in
>> the parameters vector, for example
>>
>> call.setMethodName("MyMethod");
>> Vector params = new Vector();
>>
>> Parameter nameParam = new Parameter("name",
>> java.lang.String.class, name, null);
>> params.addElement(nameParam);
>>
>> nameParam = new Parameter("othername", java.lang.String.class,
>> name2, null);
>> params.addElement(nameParam);
>>
>> call.setParams(params);
>>
>> ... then the call is invoked.
>> Now on the server side, the method MyMethod would be
>> public String MyMethod (String name1, String name2) throwing
>> appropriate exceptions
>>
>> 2) the second case, the same scenario is used above, except that
>> the method on the server
>> side would be implemented as
>> public String MyMethod(Envelope env, SOAPContext reqCtx,
>> SOAPContext resCtx) throwing
>> appropriate exceptions
>>
>> how do these two scenarios differ?
>>
>> thanks,
>> cj.
>>
>>
>>