You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jeffrey Ng <je...@d-strategy.net> on 2006/05/29 10:04:40 UTC
setting 'holders' or 'sequence'
I am using the Axis source codes -> samples\stock codes from Axis setup
as a base to start my coding.
There are the following codes in the GetQuote.java program:
call.setTargetEndpointAddress( url );
call.setOperationName( new QName("urn:xmltoday-delayed-quotes",
"getQuote") );
call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_FLOAT );
In this case, <symbol>XXX</symbol> will be sent to the remote web
service.
I have 2 questions here.
1) How do i add params such that the symbols have children/sequence?
i.e. I want to sent symbol as
<symbol>
<id>12</id>
<name>xxx</name>
<value>999</value>
</symbol>
2) How do i set the return values to more than 1 value? i might need to
get a couple of response values from the remote side rather than 1 float
value.
Are there any examples on the net that i can refer to?
thanks in advance.
best regards,
Jeffrey.
RE: setting 'holders' or 'sequence'
Posted by Jeffrey Ng <je...@d-strategy.net>.
Hi Anne,
Thanks for the reply. But I am quite a newbie in axis programming. Can u
point out to me what are the advanced samples? I look thru quite a bit
but did not see anything that I can re-use.
Thanks,
Jeffk.
-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com]
Sent: Monday, May 29, 2006 9:46 PM
To: axis-user@ws.apache.org
Subject: Re: setting 'holders' or 'sequence'
In Java you must define "symbol" as a bean, and in XML schema, you must
define "symbol" as a complex type. Likewise, you can define the return
value to by a bean or an array.
Take a look at a few of the more advanced samples.
Anne
On 5/29/06, Jeffrey Ng <je...@d-strategy.net> wrote:
I am using the Axis source codes -> samples\stock codes from Axis setup
as a base to start my coding.
There are the following codes in the GetQuote.java program:
call.setTargetEndpointAddress( url );
call.setOperationName( new QName("urn:xmltoday-delayed-quotes",
"getQuote") );
call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_FLOAT );
In this case, <symbol>XXX</symbol> will be sent to the remote web
service.
I have 2 questions here.
1) How do i add params such that the symbols have children/sequence?
i.e. I want to sent symbol as
<symbol>
<id>12</id>
<name>xxx</name>
<value>999</value>
</symbol>
2) How do i set the return values to more than 1 value? i might need to
get a couple of response values from the remote side rather than 1 float
value.
Are there any examples on the net that i can refer to?
thanks in advance.
best regards,
Jeffrey.
Re: setting 'holders' or 'sequence'
Posted by Anne Thomas Manes <at...@gmail.com>.
In Java you must define "symbol" as a bean, and in XML schema, you must
define "symbol" as a complex type. Likewise, you can define the return value
to by a bean or an array.
Take a look at a few of the more advanced samples.
Anne
On 5/29/06, Jeffrey Ng <je...@d-strategy.net> wrote:
>
> I am using the Axis source codes -> samples\stock codes from Axis setup
> as a base to start my coding.
>
> There are the following codes in the GetQuote.java program:
> *call.setTargetEndpointAddress**( url );
> call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote")
> );
> call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
> call.setReturnType( XMLType.XSD_FLOAT );*
>
> In this case, <symbol>XXX</symbol> will be sent to the remote web service.
>
>
> I have 2 questions here.
> 1) How do i add params such that the symbols have children/sequence?
> i.e. I want to sent symbol as
> <symbol>
> <id>12</id>
> <name>xxx</name>
> <value>999</value>
> </symbol>
> 2) How do i set the return values to more than 1 value? i might need to
> get a couple of response values from the remote side rather than 1 float
> value.
>
> Are there any examples on the net that i can refer to?
>
>
> thanks in advance.
>
>
>
> best regards,
>
> Jeffrey.
>
>
>