0
votes

I recently downloaded the latest version of BlazeDS turnkey from Adobe to see if I could get BlazeDS to connect to a mobile app I'd recently made in Flex. After doing one or two tutorials, I made a browser-based flex app which basically did everything I wanted the mobile app to do.

However, when I tried to get it to work in the mobile app, I get a few different errors, specifically with the RemoteObject, Producer objects. Whenever I try to access the remote object's getServers() method (the app monitors the status of a number of servers), I get a HTTP 502 error. The same thing happens whenever I try to send a message using the Producer. The error is:

    Channel Fault: error; NetConnection.Call.Failed: HTTP: Status 502: url: 'http://erviceStatusUpdater.swf/samples/messagebroker/amfpolling'

"ServiceStatusUpdater" is the name of the app, which explains the first part, but not the missing letter after the "http://" declaration. Do I need to declare an endpoint for each of the producers and remote objects? And if so, what should they be? I've tried looking it up but it seems to be quite difficult to find documentation on this sort of thing.

I should also mention that "samples" is the current context root, or at least that's what it was in the other project that ran using the same server. The messaging channel as well as the remoting channel have already been setup, as these are the same as when using the browser app.

Thanks

EDIT: I've managed to get the remote object to work by specifying the end point for the remote object. For anyone who's having a similar problem, the end point (in my case) was "http://localhost:8400/{context root}/messagebroker/amf", where "{context root}" is your context root (which in my case was "samples"). The consumer still isn't receiving messages, though.

1
Please post your solution as a formal answer to the question. I'm glad you were able to work it out.JeffryHouser
Thanks, I'll go ahead and do that, but it's not completely solved; the consumer still isn't working. EDIT: Can't answer my question for another 6 hours, because I don't have the 100 rep points needed :(Closeratio

1 Answers

0
votes

Finally fixed both issues. The issue with the RemoteObject was that the endpoint was not defined. This fix is detailed in the edit to my question.

The second issue with the consumer was to do with the fact that no channels had been defined for it. In order to do this, one has to define the channel set that the consumer should use (which can be an instance of ChannelSet), and then within that channel set, there should be a channel instance which has its URI set to point to the correct stream (which in my case happened to be the same as the remoting endpoint; amf).

I made the second fix in actionscript, not sure if it's possible to do it all in mxml.