aaronk Well-Known Member Licensed User Longtime User Jul 19, 2015 #1 Hi, I am using a Class Module within my B4J app and from the WebSocket module I have Initialize the class. In this class module I am using a SOAP message request which will send the message off and in the JobDone sub I am getting the reply. Which is all working fine. The part I need help with is.. From my WebSocket Module I want to know if the value that is returned from the SOAP message equals something before the code continues in a sub. For Example: I am sending a SOAP message to request if a user exists on the server. The reply I should get back either yes or no (which I have working.) From my code I want to check what that value is before continuing in that sub. e.g: B4A/B4i (or even my webpage with the websocket) sends a WebSocket request to my B4J app and asks "does user abc exist on the 3rd Party server" The B4J needs to send a SOAP message to a 3rd Party server and check if the user exists on the server. (I need to check if the user exists from the B4J app and not the B4A/B4i app.) IF the reply from SOAP Message = "yes" Then ' send message to the B4A/B4i app and send "yes" End If
Hi, I am using a Class Module within my B4J app and from the WebSocket module I have Initialize the class. In this class module I am using a SOAP message request which will send the message off and in the JobDone sub I am getting the reply. Which is all working fine. The part I need help with is.. From my WebSocket Module I want to know if the value that is returned from the SOAP message equals something before the code continues in a sub. For Example: I am sending a SOAP message to request if a user exists on the server. The reply I should get back either yes or no (which I have working.) From my code I want to check what that value is before continuing in that sub. e.g: B4A/B4i (or even my webpage with the websocket) sends a WebSocket request to my B4J app and asks "does user abc exist on the 3rd Party server" The B4J needs to send a SOAP message to a 3rd Party server and check if the user exists on the server. (I need to check if the user exists from the B4J app and not the B4A/B4i app.) IF the reply from SOAP Message = "yes" Then ' send message to the B4A/B4i app and send "yes" End If
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2015 #2 1. Send the request. 2. Call StartMessageLoop. 3. In JobDone call StopMessageLoop. Upvote 0
aaronk Well-Known Member Licensed User Longtime User Nov 5, 2016 #3 Erel said: 1. Send the request. 2. Call StartMessageLoop. 3. In JobDone call StopMessageLoop. Click to expand... Shouldn't it be the other way around? Like: Call StartMessageLoop in Main Module: Code: Copy Sub AppStart (Args() As String) StartMessageLoop End Sub Webpages on my server is running and loading etc. User then requests if the user is valid.. 1. Send the SOAP request - call StopMessageLoop (by the way, at this point what happens if another user tries to view files on my server, does it mean nothing will load until StartMessageLoop is called?) 2. In JobDone call StartMessageLoop. Do I have the above correct ? Upvote 0
Erel said: 1. Send the request. 2. Call StartMessageLoop. 3. In JobDone call StopMessageLoop. Click to expand... Shouldn't it be the other way around? Like: Call StartMessageLoop in Main Module: Code: Copy Sub AppStart (Args() As String) StartMessageLoop End Sub Webpages on my server is running and loading etc. User then requests if the user is valid.. 1. Send the SOAP request - call StopMessageLoop (by the way, at this point what happens if another user tries to view files on my server, does it mean nothing will load until StartMessageLoop is called?) 2. In JobDone call StartMessageLoop. Do I have the above correct ?
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2016 #4 aaronk said: Shouldn't it be the other way around? Click to expand... No. You should send the request and then call StartMessageLoop. The code after the StartMessageLoop call will only run after StopMessageLoop has been called. aaronk said: (by the way, at this point what happens if another user tries to view files on my server, does it mean nothing will load until StartMessageLoop is called?) Click to expand... No. It only blocks the current thread. Each request is handled by a different thread. Upvote 0
aaronk said: Shouldn't it be the other way around? Click to expand... No. You should send the request and then call StartMessageLoop. The code after the StartMessageLoop call will only run after StopMessageLoop has been called. aaronk said: (by the way, at this point what happens if another user tries to view files on my server, does it mean nothing will load until StartMessageLoop is called?) Click to expand... No. It only blocks the current thread. Each request is handled by a different thread.
aaronk Well-Known Member Licensed User Longtime User Nov 6, 2016 #5 Thanks heaps for your reply.. all makes sense now Upvote 0