webmethods hangs after calling methods of COM object using wm32 package

Hi,

I added two libraries in Visual Basic 6.0 Project References.
I created objects of each of library class in vb prj.
Then I wrote some functions to call library functions using these objects in vb project.

I made DLL of this vb project.
I registered this DLL.
Now,
Using ‘Win32.Com.dispatch: createObject’ service I created dispatch object and by using ‘Win32.COM.dispatch: invoke’ I am calling methods of DLL which internally calling methods of library DLL.
Now after finishing process I am gracefully exiting from DLL and releases
dispatch object using 'Win32.COM.dispatch: release
If at least once I called this flow service, my webMethods performs for 10 to 15 minutes more and then hangs.

Please suggest solution…!:frowning:

Honestly why would you want to interface webMethods IS with a DLL? :eek: Wrap you DLL’s with a service interface and let webMethods and whatever else talk to that. webMethods IS provides adapters to talk to propiertary system’s apis but I don’t like to use them when those systems provide standards based interface support. You lose your portability, abstraction, get into strong data binding issues. It just bad.

I agree with Mark. Calling DLL procs from within a JVM is fraught with issues. If the DLL misbehaves, it can crash your JVM and all your integrations hosted by IS go south.

If you cannot take the approach that Mark suggests (e.g. interact with your VB components via plain XML over HTTP, or SOAP, etc.) then isolate the DLL usage to its own IS instance. That way when it crashes only that integration is impacted.

Hi thanx both of you for immediate reply.
Only way to handle my another application (from third vendor) is DLL.
Mark, can you explain me in deep, how to handle DLL API using webMethods other than the way I am calling.

The source of the DLL doesn’t matter. Use your .Net environment to wrap the interface with something a little more standard such as a Web Service. You will essentially create a new .Net class that will handle the webMethods request (that’s your web service part) and pass it on to the dll (that’s your .Net class talking to your dll) and respond back.

Microsoft has plenty of examples on how to do this. They use “WebMethod” tags to wrap objects in .Net to expose them as services. They also have Rest style web services examples as well. They use a similar concept as the “WebMethod” tag. Note the webMethods tag in .Net has nothing to do with webMethods product line, don’t get confused. :wink:

Hi thanx!

I will definitely try this!