Hello Armeen,
I have to use WebServices developed by someone else in Windev.
The format used is SOAP/XML
Here is the example code I got from the site for a test and it doesn't work :
httpClient lo_client
integer li_ret , i , li_StatusCode
String lo_xml_request
string ls_url
string ls_data
string ls_body
string ls_ret
ls_url ="http://localhost/invoice/n_webservice.asmx"
ls_body = '<?xml version="1.0" encoding="utf-8"?>'+&
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+&
'xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+&
' <soap:Body>'+&
' <of_add xmlns="http://tempurl.org">'+&
' <ai_test>2</ai_test>'+&
' </of_add>'+&
' </soap:Body>'+&
'</soap:Envelope>'
lo_client = Create httpClient
lo_client.SetRequestHeader("Content-Type", "text/xml")
lo_client.sendrequest('POST',ls_url,ls_body)
li_StatusCode = lo_client.GetResponseStatusCode()
ls_ret = lo_client.GetResponseStatusText( )
li_ret = lo_client.getresponsebody( ls_data)
destroy lo_client
Thanks a lot
Regards,
Jean-Louis