Hi.
I m a new flex developer.new to flash and designing too.I have good 
knowledge of java technologies.

Here in my flex application i m trying to use mx:HttpRequest object 
to communicate to server
TestApplication.mxml

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
width="100%" height="100%">
<mx:HTTPService 
id="feedRequest" 
url="/processingServlet"
contentType="application/xml"
useProxy="false"
fault="callFailure(event)"
result="callSuccess(event)"
method="GET">
</mx:HTTPService>

in the call success and callFailure functions i m just trying to see 
whther my httprequest is working or not.

<mx:Script> 
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
private function callFailure(event:FaultEvent):void
{
Alert.show(String(event.message));
}
private function callSuccess(event:ResultEvent):void
{
Alert.show(String(event.result));
}
]]>
</mx:Script>
<mx:Button label="Click" click="feedRequest.send()" />
</mx:Application>

I could compile this.

I pasted the resulting swf file into my application root directory 
in tomcat 5.0

i.e i pasted in webapps/testapp/TestApplication.swf

i pasted the servlet class file into webapps/testapp/WEB-INF/classes

i also created a web.xml file

in which i could correctly define my servlet url.

I could call the swf file

http://localhost:8080/testapp/TestApplication.swf
but when i click the button my servlet do not recieve the HttpRequest

I recieve error my callfailure gets called showing Error #2032 
Stream error
Http Request Error error caused by IOErrorEvent

i m sure My servlet url works perfect with normal browser

It does not work even requesting a plain jsp or xml which are in 
same folder as .swf 
i did like url="catalog.jsp"
url="catalog.xml"

Is it not the way to host a simple webapplication..
I did not use any wrappers
Do i need to follow any other folder structure when deploying??
I also tried using crossdomain.xml
Does it have anything to do with my windows or flash player version?
Does any one have folder structure for deploying flex applications 
in tomcat?
I could see my webserver does not receive request at all.

In what way flash players httpservice is different from normal web 
browsers request?
Where did i go wrong.
Please help.
I m completely stuck not able to move from here..
Appreciate any kind of help.

Thank you
Roopa.


Reply via email to