Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Sample Code with SOAP Messages for OpenEdge Web Services : Releasing an object
 

Releasing an object

When you are finished using any Web service object (except a session-free AppObject), you must invoke the built-in release method to release that object and return its resources for use by other clients.
As with other Open Clients, there is no ABL involved in implementing the release method on an Open Client object. However, for Web services, the operation is an object method is required by the WSA.
This is a VB.NET declaration for the AppObject release methods:

VB.NET prototype for a Release_Object method

Public Sub Release_OrderInfo( )
Public Sub Release_CustomerOrder( )
Although these methods take no parameters, you must remember to send the object ID for the object you are releasing in the SOAP header of the release request message. How you handle the SOAP header and object ID depends on your client type. For some clients, such as .NET, this process is automated. For other clients, such as ABL and Java, you need to create the code to handle this yourself. For more information on handling SOAP headers and object IDs, see Handling SOAP Message Headers in ABL and Developing a Java Client to Consume OpenEdge SOAP Web Services.
These are sample calls to the release methods declared for the sample Web service:

VB.NET client code calling methods to release objects

custOrder.Release_CustomerOrder( )
webService.Release_OrderInfo( )
Note: AppServer connections used by session-free methods are usually returned to the Web service connection pool after the SOAP response message for the release method is returned.