use of org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSPortTypePortType in project opennms by OpenNMS.
the class RemedyTicketerPlugin method save.
private void save(Ticket newTicket) throws PluginException {
HPD_IncidentInterface_Create_WSPortTypePortType port = getCreateTicketServicePort(m_createportname, m_createendpoint);
try {
String incident_number = port.helpDesk_Submit_Service(getRemedyAuthenticationHeader(), getRemedyCreateInputMap(newTicket)).getIncident_Number();
LOG.debug("created new remedy ticket with reported incident number: {}", incident_number);
newTicket.setId(incident_number);
} catch (RemoteException e) {
e.printStackTrace();
throw new PluginException("Problem saving ticket", e);
}
}
use of org.opennms.integration.remedy.ticketservice.HPD_IncidentInterface_Create_WSPortTypePortType 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;
}
Aggregations