Search in sources :

Example 1 with HPD_IncidentInterface_WSServiceLocator

use of org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_WSServiceLocator in project opennms by OpenNMS.

the class RemedyTicketerPlugin method getTicketServicePort.

/**
 * Convenience method for initializing the ticketServicePort and correctly setting the endpoint.
 *
 * @return TicketServicePort to connect to the remote service.
 */
private HPD_IncidentInterface_WSPortTypePortType getTicketServicePort(String portname, String endpoint) throws PluginException {
    HPD_IncidentInterface_WSServiceLocator service = new HPD_IncidentInterface_WSServiceLocator();
    HPD_IncidentInterface_WSPortTypePortType port = null;
    try {
        service.setEndpointAddress(portname, endpoint);
        port = service.getHPD_IncidentInterface_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_WSPortTypePortType(org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_WSPortTypePortType) HPD_IncidentInterface_WSServiceLocator(org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_WSServiceLocator)

Aggregations

ServiceException (javax.xml.rpc.ServiceException)1 HPD_IncidentInterface_WSPortTypePortType (org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_WSPortTypePortType)1 HPD_IncidentInterface_WSServiceLocator (org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_WSServiceLocator)1