Search in sources :

Example 16 with ServiceException

use of javax.xml.rpc.ServiceException in project opennms by OpenNMS.

the class RemedyTicketerPlugin method getCreateTicketServicePort.

/**
 * Convenience method for initialising the ticketServicePort and correctly setting the endpoint.
 *
 * @return TicketServicePort to connect to the remote service.
 */
private HPD_IncidentInterface_Create_WSPortTypePortType getCreateTicketServicePort(String portname, String endpoint) throws PluginException {
    HPD_IncidentInterface_Create_WSServiceLocator service = new HPD_IncidentInterface_Create_WSServiceLocator();
    HPD_IncidentInterface_Create_WSPortTypePortType port = null;
    try {
        service.setEndpointAddress(portname, endpoint);
        port = service.getHPD_IncidentInterface_Create_WSPortTypeSoap();
    } catch (ServiceException e) {
        LOG.error("Failed initialzing Remedy TicketServicePort", e);
        throw new PluginException("Failed initialzing Remedy TicketServicePort", e);
    }
    return port;
}
Also used : ServiceException(javax.xml.rpc.ServiceException) HPD_IncidentInterface_Create_WSServiceLocator(org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSServiceLocator) HPD_IncidentInterface_Create_WSPortTypePortType(org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSPortTypePortType)

Example 17 with ServiceException

use of javax.xml.rpc.ServiceException in project vcell by virtualcell.

the class AnnotationMapping method getNameRef.

