• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

AMFConnection call which in turn uses httpurlconnection becomes unresponsive

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AMFConnection call which in turn uses httpurlconnection becomes unresponsive while calling getinputstream() for a particular remoting message

Below are the details:

I am trying to communicate with a server using flex messaging library (AMF). The aim is to log-in to the server, create a session and perform some operations. I created an amf connection and use its call method to execute these operations like below:



All of them worked as expected. However, there is one particular operation (initSession) which is causing problem.

As soon as the call statement is executed, the application becomes unresponsive. It doesn't throw an exception, it doesn't go to the next line, it just silently dies after few minutes.

How can I make it return the response (or a part of it)?

....

Additional Details (things I figured out while debugging):

From the server logs I was able to verify that the request was received and that operation was performed by the server successfully. Ideally, a response should have been received but that is where the problem lies.

I dug a little deeper. AMFConnection internally uses httpurlconnection. When getInputStream() method is called on that httpurlconnection, the application freezes.

The response to that particular remoting message(initSession) is supposed to be comparatively larger than the rest. Maybe the httpurlconnection is having trouble reading large response.

I can't proceed unless I get the response because the response will contain a token which will be used for all the remaining operations. So setting a time out will not help.

The data which is important to me (The Token) will be in the upper part of the response content so I need not read the whole response. First 100-150 characters will suffice.

P.S: I am new here. Let me know if there is anything I need to add/remove in this post. Thanks.
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

This isn't the best forum for this topic so I will move it to the flex forum for you.
 
What's that smell? I think this tiny ad may have stepped in something.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!