Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSResponseException


            exception = new HttpResponseException(command, response, message);
            String contentType = response.getPayload().getContentMetadata().getContentType();
            if (contentType != null && (contentType.indexOf("xml") != -1 || contentType.indexOf("unknown") != -1)) {
               UltraDNSWSError error = factory.create(handlers.get()).parse(message);
               if (error != null) {
                  exception = refineException(new UltraDNSWSResponseException(command, response, error));
               }
            }
         } else {
            exception = new HttpResponseException(command, response);
         }
View Full Code Here


      function.handleError(command, response);

      assertEquals(command.getException().getClass(), UltraDNSWSResponseException.class);
      assertEquals(command.getException().getMessage(), "Error 0");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException());

      assertEquals(exception.getError().getCode(), 0);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "Cannot find task with guid AAAAAAAAAAAAAAAA");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 0: Cannot find task with guid AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getDescription().get(), "Cannot find task with guid AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getCode(), 0);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "Account not found in the system. ID: AAAAAAAAAAAAAAAA");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 2401: Account not found in the system. ID: AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getDescription().get(), "Account not found in the system. ID: AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getCode(), 2401);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "Zone does not exist in the system.");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 1801: Zone does not exist in the system.");
      assertEquals(exception.getError().getDescription().get(), "Zone does not exist in the system.");
      assertEquals(exception.getError().getCode(), 1801);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "No Resource Record with GUID found in the system AAAAAAAAAAAAAAAA");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 2103: No Resource Record with GUID found in the system AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getDescription().get(), "No Resource Record with GUID found in the system AAAAAAAAAAAAAAAA");
      assertEquals(exception.getError().getCode(), 2103);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceAlreadyExistsException.class);
      assertEquals(command.getException().getMessage(), "Zone already exists in the system.");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 1802: Zone already exists in the system.");
      assertEquals(exception.getError().getDescription().get(), "Zone already exists in the system.");
      assertEquals(exception.getError().getCode(), 1802);
   }
View Full Code Here

      assertEquals(command.getException().getClass(), ResourceAlreadyExistsException.class);
      assertEquals(command.getException().getMessage(),
            "Resource Record of type 15 with these attributes already exists in the system.");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(),
            "Error 2111: Resource Record of type 15 with these attributes already exists in the system.");
      assertEquals(exception.getError().getDescription().get(),
            "Resource Record of type 15 with these attributes already exists in the system.");
      assertEquals(exception.getError().getCode(), 2111);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "Pool does not exist in the system");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 2911: Pool does not exist in the system");
      assertEquals(exception.getError().getDescription().get(), "Pool does not exist in the system");
      assertEquals(exception.getError().getCode(), 2911);
   }
View Full Code Here

      function.handleError(command, response);

      assertEquals(command.getException().getClass(), ResourceNotFoundException.class);
      assertEquals(command.getException().getMessage(), "No Pool or Multiple pools of same type exists for the PoolName : foo.jclouds.org.");

      UltraDNSWSResponseException exception = UltraDNSWSResponseException.class.cast(command.getException().getCause());

      assertEquals(exception.getMessage(), "Error 2142: No Pool or Multiple pools of same type exists for the PoolName : foo.jclouds.org.");
      assertEquals(exception.getError().getDescription().get(), "No Pool or Multiple pools of same type exists for the PoolName : foo.jclouds.org.");
      assertEquals(exception.getError().getCode(), 2142);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.ultradns.ws.UltraDNSWSResponseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.