10.07.2015 Views

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Web</strong> <strong>Services</strong> Operationslogout199Sample CodeFollowing is an example that contains an excerpt of the SOAP body for both the request andresponse.SOAP RequestSOAP ResponseC#private void logout(){if ( _isAuthenticated ){_out.info( "\nLogging out of <strong>NetSuite</strong>\n" );}}else{}// Logout from <strong>NetSuite</strong>Status status = (_service.logout()).status;if ( status.isSuccess == true ){_isAuthenticated = false;_out.info( "Logout successful" );}else{// Should never get here since any problems with the// logout should have resulted in a SOAP fault_out.error( getStatusDetails( status ) );}_out.info("\nThe logout() operation cannot be invoked because there is no active session. " +"You must be first logged on before attempting to logout.\n" );Javapublic void logout() throws RemoteException {if (_isAuthenticated) {_console.info("\nLogging out of <strong>NetSuite</strong>\n");// Logout from <strong>NetSuite</strong>Status status = (_port.logout()).getStatus();if (status.isIsSuccess() == true) {_isAuthenticated = false;_console.info("Logout successful");} else {<strong>SuiteTalk</strong> <strong>Platform</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!