views:

18

answers:

0

Hi, I have a web service hosted on tomcat6. The web service consists of more services. One of them calls another service n times on the same server tomcat6. Sometimes, when it send the requests, I have this exception returned from the server.

<ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"&gt;
    <ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat"
        >com.ctc.wstx.exc.WstxEOFException: Unexpected end of input block in end tag at [row,col
        {unknown-source}]: [48,11]</ns1:faultstring>
</ns1:XMLFault>

This is the code were the service do the requests.

    foreach (r in requests){
    .....
       is = new FileInputStream(r);            
       post.setRequestEntity(new InputStreamRequestEntity(is, "text/xml"));
       post.addRequestHeader("Authorization", "Basic " + Base64.encodeToString("xxx-yyy:zzz.www".getBytes()));`

       System.out.println("##### I send the request number: "+index);
         int respCode = client.executeMethod(post); 
       System.out.println("Response code:"+ respCode);
    }

The response code when I have this exception returned is 500.

What may be wrong?

Thanks in advance.