Accessing a web service from FiveTouch !!!

Accessing a web service from FiveTouch !!!

Postby Antonio Linares » Thu Nov 26, 2015 11:45 am

Thanks to Rafa Carmona here you have a working example of how to access a web service
using Harbour code and FiveTouch! :-)

This opens the door to manage any remote database (MySQL, SQL, etc) using a web service
which it is the advised way to do it :-)

Finally we can use any database engine from FiveTouch! Many thanks Rafa!!!

Code: Select all  Expand view
PROCEDURE test_htip()

   LOCAL oHttp, hQuery, cResponse

   hQUery := { => }
   hb_HCaseMatch( hQuery, .F. )

   oHttp := TIPClientHTTP():New( "http://adaptaproyectoserp.com.ve/webservices/client.php", .T. )
   hQuery[ "nombre" ]    := "THefull The BEST!"
   
   IF ! oHttp:open()
      ? "Error: oHttp:open(): " + oHttp:lastErrorMessage()
      RETURN
   ENDIF

   IF ! oHttp:post( hQuery )
      ? "Error: oHttp:post(): " + oHttp:lastErrorMessage()
   ENDIF

   cResponse  := oHttp:readAll()
   oHttp:close()

   Alert( cResponse )

   RETURN


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 35348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Accessing a web service from FiveTouch !!!

Postby bpd2000 » Thu Nov 26, 2015 1:30 pm

Excellent, Good News
Regards, Greetings

Try FWH. You will enjoy it's simplicity and power.!
User avatar
bpd2000
 
Posts: 123
Joined: Tue Aug 05, 2014 9:48 am
Location: India

Re: Accessing a web service from FiveTouch !!!

Postby Antonio Linares » Thu Nov 26, 2015 9:57 pm

Using it from FiveTouch for Android:

Image

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 35348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveTouch

Who is online

Users browsing this forum: No registered users and 1 guest