> I would strongly recommend using ThreadSafeClientConnManager instead of the one created by HttpClient per default
I followed the same pattern as the CommonHttpMessageSender by allowing the default constructor to create a default client, and allow the user to inject a multi-threaded connection manager (like I do in my production systems) if desired. If you think this is still a bad idea, I can change it.
>> An implementation of the org.springframework.ws.transport .WebServiceConnection is also required as well.
>That's where things may get tricky. In any way I'll happily help with the HttpClient specific stuff.
I created a HttpClientConnection class which extends the Spring WS framework's org.springframework.ws.transport.http.AbstractSenderConnection as does the Commons class.
There are some abstract methods which must be implemented:
/** Returns the HTTP status code of the response. */
protected abstract int getResponseCode() throws IOException;
/** Returns the HTTP status message of the response. */
protected abstract String getResponseMessage() throws IOException;
/** Returns the length of the response. */
protected abstract long getResponseContentLength() throws IOException;
/** Returns the raw, possibly compressed input stream to read the response from. */
protected abstract InputStream getRawResponseInputStream() throws IOException;
I can get the last 2 working by returning httpPost.getEntity().getContentLength() and httpPost.getEntity().getContent() respectively, but can't find equivalents for getResponseCode() and getResponseMessage in HttpPost or HttpEntity.
Attached are new versions of the code