it receives it as post. here is the result and a snippet from the php code:

Note that there is nothing in these requests.

Contents of $_GET:

Contents of $_POST:

Contents of $_COOKIE:

Contents of $_REQUEST:

Contents of $_SERVER:
  ...
  REQUEST_METHOD = POST
  QUERY_STRING =
  ...

  // from php file
  foreach ($_SERVER as $k => $v) {
     print "   $k = $v\n";
  }


I can send you the full output offlist.

On 6/8/07, Peter Farland <[EMAIL PROTECTED]> wrote:

   Did the PHP page see the method as GET or POST?

 ------------------------------
*From:* [email protected] [mailto:[EMAIL PROTECTED] *On
Behalf Of *dorkie dork from dorktown
*Sent:* Thursday, June 07, 2007 10:06 PM
*To:* [email protected]
*Subject:* Re: [flexcoders]Faking an XMLRPC call

 Hi Peter,

I'm using srv.send(). I posted to a PHP page that dumps the submitted
value and it looks like it goes through because I get the xml back (in a
single line).

So what does this all mean? Can a HTTPService call over http talk to a
xml-rpc page like the one used on Wordpress blogs? If you have a blog you
should be able to change the url to point to your blog and get the same
results.



On 6/7/07, Peter Farland <[EMAIL PROTECTED]> wrote:
>
>    I'd check with an HTTP sniffer to see just what exactly is being sent
> on the wire for the body of the request.
>
> There are two known issues with the Flash Player XML type that
> HTTPService does not work around correctly in 2.0. The scenario is that
> if an XML value is provided as the body of a POST and that value has only
> empty, simple content (i.e. no child elements, just the empty string),
> then because toString() is called on the value when serializing it, the
> first known issue is hit where by the root elements are unwrapped and only
> the simple content is sent, i.e. the empty string. The second issue is
> that if you try to send no content with POST, the underlying URLLoader
> changes this back to GET.
>
> The reason I suggest using an HTTP sniffer is perhaps while you think
> you've provided a correct <mx:request>, perhaps it's not being actually sent
> as such? How are you calling send() on the HTTP service?
>
> Pete
>
>
>  ------------------------------
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *dorkie dork from dorktown
> *Sent:* Thursday, June 07, 2007 4:00 AM
> *To:* [email protected]
> *Subject:* [flexcoders]Faking an XMLRPC call
>
>   Is there a way to fake an XML RPC call? It seems like it'd be simple
> but I can't get it to work:
>
>     <mx:HTTPService id="srv"
>         url=" http://www.judahfrangipane.com/blog/xmlrpc.php";
>         fault="{faultHandler(event)}"
>         result="{resultHandler(event)}"
>         resultFormat="text"
>         method="POST"
>         contentType="application/xml">
>         <mx:request>
>             <methodCall>
>                 <methodName>metaWeblog.getPost</methodName>
>                 <params>
>                     <param><value><string>77</string></value></param>
>
> <param><value><string>visitor</string></value></param>
>
> <param><value><string>visitor</string></value></param>
>                 </params>
>             </methodCall>
>         </mx:request>
>     </mx:HTTPService>
>
> The result I get is "XML-RPC server accepts POST requests only."
>
> FYI I'm calling a wordpress blog.
>
>

Reply via email to