Yes, if you are going to programmatically instantiate the HTTPService, then you 
need to build the request object and invoke the send() in as as well.  The 
request xml snippet you show is for defining the request object in declaritive 
mxml.

 

Either way, when you sent the request object to the HTTPService url, it sends 
the data as name=value pairs, in the querystring for the "get" method and in 
the header for the "post" method (get is default).

 

Another way to set up a send in AS is like this:

var oRequest:Object = new Object();

oRequest.myprop = myval;

oRequest.myprop2 = myval2;

xmlrpc.send(oRequest);

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Dimitrios Gianninas
Sent: Tuesday, March 13, 2007 8:49 AM
To: [email protected]
Subject: RE: [flexcoders] Using HTTPService programmatically?

 

I believe you can do:

 

var o:Object = new Object();

o.myprop = myval;

 

xmlrpc.request = o;

 

Dimitrios Gianninas

Developer

Optimal Payments Inc.

 

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Alexandre Lemaire
Sent: Tuesday, March 13, 2007 2:05 AM
To: [email protected]
Subject: Re: [flexcoders] Using HTTPService programmatically?

I've found this which was a big help:

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001140.html
 
<http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001140.html>
 

 

Doesn't say what the parameters Object is though - any finger in the right 
direction would be appreciated.

 

<request>

    <data>xyz</data>

</request>

 

is sent as??

 

 

        ----- Original Message ----- 

        From: Alexandre Lemaire <mailto:[EMAIL PROTECTED]>  

        To: [email protected] <mailto:[email protected]>  

        Sent: Tuesday, March 13, 2007 1:01 AM

        Subject: [flexcoders] Using HTTPService programmatically?

         

        Sorry for the flurry of questions, am making some good headway (Flex is 
fantastic).

         

        Is it possible to use HTTPService programmatically?

         

        I see that I can do:

         

        var xmlrpc:HTTPService = new HTTPService();

        xmlrpc.url = etc..

         

        and all of the good standard options we usually put in the mxml file 
otherwise, however, I'm not quite sure how to format the 'request' parameter, 
nor how to specify the 'result' callback function.

         

        Help much appreciated.

        Alex

AVIS IMPORTANT

WARNING

Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé. L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système. La lecture, la distribution, la copie ou tout 
autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.

This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient. No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message. If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system. The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful. If you have received this e-mail in error, please notify the 
sender.

 

Reply via email to