Hello to all
I'm playing with the WS, in particular I have to use a WS requiring Header (user, password, ...)
I'm not able to initialize the header because I have an error when 'setauthheadervalue'.
I can not find anything on hand and no example in the Web.
What's wrong? You can help me ?
Ty
GImmy
p.s.
Attached
a) library
b) error
///////////////
// CODE //
///////////////
SoapConnection conn // Define SoapConnectionws_
ws_persistentrequestservice proxy_obj // Declare proxy
long rVal, lLog, ll_return
string ls_token, ls_accident
conn = create SoapConnection //Instantiated connection
ws_authheader ws_header
ws_header = create ws_authheader
ws_header.username = is_user
ws_header.password = is_pwd
ws_header.product = is_prodotto
//ws_header.role = '0'
//ws_header.actor = '0'
//ws_header.encodedmustunderstand = '0'
//ws_header.EncodedMustUnderstand12 = '0'
//ws_header.encodedrelay = '0'
proxy_obj = create ws_persistentrequestservice
proxy_obj.setauthheadervalue(ws_header) <<<<<<<<<<=============HERE I HAVE ERROR
lLog = conn.SetSoapLogFile ("C:\mySoapLog.log") // Set trace file to record soap interchange data,
rVal = Conn.CreateInstance(proxy_obj, "ws_persistentrequestservice")
if rval <> 0 then
messagebox ("Errore", "Errore nella creazione della connessione SOAP")
end if
// Create proxy object
try
ls_token = proxy_obj.getauthenticationtoken('',ls_xml)
// Invoke service
messagebox("OK", "OK")
catch ( SoapException e )
messagebox ("Error", "Cannot invoke Web service:" + e.text)
// error handling
end try
destroy conn