hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "COURTAULT Francois" <Francois.COURTA...@gemplus.com>
Subject RE: What's wrong with this code
Date Mon, 09 Jan 2006 17:03:43 GMT
Below is the logs:

DEBUG HttpClient:74 - Java version: 1.4.1_06
DEBUG HttpClient:75 - Java vendor: Sun Microsystems Inc.
DEBUG HttpClient:76 - Java class path: ....
DEBUG HttpClient:77 - Operating system name: Windows 2000
DEBUG HttpClient:78 - Operating system architecture: x86
DEBUG HttpClient:79 - Operating system version: 5.0
DEBUG HttpClient:84 - SUN 1.2: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5
digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder;
LDAP, Collection CertStores)
DEBUG HttpClient:84 - SunJSSE 1.41: Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509
key/trust factories, SSLv3, TLSv1)
DEBUG HttpClient:84 - SunRsaSign 1.0: SUN's provider for RSA signatures
DEBUG HttpClient:84 - SunJCE 1.4: SunJCE Provider (implements DES, Triple DES, Blowfish, PBE,
Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
DEBUG HttpClient:84 - SunJGSS 1.0: Sun (Kerberos v5)
Waiting for Put Commands...

------------------------------------------------------ Start of first get

DEBUG GetMethod:152 - enter GetMethod(String)
DEBUG HttpMethodBase:480 - enter HttpMethodBase.setQueryString(NameValuePair[])
DEBUG HttpClient:495 - enter HttpClient.executeMethod(HttpMethod)
DEBUG HttpClient:553 - enter HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
DEBUG HttpConnection:630 - enter HttpConnection.open()
DEBUG HttpConnection:586 - HttpConnection.setSoTimeout(0)
DEBUG HttpMethodBase:1036 - enter HttpMethodBase.execute(HttpState, HttpConnection)
DEBUG HttpMethodBase:1079 - Execute loop try 1
DEBUG HttpMethodBase:2632 - enter HttpMethodBase.processRequest(HttpState, HttpConnection)
DEBUG HttpMethodBase:2644 - Attempt number 1 to process request
DEBUG HttpMethodBase:2265 - enter HttpMethodBase.writeRequest(HttpState, HttpConnection)
DEBUG HttpMethodBase:2415 - enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
DEBUG HttpMethodBase:1738 - enter HttpMethodBase.generateRequestLine(HttpConnection, String,
String, String, String)
DEBUG header:71 - >> "GET /ind?MSISDN=0623456789 HTTP/1.1[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpMethodBase:2379 - enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
DEBUG HttpMethodBase:1659 - enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
DEBUG HttpMethodBase:1688 - enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
DEBUG HttpMethodBase:1526 - enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
DEBUG HttpMethodBase:1556 - Adding Host request header
DEBUG HttpMethodBase:1486 - enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
DEBUG HttpState:216 - enter HttpState.getCookies()
DEBUG CookieSpec:530 - enter CookieSpecBase.match(String, int, String, boolean, Cookie[])
DEBUG HttpMethodBase:1416 - enter HttpMethodBase.addAuthorizationRequestHeader(HttpState,
HttpConnection)
DEBUG HttpMethodBase:1584 - enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState,
HttpConnection)
DEBUG HttpMethodBase:1622 - enter HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
DEBUG HttpMethodBase:1455 - enter HttpMethodBase.addContentLengthRequestHeader(HttpState,
HttpConnection)
DEBUG header:71 - >> "User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG header:71 - >> "Host: localhost:8080[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpConnection:1016 - enter HttpConnection.writeLine()
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpConnection:788 - enter HttpConnection.flushRequestOutputStream()
DEBUG header:71 - >> "[\r][\n]"
DEBUG HttpConnection:788 - enter HttpConnection.flushRequestOutputStream()
DEBUG HttpMethodBase:1940 - enter HttpMethodBase.readResponse(HttpState, HttpConnection)
DEBUG HttpMethodBase:2179 - enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
DEBUG HttpConnection:1075 - enter HttpConnection.readLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG header:71 - << "HTTP/1.1 200 OK[\r][\n]"
DEBUG HttpMethodBase:2142 - enter HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
DEBUG HttpConnection:860 - enter HttpConnection.getResponseInputStream()
DEBUG HttpParser:134 - enter HeaderParser.parseHeaders(HttpConnection, HeaderGroup)
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG header:71 - << "Set-Cookie: JSESSIONID=6DC8983056E3153647773910AA0286D0; Path=/[\r][\n]"
DEBUG header:71 - << "Transfer-Encoding: chunked[\r][\n]"
DEBUG header:71 - << "Date: Mon, 09 Jan 2006 16:39:37 GMT[\r][\n]"
DEBUG header:71 - << "Server: Apache-Coyote/1.1[\r][\n]"
DEBUG HttpMethodBase:1821 - enter HttpMethodBase.processResponseHeaders(HttpState, HttpConnection)
DEBUG CookieSpec:223 - enter CookieSpecBase.parse(String, port, path, boolean, String)
DEBUG CookieSpec:111 - enter CookieSpecBase.parse(String, port, path, boolean, Header)
DEBUG HeaderElement:239 - enter HeaderElement.parse(String)
DEBUG HeaderElement:375 - enter HeaderElement.parsePair(char[], int, int)
DEBUG HeaderElement:375 - enter HeaderElement.parsePair(char[], int, int)
DEBUG Cookie:111 - enter Cookie(String, String, String, String, Date, boolean)
DEBUG CookieSpec:128 - enter RFC2109Spec.validate(String, int, String, boolean, Cookie)
DEBUG CookieSpec:349 - enter CookieSpecBase.validate(String, port, path, boolean, Cookie)
DEBUG HttpState:169 - enter HttpState.addCookie(Cookie)
DEBUG CookieSpec:246 - enter RFC2109Spec.formatCookie(Cookie)
DEBUG CookieSpec:217 - enter RFC2109Spec.formatCookieAsVer(Cookie)
DEBUG HttpMethodBase:1861 - Cookie accepted: "$Version=0; JSESSIONID=6DC8983056E3153647773910AA0286D0;
$Path=/"
DEBUG GetMethod:372 - enter GetMethod.readResponseBody(HttpState, HttpConnection)
DEBUG HttpMethodBase:1996 - enter HttpMethodBase.readResponseBody(HttpState, HttpConnection)
DEBUG HttpMethodBase:2033 - enter HttpMethodBase.readResponseBody(HttpConnection)
DEBUG HttpConnection:860 - enter HttpConnection.getResponseInputStream()
DEBUG HeaderElement:239 - enter HeaderElement.parse(String)
DEBUG HeaderElement:375 - enter HeaderElement.parsePair(char[], int, int)
DEBUG HttpConnection:603 - HttpConnection.getSoTimeout()
DEBUG HttpConnection:894 - enter HttpConnection.isResponseAvailable(int)
 WARN HttpMethodBase:694 - Going to buffer response body of large or unknown size. Using getResponseAsStream
instead is recommended.
DEBUG HttpMethodBase:697 - Buffering response body
DEBUG content:85 - << "1"
DEBUG content:85 - << "[\r]"
DEBUG content:71 - << "[\n]"
DEBUG content:85 - << "1"
DEBUG content:85 - << "[\r]"
DEBUG content:71 - << "[\n]"
DEBUG content:85 - << "0"
DEBUG content:85 - << "[\r]"
DEBUG content:71 - << "[\n]"
DEBUG HttpParser:134 - enter HeaderParser.parseHeaders(HttpConnection, HeaderGroup)
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine()
DEBUG content:85 - << "[\r]"
DEBUG content:71 - << "[\n]"
DEBUG HttpMethodBase:928 - Resorting to protocol version default close connection policy
DEBUG HttpMethodBase:931 - Should NOT close connection, using HTTP/1.1.
DEBUG HttpConnection:1132 - enter HttpConnection.releaseConnection()
DEBUG HttpMethodBase:2700 - enter getContentCharSet( Header contentheader )
DEBUG HttpMethodBase:2721 - Default charset used: ISO-8859-1


------------------------------------------------------ End of first get

------------------------------------------------------ Start of second get

DEBUG GetMethod:152 - enter GetMethod(String)
DEBUG HttpMethodBase:480 - enter HttpMethodBase.setQueryString(NameValuePair[])
DEBUG HttpClient:495 - enter HttpClient.executeMethod(HttpMethod)
DEBUG HttpClient:553 - enter HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
DEBUG HttpConnection:586 - HttpConnection.setSoTimeout(0)
DEBUG HttpMethodBase:1036 - enter HttpMethodBase.execute(HttpState, HttpConnection)
DEBUG HttpMethodBase:1079 - Execute loop try 1
DEBUG HttpMethodBase:2632 - enter HttpMethodBase.processRequest(HttpState, HttpConnection)
DEBUG HttpMethodBase:2644 - Attempt number 1 to process request
DEBUG HttpMethodBase:2265 - enter HttpMethodBase.writeRequest(HttpState, HttpConnection)
DEBUG HttpMethodBase:2415 - enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
DEBUG HttpMethodBase:1738 - enter HttpMethodBase.generateRequestLine(HttpConnection, String,
String, String, String)
DEBUG header:71 - >> "GET /getputdataservlet?MSISDN=0623456789 HTTP/1.1[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpMethodBase:2379 - enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
DEBUG HttpMethodBase:1659 - enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
DEBUG HttpMethodBase:1688 - enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
DEBUG HttpMethodBase:1526 - enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
DEBUG HttpMethodBase:1556 - Adding Host request header
DEBUG HttpMethodBase:1486 - enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
DEBUG HttpState:216 - enter HttpState.getCookies()
DEBUG CookieSpec:530 - enter CookieSpecBase.match(String, int, String, boolean, Cookie[])
DEBUG CookieSpec:433 - enter CookieSpecBase.match(String, int, String, boolean, Cookie
DEBUG CookieSpec:659 - enter CookieSpecBase.formatCookieHeader(Cookie)
DEBUG CookieSpec:246 - enter RFC2109Spec.formatCookie(Cookie)
DEBUG CookieSpec:217 - enter RFC2109Spec.formatCookieAsVer(Cookie)
DEBUG HttpMethodBase:1416 - enter HttpMethodBase.addAuthorizationRequestHeader(HttpState,
HttpConnection)
DEBUG HttpMethodBase:1584 - enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState,
HttpConnection)
DEBUG HttpMethodBase:1622 - enter HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
DEBUG HttpMethodBase:1455 - enter HttpMethodBase.addContentLengthRequestHeader(HttpState,
HttpConnection)
DEBUG header:71 - >> "User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG header:71 - >> "Host: localhost:8080[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG header:71 - >> "Cookie: $Version=0; JSESSIONID=6DC8983056E3153647773910AA0286D0;
$Path=/[\r][\n]"
DEBUG HttpConnection:1031 - enter HttpConnection.print(String)
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpConnection:1016 - enter HttpConnection.writeLine()
DEBUG HttpConnection:940 - enter HttpConnection.write(byte[])
DEBUG HttpConnection:962 - enter HttpConnection.write(byte[], int, int)
DEBUG HttpConnection:788 - enter HttpConnection.flushRequestOutputStream()
DEBUG header:71 - >> "[\r][\n]"
DEBUG HttpConnection:788 - enter HttpConnection.flushRequestOutputStream()
DEBUG HttpMethodBase:1940 - enter HttpMethodBase.readResponse(HttpState, HttpConnection)
DEBUG HttpMethodBase:2179 - enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
DEBUG HttpConnection:1075 - enter HttpConnection.readLine()
DEBUG HttpParser:102 - enter HttpParser.readLine()
DEBUG HttpParser:73 - enter HttpParser.readRawLine() 


The second get never call the servlet getputdataservlet ???? Have you any idea ?

The two get methods used the same thread and the httpclient object was initialized as followed:
        final HttpClient httpClient = new HttpClient();
        httpClient.getHostConfiguration().setHost("localhost", 8080);


Regards.

-----Message d'origine-----
De : Ortwin Glück [mailto:odi@odi.ch] 
Envoyé : lundi 9 janvier 2006 15:42
À : HttpClient Project
Objet : Re: What's wrong with this code

Francois,

Please submit a DEBUG level log. See
http://jakarta.apache.org/commons/httpclient/logging.html

Cheers

Ortwin Glück

COURTAULT Francois wrote:
> Hello,
> 
> The second call to the getMethod fails. Do you know why ?
> 
>                     GetMethod getMethod = new GetMethod("/ind");
>                     final NameValuePair[] anvp = {new 
> NameValuePair(WSCConstants.PARAM_xxx, x)};
>                     getMethod.setQueryString(anvp);
> 
>                     int statusCode =
> httpClient.executeMethod(getMethod);
>                     if (statusCode == HttpStatus.SC_OK) {
>                         putNumber =
> Integer.parseInt(getMethod.getResponseBodyAsString());
>                     }
> 
>                     getMethod.releaseConnection();
> 
> 	        // This second get never call the Tomcat Servlet  ??????
>                     getMethod = new GetMethod("/getputdataservlet");
>                     getMethod.setQueryString(anvp);
> 
> 
>                      statusCode = httpClient.executeMethod(getMethod);
>                      if (statusCode == HttpStatus.SC_OK) {
>                      }
> 	         getMethod.releaseConnection();
> 
> Regards.
> 

--
[web]  http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp]  key 0x81CF3416
        finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message