You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Matthew Sell <ms...@ontimesupport.com> on 2004/07/08 20:55:42 UTC

Response data type not given

Hello,


I hope this is just a stupid question, but I have a simple application 
that exposes methods using the XML-RPC built-in webserver, and 
connecting to it using a PHP XML-RPC client library. I've been having 
some difficulties within PHP, and turned on a debugging function in my 
application that displays the response to a method call.

The particular method I'm calling returns a Java data type of "String", 
but the response from the XML-RPC webserver is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
    <params>
        <param>
            <value>blahblahblah</value>
        </param>
    </params>
</methodResponse>

Notice the "value" without "string".

The PHP library is returning the following error:  " faultCode 2 
faultString Invalid return payload: enabling debugging to examine 
incoming payload "

So...

It seems as though Apache XML-RPC is not specifying the data type in the 
return value, and the PHP client library is puking on that.

Any ideas on why the response does not specify data type of "string" ? 
We have been using this implementation with the Apache XML-RPC client, 
and a Javascript client without problems, using this same method.

Thanks!


    - Matt


 




-- 

-------------------------
Matthew Sell
Programmer
UNIX System Administrator
On Time Support, Inc.
www.ontimesupport.com

Join the Metrology Software Discussion List METLIST!
http://www.ontimesupport.com/metlist.html


Growing old is mandatory; growing up is optional.
Today's mighty oak is just yesterday's nut that held its ground.



Re: Response data type not given

Posted by Matthew Sell <ms...@ontimesupport.com>.
Eric,


I did some more investigation on my end, and found that I had the PHP 
client library (PHP XMLRPC) pointing to the wrong port on my application.

: (

I have one port receiving requests using the XML-RPC webserver, and 
another on port 80 that expects POST requests and appropriate responses 
(it accepts XML-RPC as well). I had the PHP library pointing at port 80 
and it was puking on the additional response headers. Once I pointed it 
at the other port, everything seems to be working fine.

Sorry for the message - I was focusing too much on the missing "string" 
tag, and not catching the obvious.



    - Matt


>You may want to contact the people who wrote the offending client libraries
>and let them know that their implementation does not fully satisfy the
>specification.  It seems like a really big issue considering that the xmlrpc
>spec is so simple itself ;)  It also doesn't seem like it would be that
>difficult for them to fix.
>
>Eric Westfall
>
>  
>


-- 

-------------------------
Matthew Sell
Programmer
UNIX System Administrator
On Time Support, Inc.
www.ontimesupport.com

Join the Metrology Software Discussion List METLIST!
http://www.ontimesupport.com/metlist.html


Growing old is mandatory; growing up is optional.
Today's mighty oak is just yesterday's nut that held its ground.



Re: Response data type not given

Posted by Eric Westfall <ew...@mailcan.com>.
> Robert,
>
>
> Thanks for the heads-up - I checked the spec at xmlrpc.com and you are
> indeed correct.
>
> I wonder if it would be a good idea to be able to set an option to force
> responses containing Strings to explicitly state the data type, to help
> out client libraries that are not working yet to spec?
>

You may want to contact the people who wrote the offending client libraries
and let them know that their implementation does not fully satisfy the
specification.  It seems like a really big issue considering that the xmlrpc
spec is so simple itself ;)  It also doesn't seem like it would be that
difficult for them to fix.

Eric Westfall


Re: Response data type not given

Posted by Matthew Sell <ms...@ontimesupport.com>.
Robert,


Thanks for the heads-up - I checked the spec at xmlrpc.com and you are 
indeed correct.

I wonder if it would be a good idea to be able to set an option to force 
responses containing Strings to explicitly state the data type, to help 
out client libraries that are not working yet to spec?

Yes - kludge, but just throwing it out there.

Thanks again!


    - Matt



Robert.Mattler@AngleBar.com wrote:

>
> I'm pretty sure that String is the default if no other type is returned.
>


-- 

-------------------------
Matthew Sell
Programmer
UNIX System Administrator
On Time Support, Inc.
www.ontimesupport.com

Join the Metrology Software Discussion List METLIST!
http://www.ontimesupport.com/metlist.html


Growing old is mandatory; growing up is optional.
Today's mighty oak is just yesterday's nut that held its ground.



Re: Response data type not given

Posted by Ro...@AngleBar.com.
I'm pretty sure that String is the default if no other type is returned.




Matthew Sell <ms...@ontimesupport.com> 
07/08/2004 02:55 PM
Please respond to
xmlrpc-user@ws.apache.org


To
xmlrpc-user@ws.apache.org
cc

Subject
Response data type not given






Hello,


I hope this is just a stupid question, but I have a simple application 
that exposes methods using the XML-RPC built-in webserver, and 
connecting to it using a PHP XML-RPC client library. I've been having 
some difficulties within PHP, and turned on a debugging function in my 
application that displays the response to a method call.

The particular method I'm calling returns a Java data type of "String", 
but the response from the XML-RPC webserver is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
    <params>
        <param>
            <value>blahblahblah</value>
        </param>
    </params>
</methodResponse>

Notice the "value" without "string".

The PHP library is returning the following error:  " faultCode 2 
faultString Invalid return payload: enabling debugging to examine 
incoming payload "

So...

It seems as though Apache XML-RPC is not specifying the data type in the 
return value, and the PHP client library is puking on that.

Any ideas on why the response does not specify data type of "string" ? 
We have been using this implementation with the Apache XML-RPC client, 
and a Javascript client without problems, using this same method.

Thanks!


    - Matt


 




-- 

-------------------------
Matthew Sell
Programmer
UNIX System Administrator
On Time Support, Inc.
www.ontimesupport.com

Join the Metrology Software Discussion List METLIST!
http://www.ontimesupport.com/metlist.html


Growing old is mandatory; growing up is optional.
Today's mighty oak is just yesterday's nut that held its ground.