@Override public final boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, false); }
private boolean handleResponseOrFault(MessageContext messageContext, boolean isFault) throws Exception { Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest()); Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse()); MessageAddressingProperties requestMap = version.getMessageAddressingProperties((SoapMessage) messageContext.getRequest()); EndpointReference replyEpr = !isFault ? requestMap.getReplyTo() : requestMap.getFaultTo(); if (handleNoneAddress(messageContext, replyEpr)) { return false; } SoapMessage reply = (SoapMessage) messageContext.getResponse(); URI replyMessageId = getMessageId(reply); URI action = isFault ? faultAction : replyAction; MessageAddressingProperties replyMap = requestMap.getReplyProperties(replyEpr, action, replyMessageId); version.addAddressingHeaders(reply, replyMap); if (handleAnonymousAddress(messageContext, replyEpr)) { return true; } else { sendOutOfBand(messageContext, replyEpr); return false; } }
/** * Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link * org.springframework.ws.soap.addressing.version.AddressingVersion}. */ private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, AddressingVersion version, MessageAddressingProperties requestMap) { URI responseAction = getResponseAction(endpoint, requestMap); URI faultAction = getFaultAction(endpoint, requestMap); EndpointInterceptor[] interceptors = new EndpointInterceptor[preInterceptors.length + postInterceptors.length + 1]; System.arraycopy(preInterceptors, 0, interceptors, 0, preInterceptors.length); AddressingEndpointInterceptor interceptor = new AddressingEndpointInterceptor(version, messageIdStrategy, messageSenders, responseAction, faultAction); interceptors[preInterceptors.length] = interceptor; System.arraycopy(postInterceptors, 0, interceptors, preInterceptors.length + 1, postInterceptors.length); return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver); }
private boolean handleResponseOrFault(MessageContext messageContext, boolean isFault) throws Exception { Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest()); Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse()); MessageAddressingProperties requestMap = version.getMessageAddressingProperties((SoapMessage) messageContext.getRequest()); EndpointReference replyEpr = !isFault ? requestMap.getReplyTo() : requestMap.getFaultTo(); if (handleNoneAddress(messageContext, replyEpr)) { return false; } SoapMessage reply = (SoapMessage) messageContext.getResponse(); URI replyMessageId = getMessageId(reply); URI action = isFault ? faultAction : replyAction; MessageAddressingProperties replyMap = requestMap.getReplyProperties(replyEpr, action, replyMessageId); version.addAddressingHeaders(reply, replyMap); if (handleAnonymousAddress(messageContext, replyEpr)) { return true; } else { sendOutOfBand(messageContext, replyEpr); return false; } }
/** * Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link * org.springframework.ws.soap.addressing.version.AddressingVersion}. */ private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, AddressingVersion version, MessageAddressingProperties requestMap, MessageContext messageContext) { URI responseAction = getResponseAction(endpoint, requestMap); URI faultAction = getFaultAction(endpoint, requestMap); WebServiceMessageSender[] messageSenders = getMessageSenders(endpoint); MessageIdStrategy messageIdStrategy = getMessageIdStrategy(endpoint); List<EndpointInterceptor> interceptors = new ArrayList<EndpointInterceptor>(); interceptors.addAll(Arrays.asList(preInterceptors)); AddressingEndpointInterceptor addressingInterceptor = new AddressingEndpointInterceptor(version, messageIdStrategy, messageSenders, responseAction, faultAction); interceptors.add(addressingInterceptor); interceptors.addAll(Arrays.asList(postInterceptors)); if (this.smartInterceptors != null) { for (SmartEndpointInterceptor smartInterceptor : smartInterceptors) { if (smartInterceptor.shouldIntercept(messageContext, endpoint)) { interceptors.add(smartInterceptor); } } } return new SoapEndpointInvocationChain(endpoint, interceptors.toArray(new EndpointInterceptor[interceptors.size()]), actorsOrRoles, isUltimateReceiver); }
private boolean handleResponseOrFault(MessageContext messageContext, boolean isFault) throws Exception { Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest()); Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse()); MessageAddressingProperties requestMap = version.getMessageAddressingProperties((SoapMessage) messageContext.getRequest()); EndpointReference replyEpr = !isFault ? requestMap.getReplyTo() : requestMap.getFaultTo(); if (handleNoneAddress(messageContext, replyEpr)) { return false; } SoapMessage reply = (SoapMessage) messageContext.getResponse(); URI replyMessageId = getMessageId(reply); URI action = isFault ? faultAction : replyAction; MessageAddressingProperties replyMap = requestMap.getReplyProperties(replyEpr, action, replyMessageId); version.addAddressingHeaders(reply, replyMap); if (handleAnonymousAddress(messageContext, replyEpr)) { return true; } else { sendOutOfBand(messageContext, replyEpr); return false; } }
@Override public final boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, true); }
/** * Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link * org.springframework.ws.soap.addressing.version.AddressingVersion}. */ private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, AddressingVersion version, MessageAddressingProperties requestMap, MessageContext messageContext) { URI responseAction = getResponseAction(endpoint, requestMap); URI faultAction = getFaultAction(endpoint, requestMap); WebServiceMessageSender[] messageSenders = getMessageSenders(endpoint); MessageIdStrategy messageIdStrategy = getMessageIdStrategy(endpoint); List<EndpointInterceptor> interceptors = new ArrayList<EndpointInterceptor>(); interceptors.addAll(Arrays.asList(preInterceptors)); AddressingEndpointInterceptor addressingInterceptor = new AddressingEndpointInterceptor(version, messageIdStrategy, messageSenders, responseAction, faultAction); interceptors.add(addressingInterceptor); interceptors.addAll(Arrays.asList(postInterceptors)); if (this.smartInterceptors != null) { for (SmartEndpointInterceptor smartInterceptor : smartInterceptors) { if (smartInterceptor.shouldIntercept(messageContext, endpoint)) { interceptors.add(smartInterceptor); } } } return new SoapEndpointInvocationChain(endpoint, interceptors.toArray(new EndpointInterceptor[interceptors.size()]), actorsOrRoles, isUltimateReceiver); }
private boolean handleResponseOrFault(MessageContext messageContext, boolean isFault) throws Exception { Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest()); Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse()); MessageAddressingProperties requestMap = version.getMessageAddressingProperties((SoapMessage) messageContext.getRequest()); EndpointReference replyEpr = !isFault ? requestMap.getReplyTo() : requestMap.getFaultTo(); if (handleNoneAddress(messageContext, replyEpr)) { return false; } SoapMessage reply = (SoapMessage) messageContext.getResponse(); URI replyMessageId = getMessageId(reply); URI action = isFault ? faultAction : replyAction; MessageAddressingProperties replyMap = requestMap.getReplyProperties(replyEpr, action, replyMessageId); version.addAddressingHeaders(reply, replyMap); if (handleAnonymousAddress(messageContext, replyEpr)) { return true; } else { sendOutOfBand(messageContext, replyEpr); return false; } }
public final boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, true); }
/** * Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link * org.springframework.ws.soap.addressing.version.AddressingVersion}. */ private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, AddressingVersion version, MessageAddressingProperties requestMap, MessageContext messageContext) { URI responseAction = getResponseAction(endpoint, requestMap); URI faultAction = getFaultAction(endpoint, requestMap); WebServiceMessageSender[] messageSenders = getMessageSenders(endpoint); MessageIdStrategy messageIdStrategy = getMessageIdStrategy(endpoint); List<EndpointInterceptor> interceptors = new ArrayList<EndpointInterceptor>(); interceptors.addAll(Arrays.asList(preInterceptors)); AddressingEndpointInterceptor addressingInterceptor = new AddressingEndpointInterceptor(version, messageIdStrategy, messageSenders, responseAction, faultAction); interceptors.add(addressingInterceptor); interceptors.addAll(Arrays.asList(postInterceptors)); if (this.smartInterceptors != null) { for (SmartEndpointInterceptor smartInterceptor : smartInterceptors) { if (smartInterceptor.shouldIntercept(messageContext, endpoint)) { interceptors.add(smartInterceptor); } } } return new SoapEndpointInvocationChain(endpoint, interceptors.toArray(new EndpointInterceptor[interceptors.size()]), actorsOrRoles, isUltimateReceiver); }
public final boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, false); }
@Override public final boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, false); }
@Override public final boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, false); }
@Override public final boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, true); }
@Override public final boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return handleResponseOrFault(messageContext, true); }