Package org.springframework.remoting

Examples of org.springframework.remoting.RemoteLookupFailureException


      if (log.isDebugEnabled())
        log.debug("Terminating discovery service");

    }
    catch (IOException e) {
      throw new RemoteLookupFailureException("cannot create lookup discovery", e);
    }
    catch (InterruptedException e) {
      throw new NestedRuntimeException("lookup interrupted", e) {
      };
    }
View Full Code Here


        logger.debug("Located RMI stub with URL [" + getServiceUrl() + "]");
      }
      return stub;
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
    catch (NotBoundException ex) {
      throw new RemoteLookupFailureException(
          "Could not find RMI service [" + getServiceUrl() + "] in RMI registry", ex);
    }
    catch (RemoteException ex) {
      throw new RemoteLookupFailureException("Lookup of RMI stub failed", ex);
    }
  }
View Full Code Here

      stubProperties.put(BindingProvider.SOAPACTION_URI_PROPERTY, soapActionUri);
    }
    stubProperties.putAll(getCustomProperties());
    if (!stubProperties.isEmpty()) {
      if (!(stub instanceof BindingProvider)) {
        throw new RemoteLookupFailureException("Port stub of class [" + stub.getClass().getName() +
            "] is not a customizable JAX-WS stub: it does not implement interface [javax.xml.ws.BindingProvider]");
      }
      ((BindingProvider) stub).getRequestContext().putAll(stubProperties);
    }
  }
View Full Code Here

  public void prepare() throws RemoteLookupFailureException {
    try {
      this.hessianProxy = createHessianProxy(this.proxyFactory);
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
  }
View Full Code Here

      stubProperties.put(BindingProvider.SOAPACTION_URI_PROPERTY, soapActionUri);
    }
    stubProperties.putAll(getCustomProperties());
    if (!stubProperties.isEmpty()) {
      if (!(stub instanceof BindingProvider)) {
        throw new RemoteLookupFailureException("Port stub of class [" + stub.getClass().getName() +
            "] is not a customizable JAX-WS stub: it does not implement interface [javax.xml.ws.BindingProvider]");
      }
      ((BindingProvider) stub).getRequestContext().putAll(stubProperties);
    }
  }
View Full Code Here

      stubProperties.put(BindingProvider.SOAPACTION_URI_PROPERTY, soapActionUri);
    }
    stubProperties.putAll(getCustomProperties());
    if (!stubProperties.isEmpty()) {
      if (!(stub instanceof BindingProvider)) {
        throw new RemoteLookupFailureException("Port stub of class [" + stub.getClass().getName() +
            "] is not a customizable JAX-WS stub: it does not implement interface [javax.xml.ws.BindingProvider]");
      }
      ((BindingProvider) stub).getRequestContext().putAll(stubProperties);
    }
  }
View Full Code Here

  public void prepare() throws RemoteLookupFailureException {
    try {
      this.hessianProxy = createHessianProxy(this.proxyFactory);
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
  }
View Full Code Here

                  this.portQName + "] - " + (!isImpl ? "not" : "") + " directly implemented");
            }
          }

          if (!(remoteObj instanceof Stub)) {
            throw new RemoteLookupFailureException("Port stub of class [" + remoteObj.getClass().getName() +
                "] is not a valid JAX-RPC stub: it does not implement interface [javax.xml.rpc.Stub]");
          }
          Stub stub = (Stub) remoteObj;

          // Apply properties to JAX-RPC stub.
          preparePortStub(stub);

          // Allow for custom post-processing in subclasses.
          postProcessPortStub(stub);

          this.portStub = remoteObj;
        }

        else {
          // No JAX-RPC-compliant port interface -> using JAX-RPC dynamic calls.
          if (logger.isDebugEnabled()) {
            logger.debug("Using JAX-RPC dynamic calls for JAX-RPC port [" + this.portQName + "]");
          }
        }

        this.serviceToUse = service;
      }
      catch (ServiceException ex) {
        throw new RemoteLookupFailureException(
            "Failed to initialize service for JAX-RPC port [" + this.portQName + "]", ex);
      }
    }
  }
View Full Code Here

        logger.debug("Located RMI stub with URL [" + getServiceUrl() + "]");
      }
      return stub;
    }
    catch (MalformedURLException ex) {
      throw new RemoteLookupFailureException("Service URL [" + getServiceUrl() + "] is invalid", ex);
    }
    catch (NotBoundException ex) {
      throw new RemoteLookupFailureException(
          "Could not find RMI service [" + getServiceUrl() + "] in RMI registry", ex);
    }
    catch (RemoteException ex) {
      throw new RemoteLookupFailureException("Lookup of RMI stub failed", ex);
    }
  }
View Full Code Here

      if (getServiceInterface() != null && Remote.class.isAssignableFrom(getServiceInterface())) {
        try {
          stub = PortableRemoteObject.narrow(stub, getServiceInterface());
        }
        catch (ClassCastException ex) {
          throw new RemoteLookupFailureException(
              "Could not narrow RMI stub to service interface [" + getServiceInterface().getName() + "]", ex);
        }
      }
      if (!(stub instanceof Remote)) {
        throw new RemoteLookupFailureException("Located RMI stub of class [" + stub.getClass().getName() +
            "], with JNDI name [" + getJndiName() + "], does not implement interface [java.rmi.Remote]");
      }
      return (Remote) stub;
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.remoting.RemoteLookupFailureException

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.