[prev in list] [next in list] [prev in thread] [next in thread] 

List:       soap-user
Subject:    RE: Getting parameters
From:       Otto Fowler <ofowler () intellution ! com>
Date:       2000-12-26 15:24:41
[Download RAW message or body]

Hi,

I have used a java bean as a parameter, and it works fine.  



-----Original Message-----
From: Olivier Thomas [mailto:olivier.thomas.inexbee@wanadoo.fr]
Sent: Tuesday, December 26, 2000 3:38 PM
To: soap-user@xml.apache.org
Subject: Getting parameters


Hi,

This my first steps with SOAP.
When we invoke a remote method with the call.invoke method, we usually pass
the parameters by defining an object params fron the Vectors class.
ex:
	Vector Params = new Vector();
	params.addElement(new Parameter("country1", String.class, country1,
null);
	params.addElement(new Parameter("country2", String.class, country2,
null);
	call.setParams(params);

When the remote method is defined, we should declare its parameters that
match exactly those passed before.

ex:
	public float getRate(String country1, String country2);

My problem is that I have a lot of arguments to pass to my program and I
don't imagine declaring so many arguments in my method declaration.
Is there another way to do that ?
One solution would be to pass an objet as a parameter. Is it possible to do
that ?
Also I would like to know if insteaf of calling a method we can create an
object and play woth the possibility to have several constructors.
My client runs in VB and my server is SOAP Apache in Java.
Maybe these questions relate to RMI...

Thanks for your comments,
Olivier.

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2652.35">
<TITLE>RE: Getting parameters</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi,</FONT>
</P>

<P><FONT SIZE=2>I have used a java bean as a parameter, and it works fine.&nbsp; \
</FONT> </P>
<BR>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Olivier Thomas [<A \
HREF="mailto:olivier.thomas.inexbee@wanadoo.fr">mailto:olivier.thomas.inexbee@wanadoo.fr</A>]</FONT>
 <BR><FONT SIZE=2>Sent: Tuesday, December 26, 2000 3:38 PM</FONT>
<BR><FONT SIZE=2>To: soap-user@xml.apache.org</FONT>
<BR><FONT SIZE=2>Subject: Getting parameters</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi,</FONT>
</P>

<P><FONT SIZE=2>This my first steps with SOAP.</FONT>
<BR><FONT SIZE=2>When we invoke a remote method with the call.invoke method, we \
usually pass</FONT> <BR><FONT SIZE=2>the parameters by defining an object params fron \
the Vectors class.</FONT> <BR><FONT SIZE=2>ex:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>Vector Params = new \
Vector();</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>params.addElement(new Parameter(&quot;country1&quot;, String.class, country1, \
null);</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>params.addElement(new Parameter(&quot;country2&quot;, String.class, country2, \
null);</FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT \
SIZE=2>call.setParams(params);</FONT> </P>

<P><FONT SIZE=2>When the remote method is defined, we should declare its parameters \
that</FONT> <BR><FONT SIZE=2>match exactly those passed before.</FONT>
</P>

<P><FONT SIZE=2>ex:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>public float \
getRate(String country1, String country2);</FONT> </P>

<P><FONT SIZE=2>My problem is that I have a lot of arguments to pass to my program \
and I</FONT> <BR><FONT SIZE=2>don't imagine declaring so many arguments in my method \
declaration.</FONT> <BR><FONT SIZE=2>Is there another way to do that ?</FONT>
<BR><FONT SIZE=2>One solution would be to pass an objet as a parameter. Is it \
possible to do</FONT> <BR><FONT SIZE=2>that ?</FONT>
<BR><FONT SIZE=2>Also I would like to know if insteaf of calling a method we can \
create an</FONT> <BR><FONT SIZE=2>object and play woth the possibility to have \
several constructors.</FONT> <BR><FONT SIZE=2>My client runs in VB and my server is \
SOAP Apache in Java.</FONT> <BR><FONT SIZE=2>Maybe these questions relate to \
RMI...</FONT> </P>

<P><FONT SIZE=2>Thanks for your comments,</FONT>
<BR><FONT SIZE=2>Olivier.</FONT>
</P>

</BODY>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic