Try OpenEdge Now
skip to main content
Web Services
Developing a Java Client to Consume OpenEdge SOAP Web Services : Developing the Axis client application : Connecting to a Web service
 

Connecting to a Web service

For session-managed Web services, make a logical connection to the AppObject and save its object ID for later use. For example:
orderInfo.connect_OrderInfo("", "", "");
if (null == orderInfoControlBlock.getObjectNameID("OrderInfo"))
{
   throw new Exception("No header returned from a connect operation to
   OrderInfo.");
}
Note: The PscObjectIDHandler registered for the OrderInfoPort type object (OrderInfoObjStub) automatically looks for and stores the object ID value returned for the OrderInfoObjStub object if the connect_OrderInfo( ) method is successful. Because this is the first object ID that the handler stores, it is automatically set to be inserted as the object ID value in the SOAP header for each SOAP request sent to the WSA for the OrderInfoObjStub object.
Caution: Now that the Web service is connected, remember to release the AppObject when it is no longer needed.