[jboss-dev-forums] [Design of JBoss ESB] - HTTP response (status) codes should be returned through rele

dward do-not-reply at jboss.com
Mon Jul 27 13:50:56 EDT 2009


Here is the JIRA link: https://jira.jboss.org/jira/browse/JBESB-2761.

"When the <jbr-provider/> (JBossRemotingGatewayListener using http protocol) or <http-provider/> (HttpGatewayListener) is used in a synchronous fashion, HTTP response (status) codes should be returned when there are "proxied" HTTP actions in the service's pipeline. This includes HttpRouter, SOAPClient, SOAPProcessor and SOAPProxy.

This is similar to JBESB-2511, where response headers weren't always being propagated back, but now we're talking about the response (status) code."

I have made the minor fixes necessary in my working copy of trunk, but before I commit them, would like some feedback.  A few comments/questions:

1) Comment: The fix for this is quite simple: Just make sure that in the relavant actions, a Message property is set with the status code.  For <jbr-provider/>, it means setting the HTTPMetadataConstants.RESPONSE_CODE property so that the JBossRemotingMessageComposer can pick it up.  For <http-provider, it means setting the HttpMessageComposer.HTTP_RESPONSE_STATUS property so that the HttpMessageComposer can pick it up.

2) Comment: It should be noted that the *last* action in a pipeline will "win" with regards to the response code.  So, say you had a HttpRouter action that sets the property with a 401 code, but then a SOAPClient action that sets it with a 200 code, the 200 would clobber the 401, and thus 200 would get returned to the client.

3) Question: As this is a change to current functionality, should we make a boolean property available (local to the action and/or global to the bus) which activates or deactivates this "feature"?  It feels more like it was an oversight (bug) to me, but still, I don't want to change the status quo if it's going to mess people up...  Maybe since the SOAPProxy is so new, it's default behavior would be to return the status code, but for SOAPClient and SOAPProcessor, it doesn't unless you enable it?

4) Question: I was able to change the stanard SOAPClient, but not the wise SOAPClient.  There just wasn't an API available to me where I could do this.  Should this be a new JIRA item just for the wise SOAPClient?

Thanks!

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246263#4246263

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246263



More information about the jboss-dev-forums mailing list