Page 1 of 1

help with web methods

Posted: Friday 15th May 2020 3:04pm
by salihburhan
I need to integrate a web service into my desktop application..
I tried to use httpclient of curl, but could not. I have no idea what I am doing.. 8)
If anyone has a sample code for me to debug, I'd be most grateful.
All I need to do is use some methods on the remote server.

Here is how I failed (the objective is to run IsEInvoiceUser on the server):

$ww = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" &
"<s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" &
"<IsEInvoiceUser xmlns=\"http://tempuri.org/\">" &
"<userInfo Username=\"Uyumsoft\" Password=\"Uyumsoft\"/>" &
"<vknTckn> 9000068418 </vknTckn>" &
"<alias/></IsEInvoiceUser>" &
"</s:Body>" &
"</s:Envelope>"

$cu.URL = "http://efatura-test.uyumsoft.com.tr/ser ... ntegration"
$cu.User = "Uyumsoft"
$cu.Password = "Uyumsoft"
$cu.Begin()
$cu.Post("application/json", $ww)
$wRes = $cu.Peek()
Message($wRes, "OK")
$cu.Close()

Re: help with web methods

Posted: Sunday 17th May 2020 3:07pm
by cogier
I am not sure if this will help but please have a look. I have written code to access web based APIs. My program 'Your_Location' is one. It is on the Gambas Farm or available here. Look at the 'Web.Class'.