public static ArrayList<String> getNameRef(ArrayList<Xref> xRef, String entryName) {
    CachedDataBaseReferenceReader dbReader = CachedDataBaseReferenceReader.getCachedReader();
    ArrayList<String> names = new ArrayList<String>();
    for (Xref xref : xRef) {
        try {
            // System.out.println(xref.getDb() + "***" + xref.getId());
            if (xref.getDb().toLowerCase().equals("uniprot")) {
                String name = dbReader.getMoleculeDataBaseReference(xref.getId());
                if (name != null)
                    names.add(name);
            // System.out.println(xref.getId() + ">>>>>>>"+ name);
            } else if (xref.getDb().toLowerCase().equals("interpro")) {
                String name = dbReader.getMoleculeDataBaseReference("interpro", xref.getId());
                if (name != null)
                    names.add(name);
            // System.out.println(xref.getId() + ">>>>>>>"+ name);
            } else if (xref.getDb().toLowerCase().equals("obo.chebi")) {
                String id = xref.getId().substring(6);
                String name = dbReader.getChEBIName(id);
                if (name != null)
                    names.add(name);
            // System.out.println(xref.getId() + ">>>>>>>"+ name);
            } else if (xref.getDb().toLowerCase().equals("gene_ontology")) {
                String name = dbReader.getGOTerm(xref.getId());
                if (name != null)
                    names.add(name);
            // System.out.println(xref.getId() + ">>>>>>>"+ name);
            } else // else if(xref.getDb().toLowerCase().equals("ec-code")){
            // WSDBFetchServerServiceLocator providerLocator = new WSDBFetchServerServiceLocator();
            // WSDBFetchServer server = providerLocator.getWSDbfetch();
            // String[] supported = server.getSupportedDBs();
            // for (int i = 0; i < supported.length; i++) {
            // System.out.println(supported[i]);
            // }
            // String fetchResultStr = server.fetchBatch("embl", xref.getId(),null,null);
            // System.out.println(xref.getId() + ">>>>>>> lookup"+fetchResultStr);
            // }
            {
            // System.out.println(xref.getDb());
            }
        } catch (DbfConnException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (DbfNoEntryFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (DbfParamsException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (DbfException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (InputException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (RemoteException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ServiceException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (DataAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    if (names.size() == 0 && entryName != null)
        names.add(entryName);
    return names;
}
Also used : DbfNoEntryFoundException(uk.ac.ebi.jdbfetch.exceptions.DbfNoEntryFoundException) DbfException(uk.ac.ebi.jdbfetch.exceptions.DbfException) ArrayList(java.util.ArrayList) DbfParamsException(uk.ac.ebi.jdbfetch.exceptions.DbfParamsException) ServiceException(javax.xml.rpc.ServiceException) DbfNoEntryFoundException(uk.ac.ebi.jdbfetch.exceptions.DbfNoEntryFoundException) DbfParamsException(uk.ac.ebi.jdbfetch.exceptions.DbfParamsException) DataAccessException(org.vcell.util.DataAccessException) DbfException(uk.ac.ebi.jdbfetch.exceptions.DbfException) RemoteException(java.rmi.RemoteException) InputException(uk.ac.ebi.www.ws.services.WSDbfetch.InputException) DbfConnException(uk.ac.ebi.jdbfetch.exceptions.DbfConnException) Xref(org.vcell.pathway.Xref) UnificationXref(org.vcell.pathway.UnificationXref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) ServiceException(javax.xml.rpc.ServiceException) InputException(uk.ac.ebi.www.ws.services.WSDbfetch.InputException) DbfConnException(uk.ac.ebi.jdbfetch.exceptions.DbfConnException) RemoteException(java.rmi.RemoteException) DataAccessException(org.vcell.util.DataAccessException)

Example 18 with ServiceException

use of javax.xml.rpc.ServiceException in project tomcat by apache.

the class ServiceProxy method getProxyPortQNameClass.

/**
 * @param args Method call arguments
 * @return Returns the correct Port
 * @throws ServiceException if port's QName is an unknown Port (not defined in WSDL).
 */
private Object getProxyPortQNameClass(Object[] args) throws ServiceException {
    QName name = (QName) args[0];
    String nameString = name.getLocalPart();
    Class<?> serviceendpointClass = (Class<?>) args[1];
    for (@SuppressWarnings("unchecked") Iterator<QName> ports = service.getPorts(); ports.hasNext(); ) {
        QName portName = ports.next();
        String portnameString = portName.getLocalPart();
        if (portnameString.equals(nameString)) {
            return service.getPort(name, serviceendpointClass);
        }
    }
    // no ports have been found
    throw new ServiceException(sm.getString("serviceProxy.portNotFound", name));
}
Also used : ServiceException(javax.xml.rpc.ServiceException) QName(javax.xml.namespace.QName)

Aggregations

ServiceException (javax.xml.rpc.ServiceException)18 RemoteException (java.rmi.RemoteException)7 Remote (java.rmi.Remote)3 AddInteractiveRequest (com.AddressDoctor.validator2.addInteractive.Interactive.AddInteractiveRequest)2 AddInteractiveResponse (com.AddressDoctor.validator2.addInteractive.Interactive.AddInteractiveResponse)2 Authentication (com.AddressDoctor.validator2.addInteractive.Interactive.Authentication)2 InteractiveSoap (com.AddressDoctor.validator2.addInteractive.Interactive.InteractiveSoap)2 Parameters (com.AddressDoctor.validator2.addInteractive.Interactive.Parameters)2 SessionHeader (com.salesforce.soap.partner.SessionHeader)2 SforceServiceLocator (com.salesforce.soap.partner.SforceServiceLocator)2 LoginFault (com.salesforce.soap.partner.fault.LoginFault)2 QName (javax.xml.namespace.QName)2 TicketServiceLocator (org.opennms.integration.otrs.ticketservice.TicketServiceLocator)2 TicketServicePort_PortType (org.opennms.integration.otrs.ticketservice.TicketServicePort_PortType)2 Address (com.AddressDoctor.validator2.addInteractive.Interactive.Address)1 Result (com.AddressDoctor.validator2.addInteractive.Interactive.Result)1 LoginResult (com.salesforce.soap.partner.LoginResult)1 ApiFault (com.salesforce.soap.partner.fault.ApiFault)1 ExceptionCode (com.salesforce.soap.partner.fault.ExceptionCode)1 IOException (java.io.IOException)1