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;
}
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;
}
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));
}
Aggregations