Example usage for java.rmi RemoteException RemoteException

List of usage examples for java.rmi RemoteException RemoteException

Introduction

In this page you can find the example usage for java.rmi RemoteException RemoteException.

Prototype

public RemoteException(String s, Throwable cause) 

Source Link

Document

Constructs a RemoteException with the specified detail message and cause.

Usage

From source file:gov.nih.nci.caarray.services.external.v1_0.grid.service.CaArraySvc_v1_0Impl.java

public gov.nih.nci.cagrid.enumeration.stubs.response.EnumerationResponseContainer enumerateExperimentsByKeyword(
        gov.nih.nci.caarray.external.v1_0.query.KeywordSearchCriteria criteria) throws RemoteException {
    try {/*  w ww. jav  a 2 s. com*/
        return EnumerateResponseFactory.createEnumerationResponse(new SearchEnumIterator<Experiment>(
                Experiment.class, getSearchUtils().experimentsByKeyword(criteria).iterator()));
    } catch (Exception e) {
        throw new RemoteException("Unable to create enumeration", e);
    }
}

From source file:org.molgenis.wikipathways.client.WikiPathwaysRESTBindingStub.java

@Override
public boolean removeCurationTag(String pwId, String tagName, WSAuth auth) throws RemoteException {
    try {/*ww w.j a v  a 2s  .c o  m*/
        String url = baseUrl + "/removeCurationTag?pwId=" + pwId + "&tagName=" + tagName + "&auth="
                + auth.getKey() + "&username=" + auth.getUser();
        Document jdomDocument = Utils.connect(url, client);
        String success = jdomDocument.getRootElement().getChild("success", WSNamespaces.NS1).getValue();
        if (success.equals("1")) {
            return true;
        }
        return false;
    } catch (Exception e) {
        throw new RemoteException(e.getMessage(), e.getCause());
    }
}

From source file:gov.nih.nci.caarray.services.external.v1_0.grid.service.CaArraySvc_v1_0Impl.java

public gov.nih.nci.cagrid.enumeration.stubs.response.EnumerationResponseContainer enumerateBiomaterials(
        gov.nih.nci.caarray.external.v1_0.query.BiomaterialSearchCriteria criteria) throws RemoteException {
    try {//  w  w w. ja  v  a 2s.com
        return EnumerateResponseFactory.createEnumerationResponse(new SearchEnumIterator<Biomaterial>(
                Biomaterial.class, getSearchUtils().biomaterialsByCriteria(criteria).iterator()));
    } catch (Exception e) {
        throw new RemoteException("Unable to create enumeration", e);
    }
}

From source file:com.amalto.core.delegator.IXtentisWSDelegator.java

