Package javax.xml.rpc

Examples of javax.xml.rpc.ServiceException


        try {
            setComponentManager();

        } catch (ComponentException e) {
            throw new ServiceException("ComponentException generated", e);
        }
    }
View Full Code Here


    private void setContext(final Object context) throws ServiceException {
        try {
            m_endPointContext = (ServletEndpointContext) context;

        } catch (final ClassCastException e) {
            throw new ServiceException(
                "Service requires ServletEndPointContext, supplied was " + context, e
            );
        }

        m_context = m_endPointContext.getMessageContext();
View Full Code Here

   * @throws ServiceException if the context is not a ServletEndpointContext
   * @see #onInit
   */
  public final void init(Object context) throws ServiceException {
    if (!(context instanceof ServletEndpointContext)) {
      throw new ServiceException("ServletEndpointSupport needs ServletEndpointContext, not [" + context + "]");
    }
    this.servletEndpointContext = (ServletEndpointContext) context;
    ServletContext servletContext = this.servletEndpointContext.getServletContext();
    this.webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
    this.messageSourceAccessor = new MessageSourceAccessor(this.webApplicationContext);
View Full Code Here

   * @throws ServiceException if the context is not a ServletEndpointContext
   * @see #onInit
   */
  public final void init(Object context) throws ServiceException {
    if (!(context instanceof ServletEndpointContext)) {
      throw new ServiceException("ServletEndpointSupport needs ServletEndpointContext, not [" + context + "]");
    }
    this.servletEndpointContext = (ServletEndpointContext) context;
    ServletContext servletContext = this.servletEndpointContext.getServletContext();
    this.webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
    this.messageSourceAccessor = new MessageSourceAccessor(this.webApplicationContext);
View Full Code Here

      throws ServiceException {
    try {
      return (T) AdWordsServiceFactory.generateServiceStub(service, this,
          service.getEndpointServer(), true);
    } catch (ClassCastException e) {
      throw new ServiceException("Cannot cast service. "
          + "Check the type of return-capture variable.", e);
    }
  }
View Full Code Here

      throws ServiceException {
    try {
      return (T) AdWordsServiceFactory.generateServiceStub(service, this,
          service.getEndpointServer(), false);
    } catch (ClassCastException e) {
      throw new ServiceException("Cannot cast service. Check the type of return-capture variable.",
          e);
    }
  }
View Full Code Here

  public <T extends java.rmi.Remote> T getService(AdWordsService service, String endpointServer)
      throws ServiceException {
    try {
      return (T) AdWordsServiceFactory.generateServiceStub(service, this, endpointServer, false);
    } catch (ClassCastException e) {
      throw new ServiceException("Cannot cast service. Check the type of return-capture variable.",
          e);
    }
  }
View Full Code Here

                String.class, String.class, String.class, String.class,
                Boolean.class, Boolean.class).newInstance(user.getRegisteredAuthToken(),
                user.getClientCustomerId(), user.getDeveloperToken(),
                user.getClientLibraryIdentifier(), validateOnly, user.isUsingPartialFailure()));
      } catch (IllegalStateException e) {
        throw new ServiceException(
            "Could not get ClientLogin token for user: " + e.getMessage(), e);
      } catch (AuthTokenException e) {
        throw new ServiceException(
            "Could not get ClientLogin token for user: " + e.getMessage(), e);
      } catch (InstantiationException e) {
        throw new ServiceException("Could not create service class. Check classpath.", e);
      } catch (IllegalAccessException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (ClassNotFoundException e) {
        throw new ServiceException("Could not create service class. Check classpath.", e);
      } catch (IllegalArgumentException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (SecurityException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (InvocationTargetException e) {
        throw new ServiceException(e.getMessage(), e.getCause());
      } catch (NoSuchMethodException e) {
        throw new ServiceException("Could not create service class. "
            + "Check that the correct version of AXIS is being used.", e);
      }
    }
View Full Code Here

                String.class, String.class, String.class, String.class,
                Boolean.class, Boolean.class).newInstance(user.getRegisteredAuthToken(),
                user.getClientCustomerId(), user.getDeveloperToken(),
                user.getClientLibraryIdentifier(), validateOnly, user.isUsingPartialFailure()));
      } catch (IllegalStateException e) {
        throw new ServiceException(
            "Could not get ClientLogin token for user: " + e.getMessage(), e);
      } catch (AuthTokenException e) {
        throw new ServiceException(
            "Could not get ClientLogin token for user: " + e.getMessage(), e);
      } catch (InstantiationException e) {
        throw new ServiceException("Could not create service class. Check classpath.", e);
      } catch (IllegalAccessException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (ClassNotFoundException e) {
        throw new ServiceException("Could not create service class. Check classpath.", e);
      } catch (IllegalArgumentException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (SecurityException e) {
        throw new ServiceException(e.getMessage(), e);
      } catch (InvocationTargetException e) {
        throw new ServiceException(e.getMessage(), e.getCause());
      } catch (NoSuchMethodException e) {
        throw new ServiceException("Could not create service class. "
            + "Check that the correct version of AXIS is being used.", e);
      }
    }
View Full Code Here

      Stub stub = getConfiguredStub(axisService, service.getInterfaceClass(),
          service.getVersion(), user, validateOnly);
      ServiceAccountantManager.getInstance().putService(stub, user);
      return stub;
    } catch (InstantiationException e) {
      throw new ServiceException("Instace of stub could not be created.", e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException("This point should not have been reached.", e);
    } catch (ClassNotFoundException e) {
      throw new ServiceException("Could not locate an Axis generated class; check classpath.", e);
    } catch (NoSuchMethodException e) {
      throw new ServiceException("Error configuring service. "
          + "Check that the correct version of AXIS is being used.", e);
    } catch (InvocationTargetException e) {
      throw new ServiceException("Could not instantiate service class.", e.getCause());
    }
  }
View Full Code Here

TOP

Related Classes of javax.xml.rpc.ServiceException

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.