Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSError


         String message = data != null ? new String(data) : null;
         if (message != null) {
            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 {
View Full Code Here


public class TaskNotFoundTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/task_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

public class UltraWSExceptionTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zone_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

         String message = data != null ? new String(data) : null;
         if (message != null) {
            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 {
View Full Code Here

public class TaskNotFoundTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/task_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

public class UltraWSExceptionTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zone_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

         String message = data != null ? new String(data) : null;
         if (message != null) {
            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 {
View Full Code Here

public class TaskNotFoundTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/task_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

public class UltraWSExceptionTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zone_doesnt_exist.xml");

      UltraDNSWSError expected = expected();

      UltraWSExceptionHandler handler = injector.getInstance(UltraWSExceptionHandler.class);
      UltraDNSWSError result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

         String message = data != null ? new String(data) : null;
         if (message != null) {
            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 {
View Full Code Here

TOP

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

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.