@SuppressWarnings("nls")
@Override/*from   www .  ja va  2 s  .co m*/
public WSString putBusinessConcept(WSPutBusinessConcept wsPutBusinessConcept) throws RemoteException {
    WSBusinessConcept bc = wsPutBusinessConcept.getBusinessConcept();
    try {
        String s = "<xsd:element name=\"" + bc.getName() + "\" type=\"" + bc.getBusinessTemplate() + "\">"
                + "   <xsd:annotation>";
        WSI18NString[] labels = bc.getWsLabel();
        for (WSI18NString label : labels) {
            s += "<xsd:appinfo source=\"" + label.getLanguage() + "\">" + label.getLabel() + "</xsd:appinfo>";
        }
        WSI18NString[] docs = bc.getWsDescription();
        for (WSI18NString doc : docs) {
            s += "<xsd:documentation xml:lang=\"" + doc.getLanguage() + "\">" + doc.getLabel()
                    + "</xsd:documentation>";
        }
        s += "   </xsd:annotation>" + "   <xsd:unique name=\"" + bc.getName() + "\">"
                + "      <xsd:selector xpath=\"" + bc.getWsUniqueKey().getSelectorpath() + "\"/>";
        for (int i = 0; i < bc.getWsUniqueKey().getFieldpath().length; i++) {
            s += "<xsd:field xpath=\"" + bc.getWsUniqueKey().getFieldpath()[i] + "\"/>";
        }
        s += "   </xsd:unique>" + "</xsd:element>";
        return new WSString(Util.getDataModelCtrlLocal().putBusinessConceptSchema(
                new DataModelPOJOPK(wsPutBusinessConcept.getWsDataModelPK().getPk()), s));
    } catch (Exception e) {
        throw new RemoteException(
                (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e);
    }
}

From source file:org.molgenis.wikipathways.client.WikiPathwaysRESTBindingStub.java

@Override
public boolean saveCurationTag(String pwId, String tagName, String tagText, int revision, WSAuth auth)
        throws RemoteException {
    try {//from  w w w. j a v  a 2 s . co  m
        String url = baseUrl + "/saveCurationTag?pwId=" + pwId + "&tagName=" + tagName + "&text="
                + URLEncoder.encode(tagText, "UTF-8") + "&revision=" + revision + "&auth=" + auth.getKey()
                + "&username=" + auth.getUser();
        Document jdomDocument = Utils.connect(url, client);
        String success = jdomDocument.getRootElement().getChild("success", WSNamespaces.NS1).getValue();
        if (success.equals("1")) {
            return true;
        }
        return false;
    } catch (Exception e) {
        throw new RemoteException(e.getMessage(), e.getCause());
    }
}

From source file:org.pathvisio.wikipathways.webservice.WikiPathwaysRESTBindingStub.java

@Override
public boolean saveCurationTag(String pwId, String tagName, String tagText, int revision, WSAuth auth)
        throws RemoteException {
    try {/*from  w  w w. j av a  2  s  . c  o m*/
        String url = baseUrl + "/saveCurationTag?pwId=" + pwId + "&tagName=" + tagName + "&text="
                + URLEncoder.encode(tagText, "UTF-8") + "&revision=" + revision + "&auth=" + auth.getKey()
                + "&username=" + auth.getUser();
        Document jdomDocument = Utils.connect(url, client);
        String success = jdomDocument.getRootElement().getChild("success", WSNamespaces.NS1).getValue();

        if (success.equals("1")) {
            return true;
        }
        return false;
    } catch (Exception e) {
        throw new RemoteException(e.getMessage(), e.getCause());
    }
}

From source file:gov.nih.nci.caarray.services.external.v1_0.grid.service.CaArraySvc_v1_0Impl.java

public gov.nih.nci.cagrid.enumeration.stubs.response.EnumerationResponseContainer enumerateBiomaterialsByKeyword(
        gov.nih.nci.caarray.external.v1_0.query.BiomaterialKeywordSearchCriteria criteria)
        throws RemoteException {
    try {//from   w  w w  . j  a  v  a  2s . com
        return EnumerateResponseFactory.createEnumerationResponse(new SearchEnumIterator<Biomaterial>(
                Biomaterial.class, getSearchUtils().biomaterialsByKeyword(criteria).iterator()));
    } catch (Exception e) {
        throw new RemoteException("Unable to create enumeration", e);
    }
}

From source file:com.amalto.core.delegator.IXtentisWSDelegator.java

@Override
public WSString putBusinessConceptSchema(WSPutBusinessConceptSchema wsPutBusinessConceptSchema)
        throws RemoteException {
    try {/*from  ww  w  .j  a v a 2s.  c  o m*/
        return new WSString(Util.getDataModelCtrlLocal().putBusinessConceptSchema(
                new DataModelPOJOPK(wsPutBusinessConceptSchema.getWsDataModelPK().getPk()),
                wsPutBusinessConceptSchema.getBusinessConceptSchema()));
    } catch (Exception e) {
        throw new RemoteException(
                (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e);
    }
}

From source file:org.molgenis.wikipathways.client.WikiPathwaysRESTBindingStub.java

@Override
public boolean saveOntologyTag(String pwId, String term, String termId, WSAuth auth) throws RemoteException {
    try {/*from w  w w .j a  v  a2s .com*/
        String url = baseUrl + "/saveOntologyTag?pwId=" + pwId + "&term=" + URLEncoder.encode(term, "UTF-8")
                + "&termId=" + termId + "&auth=" + auth.getKey() + "&user=" + auth.getUser();
        Document jdomDocument = Utils.connect(url, client);
        String success = jdomDocument.getRootElement().getChild("success", WSNamespaces.NS1).getValue();
        if (success.equals("1")) {
            return true;
        }
        return false;
    } catch (Exception e) {
        throw new RemoteException(e.getMessage(), e.getCause());
    }
}

From source file:gov.nih.nci.caarray.services.external.v1_0.grid.service.CaArraySvc_v1_0Impl.java

public gov.nih.nci.cagrid.enumeration.stubs.response.EnumerationResponseContainer enumerateHybridizations(
        gov.nih.nci.caarray.external.v1_0.query.HybridizationSearchCriteria criteria) throws RemoteException {
    try {/* ww w.  ja  va2  s . co  m*/
        return EnumerateResponseFactory.createEnumerationResponse(new SearchEnumIterator<Hybridization>(
                Hybridization.class, getSearchUtils().hybridizationsByCriteria(criteria).iterator()));
    } catch (Exception e) {
        throw new RemoteException("Unable to create enumeration", e);
    }
}