Hi.
Is there any examples on how to invoke and consume a SOAP web service using the httpclient object?
Today, we use the proxy object like this:
long ll_ret
decimal ldc_saldo
SoapConnection DGSConnection
transactionsservice TransClient
try
DGSConnection = create SoapConnection
ll_ret = DGSConnection.CreateInstance(TransClient,"transactionsservice",ls_url + "?token=" + ls_token)
if ll_ret <> 0 then
messagebox("Error", "Unable to logon Transactions web service.")
ldc_saldo = 0
else
ls_xml = TransClient.GetCustomerBalance(al_clientNo,al_customerNo)
end if
catch(SoapException ex)
if ex.text = "Invalid token" then
ls_token = of_get_token_dgs()
else
Messagebox("Error",ex.text )
return 0
end if
FINALLY
But it would be much more efficient to call the method GetCustomerBalance directly, if possible.
Something like this:
ls_endpoint = ls_url + "/GetCutomerBalance?token=" + ls_token + "&clientNo=" + string(al_clientNo) + "&customerNo=" + string(al_customerNo)
http = create httpclient
ll_ret = http.sendrequest('GET', ls_endpoint)
Is this at all possible, or is proxy objects the only way?
Regards,
Bjarne Anker