[jboss-jira] [JBoss JIRA] Closed: (JBREM-193) HTTPClientInvoker doesn't call getErrorStream() on HttpURLConnection when an error response code is returned
David Lloyd (JIRA)
jira-events at lists.jboss.org
Wed Sep 26 05:31:09 EDT 2007
[ http://jira.jboss.com/jira/browse/JBREM-193?page=all ]
David Lloyd closed JBREM-193.
-----------------------------
> HTTPClientInvoker doesn't call getErrorStream() on HttpURLConnection when an error response code is returned
> ------------------------------------------------------------------------------------------------------------
>
> Key: JBREM-193
> URL: http://jira.jboss.com/jira/browse/JBREM-193
> Project: JBoss Remoting
> Issue Type: Bug
> Components: transport
> Affects Versions: 1.2.1 final
> Reporter: Jason T. Greene
> Assigned To: Tom Elrod
> Priority: Minor
> Fix For: 1.4.0 beta
>
>
> SOAP requires that faults be sent back with a status code of 500 (internal server error). After making this change I noticed that clients are failing in the HTTPClientInvoker. This is because HttpUrlConnection.getInputStream will throw an exception if an error status code was returned by the server. What do you think of changing the invoker to check the status code, and if its an error call HttpUrlConnection.getErrorStream() instead? I would have made this change myself, but I wasn't sure if you want this behavior to apply accross the board. If this is the case we could set a property in the metadata that would indicate that the error stream should be passed instead of throwing an exception.
> What do you think?
> java.io.IOException: Server returned HTTP response code: 500 for URL: http://draught:8080/ws4ee-exception/ExceptionBean
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
> at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:111)
> at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:56)
> at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:112)
> at org.jboss.remoting.Client.invoke(Client.java:226)
> at org.jboss.remoting.Client.invoke(Client.java:189)
> at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:112)
> at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:600)
> at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:382)
> at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:92)
> at $Proxy3.throwException(Unknown Source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list