/** * Directly invoke an anonymous operation with an In-Only MEP. This method just sends your * supplied XML without the possibility of any response from the service (even an error - though * you can still get client-side errors such as "Host not found"). For more control, you can * instead create a client for the operation and use that client to execute the send. * * @param elem XML to send * @throws AxisFault ff something goes wrong trying to send the XML * @see #createClient(QName) */ public void fireAndForget(OMElement elem) throws AxisFault { fireAndForget(ANON_OUT_ONLY_OP, elem); }
/** * Directly invoke an anonymous operation with an In-Only MEP. This method just sends your * supplied XML without the possibility of any response from the service (even an error - though * you can still get client-side errors such as "Host not found"). For more control, you can * instead create a client for the operation and use that client to execute the send. * * @param elem XML to send * @throws AxisFault ff something goes wrong trying to send the XML * @see #createClient(QName) */ public void fireAndForget(OMElement elem) throws AxisFault { fireAndForget(ANON_OUT_ONLY_OP, elem); }
public void terminateSequence(String key) throws AxisFault { serviceClient.getOptions().setProperty(MercuryClientConstants.TERMINATE_MESSAGE, Constants.VALUE_TRUE); serviceClient.getOptions().setProperty(MercuryClientConstants.INTERNAL_KEY, key); serviceClient.fireAndForget(null); }
public static void main(String[] args) throws AxisFault { String axis2_xml = CLIENT_REPO_PATH + File.separator + "client_axis2.xml"; ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml); Options clientOptions = new Options (); clientOptions.setTo(new EndpointReference (toEPR)); ServiceClient serviceClient = new ServiceClient (configContext,null); clientOptions.setAction("urn:wsrm:Ping"); serviceClient.setOptions(clientOptions); serviceClient.fireAndForget(getPingOMBlock("ping1")); serviceClient.fireAndForget(getPingOMBlock("ping2")); clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true"); serviceClient.fireAndForget(getPingOMBlock("ping3")); serviceClient.cleanup(); }
public void sendRequestOneWay(String payloadStr, EndpointReference targetEPR) throws XMLStreamException, AxisFault { OMElement payload = AXIOMUtil.stringToOM(payloadStr); Options options = new Options(); options.setTo(targetEPR); ServiceClient sender = new ServiceClient(); sender.setOptions(options); log.info("Request: " + payload.toString()); sender.fireAndForget(payload); }
protected void sendNotification(OMElement topicHeader, OMElement payload, String endpoint) throws AxisFault { // The parameter args is used as a mechanism to pass any argument into this method, which // is used by the implementations that extend the behavior of the default Carbon Event // Dispatcher. ServiceClient serviceClient = new ServiceClient(); Options options = new Options(); options.setTo(new EndpointReference(endpoint)); options.setAction(EventingConstants.WSE_PUBLISH); serviceClient.setOptions(options); serviceClient.addHeader(topicHeader); serviceClient.fireAndForget(payload); } }
protected void sendNotification(OMElement topicHeader, OMElement payload, String endpoint) throws AxisFault { // The parameter args is used as a mechanism to pass any argument into this method, which // is used by the implementations that extend the behavior of the default Carbon Event // Dispatcher. ServiceClient serviceClient = new ServiceClient(); Options options = new Options(); options.setTo(new EndpointReference(endpoint)); options.setAction(EventingConstants.WSE_PUBLISH); serviceClient.setOptions(options); serviceClient.addHeader(topicHeader); serviceClient.fireAndForget(payload); } }
serviceClient.setOptions(clientOptions); serviceClient.fireAndForget(getPingOMBlock("ping1")); serviceClient.fireAndForget(getPingOMBlock("ping2")); serviceClient.fireAndForget(getPingOMBlock("ping3"));
serviceClient.fireAndForget(getPingOMBlock("ping1")); serviceClient.fireAndForget(getPingOMBlock("ping2")); serviceClient.fireAndForget(getPingOMBlock("ping3"));
sc.fireAndForget(eventData);
serviceClient.setOptions(options); log.info("Sending an email notification to " + notification.getSendTo()); serviceClient.fireAndForget(payload);
protected void sendNotification(OMElement topicHeader, OMElement tenantDomainHeader, OMElement payload, String endpoint) throws AxisFault { // The parameter args is used as a mechanism to pass any argument into this method, which // is used by the implementations that extend the behavior of the default Carbon Event // Dispatcher. ServiceClient serviceClient = new ServiceClient(); Options options = new Options(); options.setTo(new EndpointReference(endpoint)); options.setAction(EventingConstants.WSE_PUBLISH); serviceClient.setOptions(options); serviceClient.addHeader(topicHeader); if (tenantDomainHeader != null){ serviceClient.addHeader(tenantDomainHeader); } serviceClient.fireAndForget(payload); }
serviceClient.fireAndForget(getPingOMBlock()); SandeshaClient.waitUntilSequenceCompleted(serviceClient);
try { serviceClient.setOptions(options); serviceClient.fireAndForget(event); serviceClient.cleanupTransport();
payload = payload.replace("$4", callBackURL != null ? callBackURL : "?"); client.fireAndForget(AXIOMUtil.stringToOM(payload)); super.execute(workflowDTO); } catch (AxisFault axisFault) {
serviceClient.fireAndForget(payload); System.out.println("Event sent to topic " + topic); Thread.sleep(1000);
serviceClient.fireAndForget(payload); System.out.println("Event sent to topic " + topic); Thread.sleep(1000);
serviceClient.fireAndForget(payload); System.out.println("Event sent to topic " + topic); Thread.sleep(1000);
try { serviceClient.fireAndForget (closeSequenceBody); } catch (AxisFault e) { String message = SandeshaMessageHelper.getMessage(
serviceClient.fireAndForget (null); } catch (AxisFault e) { String message = SandeshaMessageHelper.getMessage(