help with web methods
Posted: Friday 15th May 2020 3:04pm
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()
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()