Oleg, I have a tomcat server running on port 8080, through Together Control Center(just giving you the idea of what is running) I can access the server via a browser by going to http://localhost:8080/SomeServlet, this works fine. At the same time I open a command window and run Post XML example pointing to the above URL and passing it an xml file. Here is the entire trace, not that I would want you spending a lot of your time on this, thought there might be a simple answer
Thanks for the help, I will take a look at the link you gave. Take care, Yev 0 [main] DEBUG org.apache.commons.httpclient.methods.GetMethod - enter GetMetho d(String) 0 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - en ter EntityEnclosingMethod.setRequestBody(InputStream) 0 [main] DEBUG org.apache.commons.httpclient.methods.PostMethod - enter PostMet hod.clearRequestBody() 0 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - en ter EntityEnclosingMethod.clearRequestBody() 0 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - en ter EntityEnclosingMethod.setRequestContentLength(int) 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java version: 1.4.1_ 01 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java vendor: Sun Mic rosystems Inc. 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Java class path: .;c :/sandboxta/telabout/tademo/thirdparty/jakarta-log4j-1.2.8/log4j-1.2.8.j ar;c:/sa ndboxta/telabout/tademo/thirdparty/commons-httpclient-2.0-beta2/commons- httpclie nt-2.0-beta2.jar;c:/sandboxta/telabout/tademo/thirdparty/commons-logging -1.0.3/c ommons-logging.jar 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system nam e: Windows XP 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system arc hitecture: x86 16 [main] DEBUG org.apache.commons.httpclient.HttpClient - Operating system ver sion: 5.1 172 [main] DEBUG org.apache.commons.httpclient.HttpClient - SUN 1.2: SUN (DSA k ey/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 ce rtificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Co llection CertStores) 188 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJSSE 1.41: Sun J SSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSL v3, TLSv1) 188 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunRsaSign 1.0: SUN 's provider for RSA signatures 188 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJCE 1.4: SunJCE Provider (implements DES, Triple DES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, H MAC-SHA1) 188 [main] DEBUG org.apache.commons.httpclient.HttpClient - SunJGSS 1.0: Sun (K erberos v5) 203 [main] DEBUG org.apache.commons.httpclient.HttpClient - enter HttpClient.ex ecuteMethod(HttpMethod) 203 [main] DEBUG org.apache.commons.httpclient.HttpClient - enter HttpClient.ex ecuteMethod(HostConfiguration,HttpMethod,HttpState) 219 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Creating connec tion for localhost using protocol http:80 219 [main] DEBUG org.apache.commons.httpclient.HttpConnection - HttpConnection. setSoTimeout(0) 219 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.open() 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.execute(HttpState, HttpConnection) 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Execute loop tr y 1 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.processRequest(HttpState, HttpConnection) 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Attempt number 1 to process request 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.writeRequest(HttpState, HttpConnection) 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.writeRequestLine(HttpState, HttpConnection) 235 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.generateRequestLine(HttpConnection, String, String, String, String) 235 [main] DEBUG httpclient.wire - >> "POST /TARequestGateway HTTP/1.1[\r][\n]" 235 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.print(String) 235 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 250 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.writeRequestHeaders(HttpState,HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.methods.ExpectContinueMethod - e nter ExpectContinueMethod.addRequestHeaders(HttpState, HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addRequestHeaders(HttpState, HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addUserAgentRequestHeaders(HttpState, HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addHostRequestHeader(HttpState, HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Adding Host req uest header 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addCookieRequestHeader(HttpState, HttpConnection) 250 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.getC ookies() 250 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter Cookie SpecBase.match(String, int, String, boolean, Cookie[]) 250 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addAuthorizationRequestHeader(HttpState, HttpConnection) 266 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addProxyAuthorizationRequestHeader(HttpState, HttpConnection) 266 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.addProxyConnectionHeader(HttpState, HttpConnection) 266 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection) 266 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.getRequestContentLength() 266 [main] DEBUG org.apache.commons.httpclient.methods.PostMethod - enter PostM ethod.hasRequestContent() 266 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.hasRequestContent() 266 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - HttpMethodBase. addRequestHeader(Header) 266 [main] DEBUG httpclient.wire - >> "Content-type: text/xml; charset=ISO-8859 -1[\r][\n]" 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.print(String) 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 266 [main] DEBUG httpclient.wire - >> "User-Agent: Jakarta Commons-HttpClient/2 .0beta2[\r][\n]" 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.print(String) 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 266 [main] DEBUG httpclient.wire - >> "Host: localhost:8080[\r][\n]" 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.print(String) 266 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 313 [main] DEBUG httpclient.wire - >> "Content-Length: 294[\r][\n]" 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.print(String) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.writeLine() 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[]) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.write(byte[], int, int) 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.flushRequestOutputStream() 328 [main] DEBUG httpclient.wire - >> "[\r][\n]" 328 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.writeRequestBody(HttpState, HttpConnection) 328 [main] DEBUG org.apache.commons.httpclient.methods.PostMethod - enter PostM ethod.hasRequestContent() 328 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.hasRequestContent() 328 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.getRequestContentLength() 328 [main] DEBUG org.apache.commons.httpclient.methods.PostMethod - enter PostM ethod.hasRequestContent() 328 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - enter EntityEnclosingMethod.hasRequestContent() 328 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - Using unbuffered request body 328 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.getRequestOutputStream() 328 [main] DEBUG httpclient.wire - >> "<?xml version='1.0' ?>[\r][\n]" 328 [main] DEBUG httpclient.wire - >> "<TARequest>[\r][\n]" 328 [main] DEBUG httpclient.wire - >> " <Method category='product' name='getP roductInPriceRange'>[\r][\n]" 344 [main] DEBUG httpclient.wire - >> " <Param type='string' name='somerId' >10</Param>[\r][\n]" 391 [main] DEBUG httpclient.wire - >> "[\r][\n]" 391 [main] DEBUG httpclient.wire - >> " <Param type='string' name='lower'> 0</Param>[\r][\n]" 391 [main] DEBUG httpclient.wire - >> "[\r][\n]" 391 [main] DEBUG httpclient.wire - >> " <Param type='string' name='upper'> 300</Param>[\r][\n]" 391 [main] DEBUG httpclient.wire - >> " </Method>[\r][\n]" 391 [main] DEBUG httpclient.wire - >> "</TARequest>[\r][\n]" 391 [main] DEBUG httpclient.wire - >> "[\r][\n]" 391 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - Request body sent 391 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.flushRequestOutputStream() 391 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.readResponse(HttpState, HttpConnection) 391 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMetho dBase.readStatusLine(HttpState, HttpConnection) 407 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.readLine() 407 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.re adLine() 407 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.re adRawLine() 407 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Closing the con nection. 407 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.close() 407 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConne ction.closeSockedAndStreams() 407 [main] INFO org.apache.commons.httpclient.HttpMethodBase - Recoverable exce ption caught when processing request 407 [main] WARN org.apache.commons.httpclient.HttpMethodBase - Recoverable exce ption caught but MethodRetryHandler.retryMethod() returned false, rethrowing exc eption Exception in thread "main" org.apache.commons.httpclient.HttpRecoverableExceptio n: java.net.SocketException: Software caused connection abort: recv failed at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB ase.java:1950) at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMetho dBase.java:2573) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j ava:1047) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav a:638) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav a:500) at com.telabout.demo.clientgateway.httpclient.PostXML.main(PostXML.java: 140) -----Original Message----- From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 11:05 AM To: Commons HttpClient Project Subject: Re: Posting XML with http client Yevgeni, It is really hard to tell what is going on here. It can well be a problem on the server side. What HTTP server are you targeting? You may also want to consult the trouble-shooting for instructions on further actions http://jakarta.apache.org/commons/httpclient/troubleshooting.html Cheers Oleg On Thu, 2003-07-10 at 20:48, Yevgeni Kovelman wrote: > Hello, > > I just downloaded commons-httpclient to test HTTP postXML example. > When I run the client I get the following, it seems to be pretty > common. > > Exception in thread "main" > org.apache.commons.httpclient.HttpRecoverableExceptio > > n: java.net.SocketException: Software caused connection abort: recv > failed > > at > org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB > > ase.java:1950) > > at > org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMetho > > dBase.java:2573) > > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j > > ava:1047) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav > > a:638) > > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav > > a:500) > > at > com.telabout.demo.clientgateway.httpclient.PostXML.main(PostXML.java: > > 140) > > Is there a quick fix, I would image it is some kind of a configuration > error > > Thanks > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]