@Override public void send(WebServiceMessage message) throws IOException { delegate.send(message); } }
.send(Mockito.any(WebServiceMessage.class));
/** Sends the request in the given message context over the connection. */ private void sendRequest(WebServiceConnection connection, WebServiceMessage request) throws IOException { if (sentMessageTracingLogger.isTraceEnabled()) { ByteArrayOutputStream os = new ByteArrayOutputStream(); request.writeTo(os); sentMessageTracingLogger.trace("Sent request [" + os.toString("UTF-8") + "]"); } else if (sentMessageTracingLogger.isDebugEnabled()) { sentMessageTracingLogger.debug("Sent request [" + request + "]"); } connection.send(request); }
/** Sends the request in the given message context over the connection. */ private void sendRequest(WebServiceConnection connection, WebServiceMessage request) throws IOException { if (sentMessageTracingLogger.isTraceEnabled()) { ByteArrayOutputStream os = new ByteArrayOutputStream(); request.writeTo(os); sentMessageTracingLogger.trace("Sent request [" + os.toString("UTF-8") + "]"); } else if (sentMessageTracingLogger.isDebugEnabled()) { sentMessageTracingLogger.debug("Sent request [" + request + "]"); } connection.send(request); }
/** Sends the request in the given message context over the connection. */ private void sendRequest(WebServiceConnection connection, WebServiceMessage request) throws IOException { if (sentMessageTracingLogger.isTraceEnabled()) { ByteArrayOutputStream os = new ByteArrayOutputStream(); request.writeTo(os); sentMessageTracingLogger.trace("Sent request [" + os.toString("UTF-8") + "]"); } else if (sentMessageTracingLogger.isDebugEnabled()) { sentMessageTracingLogger.debug("Sent request [" + request + "]"); } connection.send(request); }
/** Sends the request in the given message context over the connection. */ private void sendRequest(WebServiceConnection connection, WebServiceMessage request) throws IOException { if (sentMessageTracingLogger.isTraceEnabled()) { ByteArrayOutputStream os = new ByteArrayOutputStream(); request.writeTo(os); sentMessageTracingLogger.trace("Sent request [" + os.toString("UTF-8") + "]"); } else if (sentMessageTracingLogger.isDebugEnabled()) { sentMessageTracingLogger.debug("Sent request [" + request + "]"); } connection.send(request); }
private void sendOutOfBand(MessageContext messageContext, EndpointReference replyEpr) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Request [" + messageContext.getRequest() + "] has [" + replyEpr + "] reply address; sending out-of-band reply [" + messageContext.getResponse() + "]"); } boolean supported = false; for (WebServiceMessageSender messageSender : messageSenders) { if (messageSender.supports(replyEpr.getAddress())) { supported = true; WebServiceConnection connection = null; try { connection = messageSender.createConnection(replyEpr.getAddress()); connection.send(messageContext.getResponse()); break; } finally { messageContext.clearResponse(); if (connection != null) { connection.close(); } } } } if (!supported && logger.isWarnEnabled()) { logger.warn("Could not send out-of-band response to [" + replyEpr.getAddress() + "]. " + "Configure WebServiceMessageSenders which support this uri."); } }
private void sendOutOfBand(MessageContext messageContext, EndpointReference replyEpr) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Request [" + messageContext.getRequest() + "] has [" + replyEpr + "] reply address; sending out-of-band reply [" + messageContext.getResponse() + "]"); } boolean supported = false; for (WebServiceMessageSender messageSender : messageSenders) { if (messageSender.supports(replyEpr.getAddress())) { supported = true; WebServiceConnection connection = null; try { connection = messageSender.createConnection(replyEpr.getAddress()); connection.send(messageContext.getResponse()); break; } finally { messageContext.clearResponse(); if (connection != null) { connection.close(); } } } } if (!supported && logger.isWarnEnabled()) { logger.warn("Could not send out-of-band response to [" + replyEpr.getAddress() + "]. " + "Configure WebServiceMessageSenders which support this uri."); } }
private void sendOutOfBand(MessageContext messageContext, EndpointReference replyEpr) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Request [" + messageContext.getRequest() + "] has [" + replyEpr + "] reply address; sending out-of-band reply [" + messageContext.getResponse() + "]"); } boolean supported = false; for (WebServiceMessageSender messageSender : messageSenders) { if (messageSender.supports(replyEpr.getAddress())) { supported = true; WebServiceConnection connection = null; try { connection = messageSender.createConnection(replyEpr.getAddress()); connection.send(messageContext.getResponse()); break; } finally { messageContext.clearResponse(); if (connection != null) { connection.close(); } } } } if (!supported && logger.isWarnEnabled()) { logger.warn("Could not send out-of-band response to [" + replyEpr.getAddress() + "]. " + "Configure WebServiceMessageSenders which support this uri."); } }
private void sendOutOfBand(MessageContext messageContext, EndpointReference replyEpr) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Request [" + messageContext.getRequest() + "] has [" + replyEpr + "] reply address; sending out-of-band reply [" + messageContext.getResponse() + "]"); } boolean supported = false; for (WebServiceMessageSender messageSender : messageSenders) { if (messageSender.supports(replyEpr.getAddress())) { supported = true; WebServiceConnection connection = null; try { connection = messageSender.createConnection(replyEpr.getAddress()); connection.send(messageContext.getResponse()); break; } finally { messageContext.clearResponse(); if (connection != null) { connection.close(); } } } } if (!supported && logger.isWarnEnabled()) { logger.warn("Could not send out-of-band response to [" + replyEpr.getAddress() + "]. " + "Configure WebServiceMessageSenders which support this uri."); } }
@Override protected void handleInvalidXmlException(HttpServletRequest req, HttpServletResponse res, Object handler, InvalidXmlException ex) throws Exception { WebServiceConnection connection = new MyHttpServletConnection(req, res); TransportContext previousTransportContext = TransportContextHolder.getTransportContext(); TransportContextHolder.setTransportContext(new DefaultTransportContext(connection)); try { MessageContext messageContext = new DefaultMessageContext(getMessageFactory().createWebServiceMessage(), getMessageFactory()); SoapBody soapBody = ((SoapMessage) messageContext.getResponse()).getSoapBody(); soapBody.addServerOrReceiverFault(getFaultString(ex), Locale.ENGLISH); connection.send(messageContext.getResponse()); } finally { TransportUtils.closeConnection(connection); TransportContextHolder.setTransportContext(previousTransportContext); } }
faultConnection.setFaultCode(faultResponse.getFaultCode()); connection.send(messageContext.getResponse());
faultConnection.setFaultCode(faultResponse.getFaultCode()); connection.send(messageContext.getResponse());
faultConnection.setFaultCode(faultResponse.getFaultCode()); connection.send(messageContext.getResponse());
faultConnection.setFault(faultResponse.hasFault()); connection.send(messageContext.getResponse());