Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Building Clients for OpenEdge SOAP Web services : Overview of calling methods on Web service objects : Client interface methods for session-managed AppObjects
 
Client interface methods for session-managed AppObjects
A session-managed AppObject provides the following methods:
*Connect_ AppObject (...)
*Release_ AppObject ( )
*CreateAO_ SubAppObject ( )
*CreatePO_ ProcObject (...)
*ProcName (...)
Use this method to connect to an AppServer:
Connect_AppObject (...)
This method must be executed before any other method can be called. The SOAP response header returned by this method contains an AppObjectID element whose value must be sent in the SOAP request header for all other methods invoked on this AppObject.
The AppServer Connect procedure has the ability to return user-defined strings to clients using the WSA or the Sonic ESB Adapter on success or failure. The ABL Connect procedure uses the ABL RETURN ERROR string or RETURN string statements to specify the return strings. By default, the strings are returned to the WSA or Sonic ESB Adapter and logged.
To access the strings on the actual client, the proxy must have been generated with ProxyGen using the Return ABL RETURN-VALUE on Connect option of the Generate Proxies dialog box.
On a successful connection, the client can access the returned string by the result OUTPUT parameter on the associated Connect_AppObject( ) method or as the return value of Connect_AppObject( ) if it is run as a function. On a failed connection, the client can access the returned string in the <faultstring> element of the returned SOAP fault. If no user-defined string was returned from the Connect procedure, then parameter value or SOAP element will be an empty string.
Note: ProxyGen normally configures a Connect_AppObject( ) method with three parameters (string userid, string password, and string AppServerInfo). Enabling the Return ABL RETURN-VALUE on Connect option adds the output parameter string result, which contains the return value of the Connection procedure.
This option does not affect the normal process of returning SOAP faults when a connection attempt fails from a client using a Web Services Adapter. That is, when the Connect procedure fails and returns a string value, that string value will be sent to the client in the <faultstring> element of a SOAP fault. If the Connect procedure does not return a string, then the normal SOAP fault will be returned to the client.
Use this method to release the AppObject connection:
Release_AppObject ( )
Once this method is executed, no other methods on the AppObject can be called. The SOAP request header must contain the value of the AppObjectID element. If other objects (SubAppObjects or ProcObjects) are using the same connection, the connection is not terminated until the corresponding release method is called on every object.
Use this method to create a SubAppObject:
CreateAO_SubAppObject ( )
This method must be executed before calling any other methods on the SubAppObject. The SOAP request header must contain the value of the AppObjectID element. The SOAP response header returned by this method contains a SubAppObjectID element whose value must be sent in the SOAP request header for all methods invoked on this SubAppObject.
Use this method to create a ProcObject and execute the corresponding persistent procedure:
CreatePO_ProcObject (...)
This method must be executed before calling any other methods on the ProcObject. The SOAP request header must contain the value of the AppObjectID. The SOAP response header returned by this method contains a ProcObjectID whose value must be sent in the SOAP request header for all methods invoked on this ProcObject.
Call a ProcName method on the AppObject to execute a corresponding non-persistent external procedure typically identified by ProcName:
ProcName (...)
The SOAP request header must contain the value of the AppObjectID element.