Search in sources :

Example 1 with HPD_IncidentInterface_Create_WSServiceLocator

use of org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSServiceLocator 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)

Aggregations

ServiceException (javax.xml.rpc.ServiceException)1 HPD_IncidentInterface_Create_WSPortTypePortType (org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSPortTypePortType)1 HPD_IncidentInterface_Create_WSServiceLocator (org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSServiceLocator)1