Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-14 Thread Jon Bradley

Tracy,

Rock on. Thanks for the tips -- especially the login example using JSP.

I've got to look through our CMS though. All the pages are,  
technically, JSP pages, so this should be interesting to try out.


thanks again!

jon



On May 11, 2007, at 5:00 PM, Tracy Spratt wrote:



I have a simple example here, using either jsp or aspx.  The MD5  
example is for aspx only:


http://www.cflex.net/showfiledetails.cfm? 
ChannelID=1Object=FileobjectID=556




Tracy


Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-14 Thread Jon Bradley

James -

Cool, thanks for that. Are you using caringorn per chance?  Thinking  
about getting into that - I come from a more traditional AS2  
background and usually follow that type of development paradigm, but  
doing so in Flex 2 / AS3 is, at the moment, just a tad beyond my  
experience level.


cheers,

jon


On May 12, 2007, at 5:36 PM, James Ward wrote:
You can also use the HTTPService and integrate with JAAS pretty  
easily.
We do this in the Meldware Flex based email client. Here are a few  
code

snippets:




Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-12 Thread James Ward
You can also use the HTTPService and integrate with JAAS pretty easily.
We do this in the Meldware Flex based email client.  Here are a few code
snippets:

From Services.mxml:

mx:HTTPService id=loginService
url=j_security_check
showBusyCursor=true
useProxy=false/


From LoginDelegate.as:

public function login(user:UserVO):void
{
  var params:Object = new Object();
  params.j_username = user.username;
  params.j_password = user.password;
  var call:AsyncToken = service.send(params);
  call.addResponder(responder);
}

Hope that helps.

-James


On Fri, 2007-05-11 at 04:41 -0700, Jon Bradley wrote:
 On the same line of thought, since HTTPRequest seems to be one of the 
 answers to my problem, has anyone tried to perform user 
 authentication through that?
 
 The system we're developing uses servlets for all communication - but 
 it creates these dynamically as we define pages that contain 
 'portals' (every page is a dynamically created JSP page basically) in 
 the backend system.
 
 Am I correct to assume that if I can do a form post in an XHTML page, 
 I can convert that post to the HTTPRequest in Flex?
 
 thanks all!
 
 jon
 
 
 
 
  


Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-11 Thread Jon Bradley
Yea, probably a good thought.

I'm actually looking at Caringorn (sp?) as a solution to the service  
issues that I will probably run into in the near future.

At the moment, there are only two of us on the team developing this  
application we're working on, but I'm already aware of the use cases  
for Caringorn - and it definitely fits the bill from a development  
perspective.

thanks,

jon

 On May 10, 2007, at 5:26 PM, Persaud, Anthony wrote:
 Take a look at the HTTPService class.

 http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/HTTPService.html

 I prefer to use the pure actionscript interface to it than using  
 MXML – especially if you have a lot of services on the server.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-11 Thread Jon Bradley
On the same line of thought, since HTTPRequest seems to be one of the  
answers to my problem, has anyone tried to perform user  
authentication through that?

The system we're developing uses servlets for all communication - but  
it creates these dynamically as we define pages that contain  
'portals' (every page is a dynamically created JSP page basically) in  
the backend system.

Am I correct to assume that if I can do a form post in an XHTML page,  
I can convert that post to the HTTPRequest in Flex?

thanks all!

jon



RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-11 Thread Tracy Spratt
As I understand what you are asking, yes.  Do something like this:

Var oRequest:Object = new Object();

oRequest.myArg1 = myValue1;

oRequest.myArg2 = myValue2;

myHTTPService.send(oRequest);

 

myArg1 and 2 become posted form variables, normally accessible
server-side from the page Request object.

 

Some folks have tried to put credentials in the header, but not with
much success, I gather.

 

There is an AS3 class out there that does MD5 encryption.

 

I have a simple example here, using either jsp or aspx.  The MD5 example
is for aspx only:

http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectI
D=556

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Friday, May 11, 2007 7:42 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

 

On the same line of thought, since HTTPRequest seems to be one of the 
answers to my problem, has anyone tried to perform user 
authentication through that?

The system we're developing uses servlets for all communication - but 
it creates these dynamically as we define pages that contain 
'portals' (every page is a dynamically created JSP page basically) in 
the backend system.

Am I correct to assume that if I can do a form post in an XHTML page, 
I can convert that post to the HTTPRequest in Flex?

thanks all!

jon

 



[flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Jon Bradley
So...

I've got a backend server running Apache Tomcat and I've got the  
ability through our CMS to dynamically create gateways, and use an  
AJAX API to get information from them.

I've never used AJAX and I'm pretty new to Flex, so the question is  
how can I make the same type of call that an XMLHTTPRequest is making  
in Javascript, but rather do it in Flex? I really have no care for  
Javascript ... and see no need to use it unless I absolutely have to.  
I'd rather keep all my communication within Flex/Flash.

Maybe I'm overlooking something pretty obvious, but any pointers  
would be appreciated.

thanks!

jon



RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Alex Harui
flash.net.URLLoader



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, May 10, 2007 1:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XMLHTTPRequest in Flex instead of Javascript



So...

I've got a backend server running Apache Tomcat and I've got the 
ability through our CMS to dynamically create gateways, and use an 
AJAX API to get information from them.

I've never used AJAX and I'm pretty new to Flex, so the question is 
how can I make the same type of call that an XMLHTTPRequest is making 
in Javascript, but rather do it in Flex? I really have no care for 
Javascript ... and see no need to use it unless I absolutely have to. 
I'd rather keep all my communication within Flex/Flash.

Maybe I'm overlooking something pretty obvious, but any pointers 
would be appreciated.

thanks!

jon



 


RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Tracy Spratt
How about HTTPRequest?  Doesn't it actually use URLLoader underneath,
but is optimized for RPC data transport?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, May 10, 2007 4:55 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

 

flash.net.URLLoader

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, May 10, 2007 1:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

So...

I've got a backend server running Apache Tomcat and I've got the 
ability through our CMS to dynamically create gateways, and use an 
AJAX API to get information from them.

I've never used AJAX and I'm pretty new to Flex, so the question is 
how can I make the same type of call that an XMLHTTPRequest is making 
in Javascript, but rather do it in Flex? I really have no care for 
Javascript ... and see no need to use it unless I absolutely have to. 
I'd rather keep all my communication within Flex/Flash.

Maybe I'm overlooking something pretty obvious, but any pointers 
would be appreciated.

thanks!

jon

 



Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Jon Bradley

I love simple answers.

thanks man.  now I just have to figure out how to use it.



On May 10, 2007, at 4:54 PM, Alex Harui wrote:

flash.net.URLLoader


RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Persaud, Anthony
Take a look at the HTTPService class.

 

http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/HTTPService.html

 

I prefer to use the pure actionscript interface to it than using MXML -
especially if you have a lot of services on the server.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, May 10, 2007 1:55 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

 

flash.net.URLLoader

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, May 10, 2007 1:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

So...

I've got a backend server running Apache Tomcat and I've got the 
ability through our CMS to dynamically create gateways, and use an 
AJAX API to get information from them.

I've never used AJAX and I'm pretty new to Flex, so the question is 
how can I make the same type of call that an XMLHTTPRequest is making 
in Javascript, but rather do it in Flex? I really have no care for 
Javascript ... and see no need to use it unless I absolutely have to. 
I'd rather keep all my communication within Flex/Flash.

Maybe I'm overlooking something pretty obvious, but any pointers 
would be appreciated.

thanks!

jon

 



RE: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Persaud, Anthony
I'll also add that you should take a look at setting up a
crossdomain.xml on your server - if not, nothing might work (depending
on how you are building your application).

 

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, May 10, 2007 2:21 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

 

I love simple answers.

 

thanks man.  now I just have to figure out how to use it.

 

 

On May 10, 2007, at 4:54 PM, Alex Harui wrote:

 

flash.net.URLLoader

 



Re: [flexcoders] XMLHTTPRequest in Flex instead of Javascript

2007-05-10 Thread Derrick Anderson
i am quite new to flex too, but maybe mx:httpService is what you need?  If you 
are returning valid XML i think it would be quite easy to work with.

d.

- Original Message 
From: Jon Bradley [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, May 10, 2007 4:24:00 PM
Subject: [flexcoders] XMLHTTPRequest in Flex instead of Javascript









  



So...



I've got a backend server running Apache Tomcat and I've got the  

ability through our CMS to dynamically create gateways, and use an  

AJAX API to get information from them.



I've never used AJAX and I'm pretty new to Flex, so the question is  

how can I make the same type of call that an XMLHTTPRequest is making  

in Javascript, but rather do it in Flex? I really have no care for  

Javascript ... and see no need to use it unless I absolutely have to.  

I'd rather keep all my communication within Flex/Flash.



Maybe I'm overlooking something pretty obvious, but any pointers  

would be appreciated.



thanks!



jon






  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
..bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
..MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
..replbq {margin:4;}
--








 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front