jWebSocket Forum

[Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
clinet listener does not work  XML
Forum Index » Client functionality
Author Message
bmo

jWebSocket Forum User

Joined: 29/05/2015 10:24:12
Messages: 7
Offline

I'm trying to develope a simple java client on android (client1 --> server --> client2) and I have developped the following class



When I call sendNewRecord the server receives correctly the token and do a sendToken()

I got the following on the server

StatisticsFilter: Analyzing outgoing token to 01.51999.2: ns=org.jwebsocket.BBS, type=newRecord, RecordingUrl=http://198.52.119.172/blablao/fga/www, recordGUID=09115365-5f40-42f3-a542-4844be99efea, user_id=54fdb30c737216d422000029, data_grouped_string=1111111222222222, utid=131...

2015-06-30 15:46:10,743 DEBUG - SampleFilter: Checking outgoing token to 01.51999.2: ns=org.jwebsocket.BBS, type=newRecord, RecordingUrl=http://198.52.119.172/blablao/fga/www, recordGUID=09115365-5f40-42f3-a542-4844be99efea, user_id=54fdb30c737216d422000029, data_grouped_string=1111111222222222, utid=131...

2015-06-30 15:46:10,744 DEBUG - TokenServer: Sending token 'ns=org.jwebsocket.BBS, type=newRecord, RecordingUrl=http://198.52.119.172/blablao/fga/www, recordGUID=09115365-5f40-42f3-a542-4844be99efea, user_id=54fdb30c737216d422000029, data_grouped_string=1111111222222222, utid=131' to '01.51999.2 (109.26.204.70:51999, 54fdb30c737216d422000029)'...

But the second client (client 2) receives nothing, it seems that the listener is not working on the client. I tried to see the existing demos but I was not able to find the raison of that.
I really need your help to figure out how to do that.
Thanks
Baraa
vbarzana

jWebSocket Forum Fan
[Avatar]

Joined: 11/07/2011 09:13:42
Messages: 109
Offline

Hi Bmo,
I have 3 questions for you so I can help you with a proper response:
1- Can you please post your server side code?

2- Can you please try opening the connection like this:


3- Can you please tell me which version of jWebSocket are you using?

Looking forward for your response so I can be able to help you,
Best Regards,
Victor
[WWW]
vbarzana

jWebSocket Forum Fan
[Avatar]

Joined: 11/07/2011 09:13:42
Messages: 109
Offline

Bmo,
Please one more thing, don't do a login before you ensure that the connection is opened:
This is the way you do it...


This is the way I recommend you to do it:


Regards,
Victor
[WWW]
bmo

jWebSocket Forum User

Joined: 29/05/2015 10:24:12
Messages: 7
Offline

Hi vbarzana,
Thanks for your interest,
1- here is my server side:


2- I'll try it right now and I'll tell you the result when I get it

3- jWebSocket-1.0 (I installed the latest version of the source code)

I precise that the server receives correctly the token

Thank you in advance,
Baraa

This message was edited 2 times. Last update was at 01/07/2015 11:52:39

bmo

jWebSocket Forum User

Joined: 29/05/2015 10:24:12
Messages: 7
Offline

I've followed your recommendations,
- for the login:
weirdly the processOpened has not been executed whereas the processOpening is executed. In my first version (in my first post) the login is going on with no problem ( the processToken when type="login") has been executed correctly.

- I changed the open as you told me but I have always the same problem : the token is sent to the server the server says that he sends the token but the client does not receive anything.

what do you think?

Regards,
Baraa
vbarzana

jWebSocket Forum Fan
[Avatar]

Joined: 11/07/2011 09:13:42
Messages: 109
Offline

Hi Baraa, please check your private messages, I just sent you one, let's try to solve this on a chat, then we provide the response to the community.
Regards,
Victor
[WWW]
bmo

jWebSocket Forum User

Joined: 29/05/2015 10:24:12
Messages: 7
Offline

Hi,
After the great help of Victor, I figured out that I missed to add some dependencies to my project.
I had to add the dependencies (jar files) listed in the pom.xml of jWebSocketCommon to my project library (build path)



Since I'm working with cordova I added these jar files to my plugin libs folder and to the plugin.xml file.

I would like to highlight that I've not being able to add the activemq-all.jar to my android application. It causes a compilation errors. For the moment I deleted it and that works perfectly.

Thanks again for your help Victor,

Regards,
Baraa
anugrah

jWebSocket Forum User

Joined: 17/07/2018 09:31:18
Messages: 1
Location: surabaya
Offline

thanks for info guys, this is very help me..

https://www.kamarupa.co.id/services/integrated-branding
[WWW]
 
Forum Index » Client functionality
Go to:   
Powered by JForum 2.1.9 © JForum Team