Do I need to close the SOAP service
Posted: Fri Sep 30, 2016 6:17 pm
When using Lansa Integrator and the SOAP agent, in the sample the service is closed, unloaded and closed with this:
Now, I am wondering if this part is absolutely necessary.
Yes, it is probably the right thing to do, but what if I open and initiate the service, run numerous operations after each other and then exit the function?
And would it be any different from a situation where my function ends abruptly, possibly because of a communications failure with the SOAP server? In that case, the function has not closed the service but just ended.
Code: Select all
* Close SOAP service
USE BUILTIN(JSM_COMMAND) WITH_ARGS('CLOSE') TO_GET(#JSMSTS #JSMMSG)
EXECUTE SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
* Unload service
USE BUILTIN(JSM_COMMAND) WITH_ARGS('SERVICE_UNLOAD') TO_GET(#JSMSTS #JSMMSG)
EXECUTE SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
* Close service
USE BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
EXECUTE SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
Yes, it is probably the right thing to do, but what if I open and initiate the service, run numerous operations after each other and then exit the function?
And would it be any different from a situation where my function ends abruptly, possibly because of a communications failure with the SOAP server? In that case, the function has not closed the service but just ended.