C coskunor Member Licensed User Longtime User Jun 7, 2012 #1 Hi, I could not find a user guide to use Httputils for consuming a web service with two string input parameters and caling a function from four different functions in the same ..asmx where shall i put function name and the second string parameter in similar sub listed below (with only one parameter and none function name) Thank you very much Best regards Sub Activity_Create(FirstTime As Boolean) HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123") End Sub
Hi, I could not find a user guide to use Httputils for consuming a web service with two string input parameters and caling a function from four different functions in the same ..asmx where shall i put function name and the second string parameter in similar sub listed below (with only one parameter and none function name) Thank you very much Best regards Sub Activity_Create(FirstTime As Boolean) HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123") End Sub
Erel B4X founder Staff member Licensed User Longtime User Jun 7, 2012 #2 You can add more parameters like this: Code: Copy HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123&Parameter2=aaa&Parameter3=bbb") Upvote 0
You can add more parameters like this: Code: Copy HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123&Parameter2=aaa&Parameter3=bbb")
C coskunor Member Licensed User Longtime User Jun 8, 2012 #3 Erel said: You can add more parameters like this: Code: Copy HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123&Parameter2=aaa&Parameter3=bbb") Click to expand... thank you very much, but how can i call function, because in the web service there are more than one function; can i put in PostUrt="http://....asmx/functionname" where can i reach such detail information from ? thanks again regards Upvote 0
Erel said: You can add more parameters like this: Code: Copy HttpUtils.PostString("POST Job1", PostUrl, "Celsius=123&Parameter2=aaa&Parameter3=bbb") Click to expand... thank you very much, but how can i call function, because in the web service there are more than one function; can i put in PostUrt="http://....asmx/functionname" where can i reach such detail information from ? thanks again regards
Erel B4X founder Staff member Licensed User Longtime User Jun 10, 2012 #4 Yes. You can put any valid url in PostURL. Upvote 0
C coskunor Member Licensed User Longtime User Jun 10, 2012 #5 Erel said: Yes. You can put any valid url in PostURL. Click to expand... Hi Erel, Sorry but i could not reach function in the web service, in normal way from the browser i can reach web service like; http://xxxService.asmx?op=functionyyy but from my code; PostUrl ="http://xxxpService.asmx?op=functionyyy" Sub Activity_Create(FirstTime As Boolean) HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.PostString("POST Job1",PostUrl,"p1=deneref.txt&p2=xxxyyyrr99") End Sub Sub Activity_Resume If HttpUtils.Complete = True Then JobDone(HttpUtils.Job) End Sub when i run i got Response Error; Reason="Internal Server Error" StatusCode=500 thank you and regards, Refik Upvote 0
Erel said: Yes. You can put any valid url in PostURL. Click to expand... Hi Erel, Sorry but i could not reach function in the web service, in normal way from the browser i can reach web service like; http://xxxService.asmx?op=functionyyy but from my code; PostUrl ="http://xxxpService.asmx?op=functionyyy" Sub Activity_Create(FirstTime As Boolean) HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.PostString("POST Job1",PostUrl,"p1=deneref.txt&p2=xxxyyyrr99") End Sub Sub Activity_Resume If HttpUtils.Complete = True Then JobDone(HttpUtils.Job) End Sub when i run i got Response Error; Reason="Internal Server Error" StatusCode=500 thank you and regards, Refik
Erel B4X founder Staff member Licensed User Longtime User Jun 11, 2012 #6 Use FireBug with Firefox to understand the required http request. Note that browsers usually send GET requests, not POST requests. Upvote 0
Use FireBug with Firefox to understand the required http request. Note that browsers usually send GET requests, not POST requests.
D DeerBear Member Licensed User Longtime User Jun 11, 2012 #7 coskunor said: Hi Erel, Sorry but i could not reach function in the web service, in normal way from the browser i can reach web service like; http://xxxService.asmx?op=functionyyy but from my code; thank you and regards, Refik Click to expand... Hi! I doubt you can use SOAP with HTTPUtils. However, you could use AXIS(=Java) to implement it and then maybe import it as a library for B4A. Not sure how workable this is but it's an idea! Regards, A Last edited: Jun 11, 2012 Upvote 0
coskunor said: Hi Erel, Sorry but i could not reach function in the web service, in normal way from the browser i can reach web service like; http://xxxService.asmx?op=functionyyy but from my code; thank you and regards, Refik Click to expand... Hi! I doubt you can use SOAP with HTTPUtils. However, you could use AXIS(=Java) to implement it and then maybe import it as a library for B4A. Not sure how workable this is but it's an idea! Regards, A
lagore Active Member Licensed User Longtime User Jun 12, 2012 #8 You can use HttpUtils to send Soap requests, there are some examples on the forum. Sent from my HTC Desire using Tapatalk 2 Upvote 0
You can use HttpUtils to send Soap requests, there are some examples on the forum. Sent from my HTC Desire using Tapatalk 2
C coskunor Member Licensed User Longtime User Jun 12, 2012 #9 lagore said: You can use HttpUtils to send Soap requests, there are some examples on the forum. Sent from my HTC Desire using Tapatalk 2 Click to expand... Thank you for everybody, I think could not describe the problem very well, I was trying to use a web service which contains more than one function; Question is ; where can i put that specific function name in, after which keyword or parameter... Or shall i use web service contains only one function using Httputils. regards, Refik Upvote 0
lagore said: You can use HttpUtils to send Soap requests, there are some examples on the forum. Sent from my HTC Desire using Tapatalk 2 Click to expand... Thank you for everybody, I think could not describe the problem very well, I was trying to use a web service which contains more than one function; Question is ; where can i put that specific function name in, after which keyword or parameter... Or shall i use web service contains only one function using Httputils. regards, Refik
D DeerBear Member Licensed User Longtime User Jun 12, 2012 #10 coskunor said: Thank you for everybody, I think could not describe the problem very well, I was trying to use a web service which contains more than one function; Or shall i use web service contains only one function using Httputils. regards, Refik Click to expand... As it was stated, asmx files are soap webservices. Someone who's got waaaay more experience with B4A than I do has clearly stated it's possible - thus that is what you do; check in the forum, find the relevant threads, and use the code Cheers, A Upvote 0
coskunor said: Thank you for everybody, I think could not describe the problem very well, I was trying to use a web service which contains more than one function; Or shall i use web service contains only one function using Httputils. regards, Refik Click to expand... As it was stated, asmx files are soap webservices. Someone who's got waaaay more experience with B4A than I do has clearly stated it's possible - thus that is what you do; check in the forum, find the relevant threads, and use the code Cheers, A
lagore Active Member Licensed User Longtime User Jun 12, 2012 #11 I was trying to use a web service which contains more than one function; Click to expand... Have you an example of the web service, without this it is very hard to help. Upvote 0
I was trying to use a web service which contains more than one function; Click to expand... Have you an example of the web service, without this it is very hard to help.