Hi Moshe
Here is some test code I used to connect to a "Real World" service:
n_httpclient l_http
string ls_test, ls_response
ulong lul_length
blob lblob_data, lblob_response
integer li_rc
ls_test = '<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header>' + &
'<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' + &
' <wsse:UsernameToken>' + &
' <wsse:Username>MainstayTest</wsse:Username>' + &
' <wsse:Password>xxxxxxxxxxx</wsse:Password>' + &
' </wsse:UsernameToken>' + &
'</wsse:Security>' + &
'</SOAP-ENV:Header>' + &
'<SOAP-ENV:Body>' + &
' <OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="123456789" TimeStamp="2019-10-16T17:32:20+01:00" Version="1">' + &
' <EchoData> Hello World </EchoData>' + &
' </OTA_PingRQ>' + &
'</SOAP-ENV:Body>' + &
'</SOAP-ENV:Envelope>'
lblob_data = blob(ls_test, EncodingUTF8!)
l_http = Create n_httpclient
l_http.autoreaddata = true
l_http.secureprotocol = 5 // TLS 1.2
l_http.timeout = 60
lul_length = Len(lblob_data)
li_rc = l_http.clearrequestheaders( )
li_rc = l_http.SetRequestHeader("Content-Length", String(lul_length))
//SetRequestHeader("Content-Type", 'application/soap+xml; charset=utf-8')
li_rc = l_http.SetRequestHeader("Content-Type", 'text/xml;charset=UTF-8')
li_rc = l_http.SetRequestheader( 'Accept-Encoding', 'text/xml;charset=UTF-8')
li_rc = l_http.SetRequestheader( 'Host', 'cmtpi.siteminder.com')
li_rc = l_http.SetRequestheader( 'Connection', 'Keep-Alive')
li_rc = l_http.SetRequestheader( 'User-Agent', 'Apache-HttpClient/4.1.1 (java 1.5)')
li_rc = l_http.SetRequestheader( 'Accept', 'text/xml')
li_rc = l_http.SetRequestHeader("SOAPAction", '"http://www.siteminder.com.au/pmsxchange/PingRQ"')
//messagebox('Headers', l_http.getrequestheaders( ))
li_rc = l_http.sendrequest( 'POST', 'https://cmtpi.siteminder.com/pmsxchangev2/services/MAINSTAY', ls_test)
//https://cmtpi.siteminder.com/pmsxchangev2/services/MAINSTAY
//li_rc = l_http.postdatastart( 'https://cmtpi.siteminder.com/pmsxchangev2/services/MAINSTAY')
//li_rc = l_http.postdata(lblob_data,lul_length)
//li_rc = l_http.postdata( ls_test, len(ls_test))
//li_rc = l_http.postdataend( )
//li_rc = l_http.getresponsebody( ls_response)
li_rc = l_http.getresponsestatuscode( )
li_rc = l_http.getresponsebody( ls_response)
li_rc = len(ls_response)
long ll_file
ll_file = fileopen("c:\temp\response.txt", streammode!,write!,shared!,replace!)
filewrite(ll_file, ls_response)
fileclose(ll_file)
Messagebox('Response',ls_response)
ls_response = l_http.getresponseheaders( )
messagebox('Response Head', ls_response)
//li_rc = l_http.getresponsestatuscode( )
//li_rc = l_http.readdata( lblob_response , 1024*16)
//ls_response = string(lblob_response, EncodingUTF8!)
=====================================================================
The commented out code was used to understand the postdata and readdata functions. I then used sendrequest becuase it is much easier.
The key parts are setting the Header attributes to match the call you are making. Then structure the XML body to match the message structure. Get everything right and it just works :)