Home > database >  Pb9 call wrong with verification ws times
Pb9 call wrong with verification ws times

Time:09-18

Pb9 call ws, but ws address user authentication, in the code I use setoptions to the assignment of account and password, but system error when calling a function, prompt "Unexpected return code: 401 Unauthorized", o solve
Part of the code:
Conn. Setoptions (' UserID=TRFC01)
Conn. Setoptions (' Password=123456 ')
Conn. SetOptions (" SoapLog=~ "soapclnt. TXT ~" ")

L_res=conn. CreateInstance (inv_soap_02, "binding", ls_end_url)
IF l_res & lt;> 0 THEN
MessageBox (' message ', "instance service object failed!" )
RETURN
END the IF

TRY
A1=1
A2=1
Aa=inv_soap_02. Zfmtestws (a2, a2)
Messagebox (" ls_return ", string (aa))
The Catch (SoapException e)
MessageBox (" Error ", e. ext)
END the TRY

Destroy the conn

CodePudding user response:

Try:

Conn. Setoptions (TRFC01 ~ 'UserID=~' ' ')
Conn. Setoptions (' Password=~ ~ 123456 ')

CodePudding user response:

Or: conn. SetOptions (" Userid='TRFC01' and Password='123456' ")
  • Related