Read timed out error when TrailingMiscDispatcher encounters garbage
-------------------------------------------------------------------

                 Key: XERCESJ-1425
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1425
             Project: Xerces2-J
          Issue Type: Bug
    Affects Versions: 2.9.1
         Environment: Xerces 2.9.1 as utilized from Axis 1.4 within a 
webservice environment (on Tomcat 5.5)
            Reporter: Jeffrey Bennett


Our webapp (running within Tomcat) was making a SOAP call to a remote host over 
an SSL connection (our webapp is the client in this transaction).  We got a 
response back with a legitimate SOAP-ENV.  However, following the close of the 
SOAP-ENV (after </SOAP-ENV>) there was some additional random characters.  
Specifically, this is what came back (ignoring the quote marks):
"</SOAP-ENV:Body></SOAP-ENV:Envelope>.b>..,...<....&."

Not entirely sure why we got those extra 16 characters.  Could have been 
bad-behavior by the remote server.  Or could be some artifact of the SSL.  
Can't say, but beyond the control of the client, so we're forced to deal with 
them.

Xerces manages those characters by sending them to TrailingMiscDispatcher.  
Down in the bowels of that code, it winds up doing a read() call that opens a 
socket (to somewhere, not sure where though).  That read() never returns and 
the net effect is that the parse() of the entire SOAP message times out.   I 
was able to overcome this timeout by forcing 
TrailingMiscDispatcher.dispatch(..) to return false.

I would propose that Xerces maintain the current behavior (as the default).  
However, it should check a (system?) property, and if the property is set, 
trailing-misc would be ignored.  The upshot of this would be that rather than 
the brute force approach I was forced into, I could simply set a property so 
that trailing garbage on my soap message would be ignored.

FWIW, I found that there are others affected by similar issues:
http://designdevelopment.digitalpoints.info/getting-timeout-after-receiving-response-from-web-service/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to