uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

35.5.3 Adding sequence termination processing in the Implementation Class for Web Service client

Add sequence termination processing in the Implementation Class for Web Service client.

The following is an example for adding the sequence termination processing:

package com.example.sample.client;
 
import com.example.sample.TestJaxWs;
import com.example.sample.TestJaxWsService;
import com.example.sample.UserDefinedException;
import com.sun.xml.ws.Closeable;
 
public class TestClient {
    public static void main( String[] args ) {
        TestJaxWsService service = null;
        TestJaxWs port = null;
        try {
            service = new TestJaxWsService();
            port = service.getTestJaxWs();
            
            String returnValue = port.jaxWsTest1( "Invocation test.", 1003 );
            
            System.out.println( "[RESULT] " + returnValue );
        }
        catch( UserDefinedException e ){
            e.printStackTrace();
        }
        finally {
            if( port != null ) {
                ((Closeable)port).close();
            }
        }
    }
 
}