1. Moshe Tangi
  2. PowerBuilder
  3. Thursday, 28 September 2017 10:12 AM UTC

Hi al

I have created a ws in pb 2017 and its looks great - no error .

calling one of its functions return the message : http 401 - un Authorized . I spoke with the system admin and he told me that he sees my call but the call gets with no user name and password so that's why  the error message i gets .

 

I tried the SetProxyServer() and sets the user name and password before calling the function but still does not work.

he told me to see how powerbuilder handles Delegation .

i googled it but i did not find nothig useful

Any idea ? please help

Thanks

Moshe

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 28 September 2017 10:26 AM UTC
  2. PowerBuilder
  3. # 1

Try to use function SetBasicAuthentication or SetOptions if the server requires an authenification for the connection.

Use SetProxyServer only if you have a proxy.

Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 6 October 2017 20:17 PM UTC
  2. PowerBuilder
  3. # 2
  1. using the SoapConnection class:
    conn = CREATE SoapConnection
    conn.SetBasicAuthentication('', "username", "password")  // usr+pwd known to the web server
  2. using a WS datawindow:
    lws_connection = CREATE wsconnection
    lws_connection.authenticationmode = "basic"
    lws_connection.username = "username"  // usr+pwd known to the web server
    lws_connection.password = "password"
    dw_1.SetwsObject(lws_connection)
    dw_1.retrieve()
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.