You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by David Oppenheimer <da...@gmail.com> on 2005/08/25 03:07:08 UTC
XmlRpcClient execute for vector of string parameters produces incorrect XML on the wire?
Hi. When I do the following
XmlRpcClient xmlrpc = new XmlRpcClient("...");
Vector params = new Vector();
params.add(new String("hello"));
xmlrpc.execute("function_name", params);
I notice that what goes out over the wire is
<param><value>hello</value></param>
instead of
<param><value><string>hello</string></value></param>
Note that if I replace "new String("hello"))" with "new Integer(5)" in
the above, then I get the correct text on the wire, namely
<param><value><int>5</int></value></param>
Does anyone know why the <string> tag is being dropped? This might
work if you're using the Apache XMLRPC server, but I'm using a
different server and it is rejecting this formatting since it is
expecting a string argument.
Thanks very much for any suggestions,
David
Re: XmlRpcClient execute for vector of string parameters produces incorrect XML on the wire?
Posted by David Oppenheimer <da...@gmail.com>.
That would explain it. :-)
Thanks, guys!
David
On 8/24/05, Adam Taft <ad...@hydroblaster.com> wrote:
>
> Right, from: http://www.xmlrpc.com/spec
>
> "If no type is indicated, the type is string."
>
>
> rich coco wrote:
> > i believe <string> is the default, as defined by the xmlpc protocol.any
> > xmlrpc-compliant server will treat such data as 'string'.
>
Re: XmlRpcClient execute for vector of string parameters produces
incorrect XML on the wire?
Posted by Adam Taft <ad...@hydroblaster.com>.
Right, from: http://www.xmlrpc.com/spec
"If no type is indicated, the type is string."
rich coco wrote:
> i believe <string> is the default, as defined by the xmlpc protocol.any
> xmlrpc-compliant server will treat such data as 'string'.
RE: XmlRpcClient execute for vector of string parameters produces incorrect XML on the wire?
Posted by John Southerland <jo...@southerland-consulting.com>.
Sorry about that, I was drinking and may have dialed the wrong number.
I am dirinking now and may be typing the wrong words as well.
I will try to call you tomorrow :)
John Buren Southerland
Southerland Consulting
801.467.8090(office)
214.734.8099(cell)
john@southerland-consulting.com
-----Original Message-----
From: rich coco [mailto:racoco@starbak.com]
Sent: Wednesday, August 24, 2005 10:15 PM
To: xmlrpc-user@ws.apache.org
Subject: Re: XmlRpcClient execute for vector of string parameters produces
incorrect XML on the wire?
i believe <string> is the default, as defined by the xmlpc protocol.any
xmlrpc-compliant server will treat such data as 'string'.
David Oppenheimer wrote:
>Hi. When I do the following
>
>XmlRpcClient xmlrpc = new XmlRpcClient("...");
>Vector params = new Vector();
>params.add(new String("hello"));
>xmlrpc.execute("function_name", params);
>
>I notice that what goes out over the wire is
>
><param><value>hello</value></param>
>
>instead of
>
><param><value><string>hello</string></value></param>
>
>Note that if I replace "new String("hello"))" with "new Integer(5)" in
>the above, then I get the correct text on the wire, namely
>
><param><value><int>5</int></value></param>
>
>Does anyone know why the <string> tag is being dropped? This might
>work if you're using the Apache XMLRPC server, but I'm using a
>different server and it is rejecting this formatting since it is
>expecting a string argument.
>
>Thanks very much for any suggestions,
>David
>
>
Re: XmlRpcClient execute for vector of string parameters produces
incorrect XML on the wire?
Posted by rich coco <ra...@starbak.com>.
i believe <string> is the default, as defined by the xmlpc protocol.any
xmlrpc-compliant server will treat such data as 'string'.
David Oppenheimer wrote:
>Hi. When I do the following
>
>XmlRpcClient xmlrpc = new XmlRpcClient("...");
>Vector params = new Vector();
>params.add(new String("hello"));
>xmlrpc.execute("function_name", params);
>
>I notice that what goes out over the wire is
>
><param><value>hello</value></param>
>
>instead of
>
><param><value><string>hello</string></value></param>
>
>Note that if I replace "new String("hello"))" with "new Integer(5)" in
>the above, then I get the correct text on the wire, namely
>
><param><value><int>5</int></value></param>
>
>Does anyone know why the <string> tag is being dropped? This might
>work if you're using the Apache XMLRPC server, but I'm using a
>different server and it is rejecting this formatting since it is
>expecting a string argument.
>
>Thanks very much for any suggestions,
>David
>
>