sender.setChunked(chunked); sender.setHttpVersion(httpVersion); sender.setFormat(format); sender.send(messageContext, url, findSOAPAction(messageContext)); } catch (MalformedURLException e) { log.debug(e);
public void send(MessageContext msgContext, URL url, String soapActionString) throws IOException { // execute the HtttpMethodBase - a connection manager can be given for // handle multiple String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD); if ((httpMethod != null)) { if (Constants.Configuration.HTTP_METHOD_GET.equalsIgnoreCase(httpMethod)) { this.sendViaGet(msgContext, url, soapActionString); return; } else if (Constants.Configuration.HTTP_METHOD_DELETE.equalsIgnoreCase(httpMethod)) { this.sendViaDelete(msgContext, url, soapActionString); return; } else if (Constants.Configuration.HTTP_METHOD_PUT.equalsIgnoreCase(httpMethod)) { this.sendViaPut(msgContext, url, soapActionString); return; } } this.sendViaPost(msgContext, url, soapActionString); }
Request request = createRequest(msgContext, httpMethod, url, requestEntity); addCustomHeaders(msgContext, request); setTimeouts(msgContext, request); request.getStatusText())); obtainHTTPHeaderInformation(request, msgContext); if (processResponse) { OperationContext opContext = msgContext.getOperationContext();
removeUnwantedHeaders(msgContext); String userAgentString = getUserAgent(msgContext); request.setHeader(HTTPConstants.HEADER_USER_AGENT, userAgentString);
/** * Send via http. * * @param httpMethod * the http method * @param soapAction * the soap action * @param address * the address * @param rest * the rest * @throws IOException * Signals that an I/O exception has occurred. */ protected void sendViaHTTP(String httpMethod, String soapAction, String address, boolean rest) throws IOException { httpSender = getHTTPSender(); MessageContext msgContext = new MessageContext(); ConfigurationContext configContext = ConfigurationContextFactory .createEmptyConfigurationContext(); OperationContext opContext = new OperationContext(); msgContext.setConfigurationContext(configContext); msgContext.setEnvelope(getEnvelope()); msgContext.setDoingREST(rest); msgContext.setProperty(Constants.Configuration.HTTP_METHOD, httpMethod); msgContext.setOperationContext(opContext); URL url = new URL(address); httpSender.send(msgContext, url, soapAction); }
String cookieString = null; if (customCookieId != null) { cookieString = buildCookieString(cookies, customCookieId); cookieString = buildCookieString(cookies, Constants.SESSION_COOKIE); cookieString = buildCookieString(cookies, Constants.SESSION_COOKIE_JSESSIONID);