cancel
Showing results for 
Search instead for 
Did you mean: 

PB 12.5 Classic with web service proxy error

Former Member
0 Kudos

Hi,

I'm fairly new to Powerbuilder and am trying to modify a Powerbuilder 12.5 Classic application to use a new web service on site.  In my case, I read a number of articles and muddled through creating a web service proxy using the .net extensions with PB 12.5 Classic.  I installed the .Net 4.0 frame work, the SDK and the .Net prereqs for PB12.5 from the disk.  I do have this working on my desktop machine (both within the IDE and from deployed executable) but when I tried to deploy it to other machines for testing, I suddenly get an error "The ordinal 3873 could not be located in the dynamic link library LIBEAY32.dll".  I believe that I have deployed all the required files from the SAP deployment list for a web service proxy on the server and made sure the application and sybase\shared folders are in the path. 


SAP feels that I have a dll conflict with libeay32.dll or ssleay32.dll but I have proven with Windows function calls that the library is NOT in memory when I go to set up the proxy object.  I am even loading the specific libeay32.dll version that I want (dated July 2011) using LoadLibraryEx (another Windows function) and getting a successful handle id.  SAP has had me run process monitor and they see a call to another version of libeay32.dll that is owned by IBM DB2.  We use this for our authentication and DB2 is a data source for my application.  For some reason, they didn't see the same call on my desktop's process monitor even though, I have the same DB2 connect software installed and also use it for data when I run it locally.  I suspect this error is bogus.  I've had this working locally for several months and just can't seem to figure out what's wrong with my deployment.  Any ideas?  If I were going to set up a new machine with just this application on it, what should  I have installed on it (Windows Server 2008 R2 OS)?

SoapConnection conn // Define SoapConnection

edmsexpedmsdocumentexporter proxy_obj // Declare proxy

ulong modhandle, modhandle2

long modhandle0

gs_edms_message = ''

modhandle0 = GetModuleHandleA("libeay32.dll")

Messagebox ("existing dll handle = ", string(modhandle0))

FreeLibrary(modhandle0)

modhandle = LoadLibraryA("C:\EIA\Beta\PB 12.5\Invoice Approval - EDMS\libeay32.dll")

IF modhandle > 0 THEN

    Messagebox("Return Code"," libeay32 Load Successful -> handle - " + String (modhandle))

ELSE

    MessageBox("Result","Unable to load module")

END IF

// added 11/6/13 to see if loading ssleay32.dll explicitly will clear our error

modhandle2 = LoadLibraryA("C:\EIA\Beta\PB 12.5\Invoice Approval - EDMS\ssleay32.dll")

IF modhandle2 > 0 THEN

    Messagebox("Return Code"," ssleay32 Load Successful -> handle - " + String (modhandle2))

ELSE

    MessageBox("Result","Unable to load module")

END IF

conn = create SoapConnection  //Instantiated connection

//lLog = conn.SetSoapLogFile ("C:\mySoapLog.log")

// Set trace file to record soap interchange data,

// if string is "", disables the feature

//**************error occurs on the following line

rVal = Conn.CreateInstance(proxy_obj,  "edmsexpedmsdocumentexporter")

Thanks, Mark

Accepted Solutions (1)

Accepted Solutions (1)

former_member190719
Active Contributor
0 Kudos

There's nothing wrong with your code.  SAP is on the right track when they indicate their is a conflict with the libeay32.dll or ssleay32.dll files.  It sounds like your code is trying to call a newer version of them, and is picking up an older one (probably from DB2) instead.

Generally the solution for libeay32.dll or ssleay32.dll library conflicts is to make sure you have one version, and one version only, actually accessible on the machine.  Usually that's just a matter of finding the latest version and making it the version to use, renaming the others to something like libeay32.dll.old and ssleay32.dll.old.

Make sure you check the version information for the files and not rely on the date/time stamp on them.

Former Member
0 Kudos

Thanks Bruce.  So far I have tried a number of things.

1.  I renamed all the competing versions of libeay32.dll  This broke DB2 connect in my application which uses it for authentication and later for actual app data.  I tried copying the Sybase version (0.9.812, dated 7/4/11) to the DB2 location, but this results in the same, broken DB2.  I added a registry key that tells Windows to do a "safe search" for dlls, starting with the folder which the application/exe resides in.  Again, broken DB2.

I moved the sybase related folders to the front of the PATH environment variable of the machine.  I added a registry key that is supposed to tell Windows not to store dlls in memory after a shutdown, added the code to the application to check for it in memory before I do my web service proxy connection open and then load the one I want from the location I want.  This still results in the error.  I am even getting an error before doing the CreateInstance, after successfully loading libeay32.dll.  A co-worker gets it when ssleay32.dll is getting loaded, after libeay32.dll.

I have seen some suggestions on the net where people have said that a newer libeay32.dll should be used, downloaded from somewhere in cyberspace.  http://www.youtube.com/watch?v=3awztujbpSw

Another mentioned that he had to get new versions of these dlls and "compile" them himself so that they get registered... again sounds a bit over my head.

What could be the difference between my machine and the target machine, which both have IBM DB2 Connect 8 and Powerbuilder 12.5, and .NET Framework 4.0 and the PB .NET prereqs... I just can't figure it out... it works on mine, ugh.

I am talking to IBM about this too, but they don't want to help with Connect v8.  They want me to upgrade to a higher version before they provide support.

former_member190719
Active Contributor
0 Kudos

Welcome to DLL hell.  That's why .Net has versioning.

Those files are from openssl.  You can download the latest there and compile them,  Or you can just download a set of binaries already compiled from Shining Light.

You might also compare the versions of those libraries on both machines.  Somewhere there's a difference.

Former Member
0 Kudos

This ended up being a setting in the DB2 Connect Client that was the default setting specifying that the authentication to DB2 was to be client side, rather than server side.  Once that was changed, the dll stopped getting loaded.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mark;

1) Seems like your proxy objects are not formed properly or out-of-date.

  => Do these rebuild OK using the PB "Proxy" project?

2) You can usually get better error diagnostics if you add a TRY..CATCH around the WS code.

3) Note:  GetModuleHandleA  =>  GetModuleHandleW

              LoadLibraryA           =>   LoadLibraryW

4) WS may not work properly if the .Net 4.5 framework is installed.

5) Have you applied any maintenance to the PB 12.5 base installation?

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Yes, I can rebuild and deploy the pb proxy project object, building me a new dll.  I can also deploy the main project object, getting the pbds and the exe on my machine.  It's just when I take the exe and pbds to the target machine that this error starts.

I haven't applied any maintenance patches on top of PB 12.5 build 2511 (July 4, 2011).

Framework 4 version 4.0.30319 is installed on the target machine.

Thanks