Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Oluka
Posts: 4
Registered: ‎02-25-2011
My Device: Playbook Simulator

Access to global URLs from Simulator

Hi, everybody.

 

I'm trying to access global URL using HTTPService. 

 

<s:HTTPService result="handlePlain(event);"
				   fault="handleFault(event);"
				   id="plainRPC"
				   resultFormat="text"
				   url="http://examples.adobe.com/flex3/exchangingdata/text/plainHttpService.php"
				   useProxy="false">
		<mx:request xmlns="">
			<zipcode>
				{zipcode.text}
			</zipcode>
			<pounds>
				{weight.text}
			</pounds>
		</mx:request>
	</s:HTTPService>

 If Launch method in Run configurations is "on Desktop" - everything is Ok.

But when I'm trying to do same things with Launch method "on Device" (I'm using simulator) - I have HTTP request error...

 

Could you help me with resolving this problem?

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Access to global URLs from Simulator

I don't use any IDE so I can't help much, but it might help if you could post more information about the error.

 

Is there an error number, or more text than just "HTTP request error" ?  Usually that is helpful for getting an answer from the people who actually know.

 

Things that might help:

 

 

  1. make sure the simulator is in Development Mode (with the little hammer icon showing)
  2. make sure you are using the correct address for the simulator
  3. let us know more about your configuration, specifically NAT vs. Bridged networking in VMware, and possibly what plaform you're using (Win, Mac, versions of stuff)

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Contributor
Oluka
Posts: 4
Registered: ‎02-25-2011
My Device: Playbook Simulator

Re: Access to global URLs from Simulator

Thank you

 

To see the result I use this:

 

public function handlePlain(event:ResultEvent):void
{
    shippingOptions.text = event.result.toString();
}
			
public function handleFault(event:FaultEvent):void
{
    shippingOptions.text = event.fault.faultString;
}

 And I have no error number in output message.

 

My simulator is in Development mode, in VMware settings I use bridged networking (I tried to use NAT - the same result), I use correct IP address for the simulator, so I have no problem with connection between Flash Builder and simulator.

 

I am using Windows XP.

 

As I said before, I have no problems with this little program when my Run or Debug configuration is "on Desktop" and target device to simulate BlackBerry Playbook.

 

Of course I can test my application "on Desktop", but now I try to understand if I can do it "on Device" either not....

 

Thank you for your advices

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Access to global URLs from Simulator

Was that adobe URL that you posted above the actual one you are trying to use?  This sounds like a case where if you give us the full info, anyone else can try it and reproduce the problem...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Contributor
Oluka
Posts: 4
Registered: ‎02-25-2011
My Device: Playbook Simulator

Re: Access to global URLs from Simulator

Yes, I try to access exactly that adobe URL.

Please use plain text.
New Developer
BrentSmith
Posts: 4
Registered: ‎02-10-2011
My Device: Not Specified

Re: Access to global URLs from Simulator

If you are using Flashbuilder to debug try tuning off the network monior in the debug view. This fixed the issue when I saw it:

 

http://stackoverflow.com/questions/5473006/playbook-app-wont-make-http-rpc-calls-http-request-error

Please use plain text.