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.



Reply via email to