Refine search
private static EndpointInfo getEndpointInfo(Exchange exchange) { if (exchange != null) { Endpoint endpoint = exchange.getEndpoint(); if (endpoint != null) { return endpoint.getEndpointInfo(); } } return null; }
private void handleAbort(Message message, W3CDOMStreamWriter writer) { message.getInterceptorChain().abort(); if (!message.getExchange().isOneWay()) { //server side inbound Endpoint e = message.getExchange().getEndpoint(); Message responseMsg = new MessageImpl(); responseMsg.setExchange(message.getExchange()); responseMsg = e.getBinding().createMessage(responseMsg); message.getExchange().setOutMessage(responseMsg); XMLStreamReader reader = message.getContent(XMLStreamReader.class); if (reader == null && writer != null) { reader = StaxUtils.createXMLStreamReader(writer.getDocument()); } InterceptorChain chain = OutgoingChainInterceptor .getOutInterceptorChain(message.getExchange()); responseMsg.setInterceptorChain(chain); responseMsg.put("LogicalHandlerInterceptor.INREADER", reader); chain.doIntercept(responseMsg); } }
public EndpointReference getEndpointReference(Element... referenceParameters) { WrappedMessageContext ctx = (WrappedMessageContext)getMessageContext(); org.apache.cxf.message.Message msg = ctx.getWrappedMessage(); Endpoint ep = msg.getExchange().getEndpoint(); builder.address(ep.getEndpointInfo().getAddress()); builder.serviceName(ep.getService().getName()); builder.endpointName(ep.getEndpointInfo().getName()); URI wsdlDescription = ep.getEndpointInfo().getProperty("URI", URI.class); if (wsdlDescription == null) { String address = ep.getEndpointInfo().getAddress();
public void handleMessage(Message message) throws Fault { String method = (String)message.get(Message.HTTP_REQUEST_METHOD); String query = (String)message.get(Message.QUERY_STRING); if (!"GET".equals(method) || StringUtils.isEmpty(query)) { return; } Endpoint endpoint = message.getExchange().getEndpoint(); synchronized (endpoint) { if (!StringUtils.isEmpty(contextName)) { AuthorizationPolicy policy = message.get(AuthorizationPolicy.class); if (policy == null) { handle401response(message, endpoint); return; } Subject subject = (Subject)authenticate(policy.getUserName(), policy.getPassword()); if (subject == null) { handle401response(message, endpoint); return; } } } }
protected void handleResponseInternal() throws IOException { Exchange exchange = outMessage.getExchange(); int responseCode = doProcessResponseCode(); Endpoint ep = exchange.getEndpoint(); if (null != ep && null != ep.getEndpointInfo() && null == ep.getEndpointInfo(). getProperty("org.apache.cxf.ws.addressing.MAPAggregator.decoupledDestination")) {
private static EndpointInfo getEndpointInfo(Exchange exchange) { if (exchange != null) { Endpoint endpoint = exchange.getEndpoint(); if (endpoint != null) { return endpoint.getEndpointInfo(); } } return null; }
if (!message.getExchange().isOneWay()) { Endpoint e = message.getExchange().getEndpoint(); Message responseMsg = new MessageImpl(); responseMsg.setExchange(message.getExchange()); responseMsg = e.getBinding().createMessage(responseMsg);
private Document getDocument(WSDLGetUtils utils, Message message, String base, Map<String, String> params, String ctxUri) { // cannot have two wsdl's being generated for the same endpoint at the same // time as the addresses may get mixed up // For WSDL's the WSDLWriter does not share any state between documents. // For XSD's, the WSDLGetUtils makes a copy of any XSD schema documents before updating // any addresses and returning them, so for both WSDL and XSD this is the only part that needs // to be synchronized. synchronized (message.getExchange().getEndpoint()) { return utils.getDocument(message, base, params, ctxUri, message.getExchange().getEndpoint().getEndpointInfo()); } }
public static Destination createDecoupledDestination( Exchange exchange, final EndpointReferenceType reference) { final EndpointInfo ei = exchange.getEndpoint().getEndpointInfo(); return new DecoupledDestination(ei, reference); }
public OperationResourceInfoComparator(Message m, String method) { this.message = m; if (message != null) { Object o = m.getExchange().getEndpoint().get("org.apache.cxf.jaxrs.comparator"); if (o != null) { rc = (ResourceComparator)o; } } this.httpMethod = method; }
private Document getDocument(WSDLGetUtils utils, Message message, String base, Map<String, String> params, String ctxUri) { // cannot have two wsdl's being generated for the same endpoint at the same // time as the addresses may get mixed up // For WSDL's the WSDLWriter does not share any state between documents. // For XSD's, the WSDLGetUtils makes a copy of any XSD schema documents before updating // any addresses and returning them, so for both WSDL and XSD this is the only part that needs // to be synchronized. synchronized (message.getExchange().getEndpoint()) { return utils.getDocument(message, base, params, ctxUri, message.getExchange().getEndpoint().getEndpointInfo()); } }
private static Destination createDecoupledDestination( Exchange exchange, final EndpointReferenceType reference) { final EndpointInfo ei = exchange.getEndpoint().getEndpointInfo(); return new DecoupledDestination(ei, reference); }
public ClassResourceInfoComparator(Message m) { this.message = m; if (message != null) { Object o = m.getExchange().getEndpoint().get("org.apache.cxf.jaxrs.comparator"); if (o != null) { rc = (ResourceComparator)o; } } }
private Document getDocument(Message message, String base, Map<String, String> params, String ctxUri) { // cannot have two wsdl's being generated for the same endpoint at the same // time as the addresses may get mixed up // For WSDL's the WSDLWriter does not share any state between documents. // For XSD's, the WSDLGetUtils makes a copy of any XSD schema documents before updating // any addresses and returning them, so for both WSDL and XSD this is the only part that needs // to be synchronized. synchronized (message.getExchange().getEndpoint()) { return new WSDLGetUtils().getDocument(message, base, params, ctxUri, message.getExchange().getEndpoint().getEndpointInfo()); } }
public static Destination createDecoupledDestination( Exchange exchange, final EndpointReferenceType reference) { final EndpointInfo ei = exchange.getEndpoint().getEndpointInfo(); return new DecoupledDestination(ei, reference); }
public static ClientProviderFactory getInstance(Message m) { Endpoint e = m.getExchange().getEndpoint(); return (ClientProviderFactory)e.get(CLIENT_FACTORY_NAME); }
private EndpointInfo getEPInfo(Message message) { Endpoint ep = message.getExchange().getEndpoint(); return (ep == null) ? new EndpointInfo() : ep.getEndpointInfo(); }
public static BindingOperationInfo getOperation(Exchange exchange, QName opName) { Endpoint ep = exchange.getEndpoint(); if (ep == null) { return null; } BindingInfo service = ep.getEndpointInfo().getBinding(); return service.getOperation(opName); } public static BindingOperationInfo getOperationForWrapperElement(Exchange exchange,
public static ServerProviderFactory getInstance(Message m) { Endpoint e = m.getExchange().getEndpoint(); return (ServerProviderFactory)e.get(SERVER_FACTORY_NAME); }
private EndpointInfo getEPInfo(Message message) { Endpoint ep = message.getExchange().getEndpoint(); return (ep == null) ? new EndpointInfo() : ep.getEndpointInfo(); }