Java client that invokes WM Service

Java client that was generate from developer is able to invoke webMethods service provided if the service execution completes within 2.5hours. If it takes more time say 3 hrs the java client program just hangs and doesn’t throw any error or exception. In webMethods side service ended successfully after 3 hrs. Any idea where the problem is? I am able to see the java client session being opened in webMethods even after the job exceution at webMethods have completed. Is there any setting we need to do for java client program to get the status of the webMethods service?

Thanks
Meena

Seems like your java client gets timeout and returns an error while IS still finishes the service. Check out your http timeout or other timeouts on java client and IS side.

Instead of ‘hanging’ your java client for two to three hours invoking a service, how about it kicking off an asynchronous invocation of the service and returning immediately with a unique ticket ID. You can use this Server Java API method to do this:


import com.wm.app.b2b.server.*
ServiceThread newThread = Service.doThreadInvoke(interface, service, pipeline)

Once the service completes, it persists the result somewhere (perhaps the IS repo or a DB table) indexed to the ticket ID. Your Java service polls a result-retrieval service with the returned ticket ID every few minutes until it gets a result, and give up after a set number of iterations.

Or use JMS
[url]Java Message Service (JMS)