Package javax.xml.rpc

Examples of javax.xml.rpc.ServiceException


                .getConstructor(String.class, String.class, authenticationClass)
                .newInstance(user.getNetworkCode(), user.getClientLibraryIdentifier(),
                    clientLogin));

      } catch (IllegalStateException e) {
        throw new ServiceException("Could not get ClientLogin token for user.", e);
      } catch (AuthTokenException e) {
        throw new ServiceException("Could not get ClientLogin token for user.", 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);
      } 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);
      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

  public <T extends java.rmi.Remote> T getService(DfpService service)
      throws ServiceException {
    try {
      return (T) DfpServiceFactory.generateSerivceStub(service, this, service.getEndpointServer());
    } catch (ClassCastException e) {
      throw new ServiceException("Cannot cast serivce. Check the type of return-capture variable.",
          e);
    }
  }
View Full Code Here

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

                if (seiFactory != null) {
                    return seiFactory.createServiceEndpoint();
                }
            }
        }
        throw new ServiceException("Unrecognized method name or argument list: " + method.getName());
    }
View Full Code Here

        return port;
    }

    public Call[] getCalls(final QName portName) throws ServiceException {

        if (portName == null) throw new ServiceException("Portname cannot be null");

        final SeiFactory factory = (SeiFactory) portToImplementationMap.get(portName.getLocalPart());
        if (factory == null) throw new ServiceException("No port for portname: " + portName);

        final OperationInfo[] operationInfos = factory.getOperationInfos();
        final javax.xml.rpc.Call[] array = new javax.xml.rpc.Call[operationInfos.length];
        for (int i = 0; i < operationInfos.length; i++) {
            final OperationInfo operation = operationInfos[i];
View Full Code Here

        if (portToImplementationMap.containsKey(portName)) {
            final SeiFactory seiFactory = (SeiFactory) portToImplementationMap.get(portName);
            final Remote port = seiFactory.createServiceEndpoint();
            return port;
        }
        throw new ServiceException("No port for portname: " + portName);
    }
View Full Code Here

        if (seiClassNameToFactoryMap.containsKey(className)) {
            final SeiFactory seiFactory = (SeiFactory) seiClassNameToFactoryMap.get(className);
            final Remote port = seiFactory.createServiceEndpoint();
            return port;
        }
        throw new ServiceException("no port for class " + className);
    }
View Full Code Here

        final Callback[] callbacks = new Callback[]{NoOp.INSTANCE, callback};
        Enhancer.registerCallbacks(serviceEndpointClass, callbacks);
        try {
            return (Remote) constructor.newInstance(new Object[]{serviceEndpoint});
        } catch (final InvocationTargetException e) {
            throw (ServiceException) new ServiceException("Could not construct service instance", e.getTargetException()).initCause(e);
        }
    }
View Full Code Here

        this.service = service;
        try {
            portQNameClass = Service.class.getDeclaredMethod("getPort", new Class[]{QName.class, Class.class});
            portClass = Service.class.getDeclaredMethod("getPort", new Class[]{Class.class});
        } catch (Exception e) {
            throw new ServiceException(e);
        }
    }
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.