Exemple #1
0
 public static void main(String[] args) {
   try {
     getConnectionParameters(args);
     getInputParameters(args);
     if (help) {
       printUsage();
       return;
     }
     connect();
     displayStats();
   } catch (IllegalArgumentException e) {
     System.out.println(e.getMessage());
     printUsage();
   } catch (SOAPFaultException sfe) {
     printSoapFaultException(sfe);
   } catch (Exception e) {
     e.printStackTrace();
   } finally {
     try {
       disconnect();
     } catch (SOAPFaultException sfe) {
       printSoapFaultException(sfe);
     } catch (Exception e) {
       System.out.println("Failed to disconnect - " + e.getMessage());
       e.printStackTrace();
     }
   }
 }
Exemple #2
0
 public static void main(String[] args) {
   try {
     getConnectionParameters(args);
     if (help) {
       printUsage();
       return;
     }
     long bTime = System.currentTimeMillis();
     connect();
     printHostProductDetails();
     long eTime = System.currentTimeMillis();
     System.out.println("Total time in milli secs to get the product line id: " + (eTime - bTime));
   } catch (IllegalArgumentException e) {
     System.out.println(e.getMessage());
     printUsage();
   } catch (SOAPFaultException sfe) {
     printSoapFaultException(sfe);
   } catch (Exception e) {
     e.printStackTrace();
   } finally {
     try {
       disconnect();
     } catch (SOAPFaultException sfe) {
       printSoapFaultException(sfe);
     } catch (Exception e) {
       System.out.println("Failed to disconnect - " + e.getMessage());
       e.printStackTrace();
     }
   }
 }