public void setAcksToEndpointReference(EndpointReference acksToEndpointRef){ this.acksToEndpointRef = acksToEndpointRef; if(acksToEndpointRef != null){ acksToEPR = acksToEndpointRef.getAddress(); } }
public StoreMessage(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); /* * Validate */ int biginIndex = address.indexOf("clientid"); if (biginIndex == -1) { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public StoreMessage(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); /* * Validate */ int biginIndex = address.indexOf("clientid"); if (biginIndex == -1) { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public TakeMessages(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); int biginIndex = address.indexOf("clientid"); if (biginIndex != -1) { msgBoxId = address.substring(biginIndex + "clientid".length() + 1); } else { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public DestroyMsgBox(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); int biginIndex = address.indexOf("clientid"); if (biginIndex != -1) { msgBoxId = address.substring(biginIndex + "clientid".length() + 1); } else { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public TakeMessages(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); int biginIndex = address.indexOf("clientid"); if (biginIndex != -1) { msgBoxId = address.substring(biginIndex + "clientid".length() + 1); } else { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public DestroyMsgBox(EndpointReference msgBoxEpr, long timeout) throws AxisFault { this.msgBoxEndPointReference = msgBoxEpr; this.timeoutInMilliSeconds = timeout; String address = msgBoxEpr.getAddress(); int biginIndex = address.indexOf("clientid"); if (biginIndex != -1) { msgBoxId = address.substring(biginIndex + "clientid".length() + 1); } else { throw new AxisFault("Invalid Message Box EPR cannot find message box ID"); } }
public void onSucessfullDelivery(EndpointReference consumerEndpointReference, long timeTaken) { RunTimeStatistics.addNewSuccessfulDeliverTime(timeTaken); synchronized (failedConsumerUrls) { FailedConsumerInfo info = failedConsumerUrls.remove(consumerEndpointReference.getAddress()); if (info != null) { logger.debug(String.format("message was delivered to " + "previously %d times failed url : %s", info.getNumberOfTimesTried(), consumerEndpointReference.getAddress())); } } }
private String getClientId(MessageContext inMsg) throws AxisFault { String toAddress = inMsg.getTo().getAddress(); int biginIndex = toAddress.indexOf("clientid"); if (biginIndex == -1) { throw new AxisFault("clientid cannot be found"); } String clientId = toAddress.substring(biginIndex + "clientid".length() + 1); return clientId; }
protected org.apache.axis2.addressing.EndpointReference getWSATOEPR(WebServiceBinding binding) { org.apache.axis2.addressing.EndpointReference epr = getEPR(binding); if (epr == null) { epr = getPortLocationEPR(binding); } else if (epr.getAddress() == null || epr.getAddress().length() < 1) { org.apache.axis2.addressing.EndpointReference bindingEPR = getPortLocationEPR(binding); if (bindingEPR != null) { epr.setAddress(bindingEPR.getAddress()); } } return epr; }
public static Subscription renewMessageboxSubscription(String brokerLocation, EndpointReference eprOfMessageBox, String SubscriptionID, String topic, String xpath, boolean subscribePermanatly) throws Exception { return new MessageBoxNotificationHandler(eprOfMessageBox.getAddress(), brokerLocation) .renewMessageboxSubscription(eprOfMessageBox, SubscriptionID, topic, xpath, subscribePermanatly); }
public String getEPR(AxisService service) throws AxisFault { EndpointReference[] endpointReferences = trpInDesc.getReceiver().getEPRsForService(service.getName(), "localhost"); return endpointReferences != null && endpointReferences.length > 0 ? endpointReferences[0].getAddress() : null; } }
public String getEPR(AxisService service) throws AxisFault { EndpointReference[] endpointReferences = trpInDesc.getReceiver().getEPRsForService(service.getName(), "localhost"); return endpointReferences != null && endpointReferences.length > 0 ? endpointReferences[0].getAddress() : null; } }
public String getEPR(AxisService service) throws AxisFault { EndpointReference[] endpointReferences = trpInDesc.getReceiver().getEPRsForService(service.getName(), "localhost"); return endpointReferences != null && endpointReferences.length > 0 ? endpointReferences[0].getAddress() : null; } }
@Override public AxisService findService(final MessageContext msgCtx) throws AxisFault { AxisService axisService = msgCtx.getAxisService(); if (axisService != null) return axisService; else if (msgCtx.getTo().getAddress().endsWith("msh")) return msgCtx.getConfigurationContext().getAxisConfiguration().getService("as4"); else return null; }
private String getOriginalServiceName(MessageContext messageContext) { String toAddress = messageContext.getTo().getAddress(); String[] values = Utils.parseRequestURLForServiceAndOperation(toAddress, messageContext .getConfigurationContext().getServiceContextPath()); return values[0]; }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { String soapAction = message.getNamespace().getNamespaceURI() + "/" + message.getLocalName(); Options opts = CommonRoutines.getOptions(soapAction, getTimeoutInMilliSeconds(), brokerEndpointRef); ServiceClient client = new ServiceClient(); CommonRoutines.setHeaders(soapAction, brokerEndpointRef.getAddress(), client); client.setOptions(opts); return client; }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { String soapAction = message.getNamespace().getNamespaceURI() + "/" + message.getLocalName(); Options opts = CommonRoutines.getOptions(soapAction, getTimeoutInMilliSeconds(), brokerEndpointRef); ServiceClient client = new ServiceClient(); CommonRoutines.setHeaders(soapAction, brokerEndpointRef.getAddress(), client); client.setOptions(opts); return client; }
private ServiceClient configureServiceClientForSubscription(OMElement message) throws AxisFault { String soapAction = message.getNamespace().getNamespaceURI() + "/" + message.getLocalName(); Options opts = CommonRoutines.getOptions(soapAction, getTimeoutInMilliSeconds(), brokerEndpointRef); ServiceClient client = new ServiceClient(); client.setOptions(opts); CommonRoutines.setHeaders(soapAction, brokerEndpointRef.getAddress(), client); return client; }
public void testUnconditionalRewriteScenario1() throws Exception { URLRewriteMediator mediator = new URLRewriteMediator(); RewriteAction action = new RewriteAction(); action.setValue(targetURL); RewriteRule rule = new RewriteRule(); rule.addRewriteAction(action); mediator.addRule(rule); MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>"); mediator.mediate(msgCtx); assertEquals(targetURL, msgCtx.getTo().getAddress()); }