protected void configureEndpoint(MessageExchange exchange, EndpointResolver resolver) throws JBIException { if (resolver != null) { exchange.setEndpoint(resolver.resolveEndpoint(getContext(), exchange, filter)); } }
protected void configureEndpoint(MessageExchange exchange, org.apache.servicemix.jbi.api.EndpointResolver resolver) throws JBIException { if (resolver != null) { exchange.setEndpoint(resolver.resolveEndpoint(getContext(), exchange, filter)); } } }
public void handleMessage(Message message) { ServiceEndpoint se = message.get(ServiceEndpoint.class); MessageExchange me = message.getContent(MessageExchange.class); if (se != null && me != null) { me.setEndpoint(se); } }
protected void configureEndpoint(MessageExchange exchange, EndpointResolver resolver) throws JBIException { if (resolver != null) { exchange.setEndpoint(resolver.resolveEndpoint(getContext(), exchange, filter)); } }
public WrappedRequestToProviderMessage(MessageExchange messageExchange) { super(messageExchange); ServiceEndpoint mockServiceEndpoint = Mockito.mock(ServiceEndpoint.class); ServiceEndpoint endpoint = messageExchange.getEndpoint(); String endpointName = null; if (endpoint != null) { endpointName = endpoint.getEndpointName(); } QName serviceName = messageExchange.getService(); when(mockServiceEndpoint.getEndpointName()).thenReturn(endpointName); when(mockServiceEndpoint.getServiceName()).thenReturn(serviceName); messageExchange.setEndpoint(mockServiceEndpoint); setRole(Role.PROVIDER); }
private void resolveEndpoint(MessageExchange messageExchange) throws MessagingException { ServiceEndpoint endpoint = MockComponentContext.resolveServiceEndpoint(messageExchange .getService()); if (endpoint != null) { messageExchange.setEndpoint(endpoint); } else { throw new MessagingException("Endpoint not avalaible"); } }
String[] parts = URIResolver.split3(uri2); ServiceEndpoint se = context.getEndpoint(new QName(parts[0], parts[1]), parts[2]); exchange.setEndpoint(se); } else { DocumentFragment epr = URIResolver.createWSAEPR(uri); ServiceEndpoint se = context.resolveEndpointReference(epr); exchange.setEndpoint(se);
String[] parts = URIResolver.split3(uri2); ServiceEndpoint se = context.getEndpoint(new QName(parts[0], parts[1]), parts[2]); exchange.setEndpoint(se); } else { DocumentFragment epr = URIResolver.createWSAEPR(uri); ServiceEndpoint se = context.resolveEndpointReference(epr); exchange.setEndpoint(se);
String[] parts = URIResolver.split3(uri2); ServiceEndpoint se = context.getEndpoint(new QName(parts[0], parts[1]), parts[2]); exchange.setEndpoint(se); } else { DocumentFragment epr = URIResolver.createWSAEPR(uri); ServiceEndpoint se = context.resolveEndpointReference(epr); exchange.setEndpoint(se);
endpointName = (String) props.get(Endpoint.NAME); me.setEndpoint(new ServiceEndpointImpl(serviceName, endpointName));
/** * Configures the target on the newly created exchange * @param exchange the exchange to configure * @throws MessagingException if the target could not be configured */ public void configureTarget(MessageExchange exchange, ComponentContext context) throws MessagingException { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } if (uri != null) { URIResolver.configureExchange(exchange, context, uri); } if (interf != null) { exchange.setInterfaceName(interf); } if (operation != null) { exchange.setOperation(operation); } if (service != null) { exchange.setService(service); if (endpoint != null) { ServiceEndpoint se = context.getEndpoint(service, endpoint); exchange.setEndpoint(se); } } }
/** * Configures the target on the newly created exchange * @param exchange the exchange to configure * @throws MessagingException if the target could not be configured */ public void configureTarget(MessageExchange exchange, ComponentContext context) throws MessagingException { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } if (uri != null) { URIResolver.configureExchange(exchange, context, uri); } if (interf != null) { exchange.setInterfaceName(interf); } if (operation != null) { exchange.setOperation(operation); } if (service != null) { exchange.setService(service); if (endpoint != null) { ServiceEndpoint se = context.getEndpoint(service, endpoint); exchange.setEndpoint(se); } } }
protected void configureExchangeTarget(MessageExchange exchange) { if (targetUri != null) { URIResolver.configureExchange(exchange, getContext(), targetUri); } if (exchange.getInterfaceName() == null && targetInterface != null) { exchange.setInterfaceName(targetInterface); } if (exchange.getOperation() == null && targetOperation != null) { exchange.setOperation(targetOperation); } if (exchange.getService() == null && targetService != null) { exchange.setService(targetService); if (targetEndpoint != null) { ServiceEndpoint se = getContext().getEndpoint(targetService, targetEndpoint); if (se != null) { exchange.setEndpoint(se); } else { logger.warn("Target service (" + targetService + ") and endpoint (" + targetEndpoint + ")" + " specified, but no matching endpoint found. Only the service will be used for routing."); } } } }
/** * Configures the target on the newly created exchange * @param exchange the exchange to configure * @throws MessagingException if the target could not be configured */ public void configureTarget(MessageExchange exchange, ComponentContext context) throws MessagingException { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } if (uri != null) { URIResolver.configureExchange(exchange, context, uri); } if (interf != null) { exchange.setInterfaceName(interf); } if (operation != null) { exchange.setOperation(operation); } if (service != null) { exchange.setService(service); if (endpoint != null) { ServiceEndpoint se = context.getEndpoint(service, endpoint); exchange.setEndpoint(se); } } }
/** * Configures the target on the newly created exchange * @param exchange the exchange to configure * @throws MessagingException if the target could not be configured */ public void configureTarget(MessageExchange exchange) throws MessagingException { if (targetInterface == null && targetService == null && targetUri == null) { throw new MessagingException("target's interface, service or uri should be specified"); } if (targetUri != null) { URIResolver.configureExchange(exchange, getContext(), targetUri); } if (targetInterface != null) { exchange.setInterfaceName(targetInterface); } if (targetOperation != null) { exchange.setOperation(targetOperation); } if (targetService != null) { exchange.setService(targetService); if (targetEndpoint != null) { ServiceEndpoint se = getContext().getEndpoint(targetService, targetEndpoint); exchange.setEndpoint(se); } } }
me.setMessage(nm, "in"); nm.setContent(new StringSource(content)); me.setEndpoint(endpoint); if (operation != null) { me.setOperation(QNameUtil.parse(operation));
try { jbiMex = mexf.createExchange(isTwoWay ? MessageExchangePattern.IN_OUT : MessageExchangePattern.IN_ONLY); jbiMex.setEndpoint(se); jbiMex.setService(se.getServiceName()); jbiMex.setOperation(opname);
concrete.setEndpoint(cc.getEndpoint(fake.getEndpoint().getServiceName(), fake.getEndpoint().getEndpointName())); } else { concrete.setEndpoint(null);
fake.setEndpoint(new org.objectweb.petals.tools.rmi.common.serializable. ServiceEndpoint(concrete.getEndpoint().getServiceName(), concrete.getEndpoint().getEndpointName(), concrete.getEndpoint().getInterfaces())); } else { fake.setEndpoint(null);
me.setOperation(context.getExchange().getOperation().getQName()); me.setService((QName) context.getService().getProperty(JBI_SERVICE_NAME)); me.setEndpoint((ServiceEndpoint) context.getService().getProperty(JBI_ENDPOINT)); NormalizedMessage msg = me.createMessage(); me.setMessage(msg, "in");