1. Ed Van Haren
  2. PowerBuilder
  3. Tuesday, 1 November 2022 23:31 PM UTC

Old school PowerBuilder. Using PB 19 R3 Build 2670. Basic client server.

Calling a Web service proxy via SOAP. Code sample below:

TRY
        conn.Useintegratedwindowsauthentication( True)
    CATCH (Throwable x)
        ls_error = x.GetMessage()
        MessageBox( "EAS", "Error initializing web service call to Universal Coder." )
        RETURN -1
    END TRY

This has worked for years and still does on most Windows machines. I have received a call from 2 users who are getting an error when it hits the  conn.Useintegratedwindowsauthentication( True) line. It throws a bad runtime function reference.

I googled and tried removing the duplicate libeay32.dll from SysWow. I even tried to put the PB runtime in with the EXE and also tried to put the EXE location 1st in the path. No luck. Still get same error.

Again, this works on almost every other computer in the company (1000 or so).

Any other things to look for? 

Thanks,

Ed

Ed Van Haren Accepted Answer Pending Moderation
  1. Wednesday, 2 November 2022 23:47 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris,

I don't know why, but that seems to have worked. Still very strange that it worked for most clients but these 2.

Will have to update these calls some day.

Thanks again,

Ed

Comment
  1. Miguel Leeuwe
  2. Thursday, 3 November 2022 02:39 AM UTC
Hi Ed,

Great!

Please mark as resolved.

regards

  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 3 November 2022 12:47 PM UTC
That's great news Ed! :-)
  1. Helpful
There are no comments made yet.
Ed Van Haren Accepted Answer Pending Moderation
  1. Wednesday, 2 November 2022 19:50 PM UTC
  2. PowerBuilder
  3. # 2

This is a very old app but I believe back then didn't you import the pbx file to create the SOAP objects? I have 1 PBL that contains the soapconnection, soapexception and the soappbcookie objects. I don't believe there are any references to the pbwsclient.pbd. This app also uses new .Net service calls as well, but this particular one still uses the old SOAP method.

The common cause I found online about this issue was a conflicting libeay32.dll. We also use DB2 and we had to add code in our apps to instantiate a soapconnection before we connected to the database to make sure the appropriate version of the DLL was loaded (did that back in 2013). 

I tried to prove that wasn't an issue by putting the runtime in the same directory as the EXE and putting that path 1st in the user's path. I thought this would force the appropriate version of the DLL to be used. But it still fails.

Again, this works on 99% of the users who have this app deployed. That is why I think it has to do with some machine level issue. DLL mismatch, TLS / SSL support, ????

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 2 November 2022 20:23 PM UTC
Hi Ed;

Please stop using the PBX approach as it's really not the proper way. I would recommend that you ...

1) Make sure to remove all SOAP objects from your application PBL(s)

2) Add the pbwsclient.pbd library to your App's Library List

3) Perform a Full Build of the PB App

HTH

Regards ... Chris

  1. Helpful
There are no comments made yet.
Ed Van Haren Accepted Answer Pending Moderation
  1. Wednesday, 2 November 2022 14:08 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris,

 

string ls_error
SoapConnection conn


conn = Create soapconnection

TRY
      conn.Useintegratedwindowsauthentication( True)
CATCH (Throwable x)
     ls_error = x.GetMessage()
     MessageBox( "EAS", "Error initializing web service call to Universal Coder: " + ls_error )
     RETURN -1
END TRY

ls_error = "Bad runtime function reference at line 10 in function ....."

line 10 is the  conn.Useintegratedwindowsauthentication( True) line.

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 2 November 2022 19:25 PM UTC
Hi Ed;

Thank you for that update!

Are all the SOAP objects coming from the "pbwsclient.pbd" library (and, no SOAP objects in any of your regular App's PBLs)?

Regards ... Chris

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 2 November 2022 00:58 AM UTC
  2. PowerBuilder
  3. # 4

Hi Ed;

  What is the value in the "ls_error" variable 

Also, what is the logic that sets up the "conn" variable. Where does it come from? How is it instantiated?

Regards ... Chris

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.