Raritan Computer CC-WSAPI-0B-v5.1.0-E Marine Radio User Manual


 
Appendix B: Web Services Development in Java
37
{
session = port.signOn( user, password );
} catch (
security.service.webservice.bl.cc.raritan.com.Authent
icationAndAuthorizationException ex )
{
auth_exception_handler( ex, "signOn()" );
System.exit(1);
}
current_name = get_input( "Enter the name of the
node to change: " );
new_name = get_input( "Enter the new name: " );
if( current_name != null && new_name != null )
{
try
{
if( node_service_port.renameNode( session,
current_name, new_name ) )
System.out.println( "Node name successfully
changed to " + new_name );
else
System.err.println( "renameNode() failed
without an exception." );
} catch(
node.service.webservice.bl.cc.raritan.com.NodeManagem
entException ex )
{
System.out.println( "NodeManagementException: "
+ ex.getFaultInfo().getMessage() );
System.out.println( "\t" +
ex.getFaultInfo().getCode() );
// ex.printStackTrace();
}