Hello Daniel,

Thanks for your answer. I think I have understood the CXF implementation.
But what I want to know is, if the behavior described in the spec (“a oneway 
method returns the thread of control to the calling application prior to 
executing the actual business method”) and which seems implemented by CXF team 
is mandatory or not ?  

Best Regards.

-----Original Message-----
From: Daniel Kulp [mailto:[email protected]] 
Sent: lundi 30 juillet 2012 18:41
To: [email protected]
Cc: COURTAULT Francois
Subject: Re: @OneWay interpretation and HTTP binding


The OneWay handling in CXF is more defined by the JAX-WS spec which uses the
JSR-181 spec, but also clarifies some of it and puts additional requirements 
and expectations on it.  

In the case of OneWay's and HTTP, it's specifically talked about in section
10.4.1.2:

----------------------
HTTP interactions are request-response in nature. When using HTTP as the 
transfer protocol for a one-way SOAP message, implementations wait for the HTTP 
response even though there is no SOAP message in the HTTP response entity body.

♦ Conformance (One-way operations): When invoking one-way operations, an 
implementation of the SOAP/HTTP binding MUST block until the HTTP response is 
received or an error occurs.

Note that completion of the HTTP request simply means that the transmission of 
the request is complete, not that the request was accepted or processed.

--------------------------

So basically, on the client side, we block on the server sends back a response 
(normally a 202  with no body for a oneway, but the WSI-BP does 
allow for a 200 response code.).   That does make the server side processing 
a bit more complex.  Normally, you would want the server to send back that
202 as quickly as possible to release the client thread.  In CXF, we have an 
interceptor on the incoming chain that runs right after the READ phase that 
will check if the target operation is a oneway or not and send the 202 at that 
point if possible.


Dan



On Monday, July 30, 2012 05:54:43 PM COURTAULT Francois wrote:
> Hello guys,
> 
> I have read the JSR 181 spec and the @OneWay is not clear for me.
> Just want to have your interpretation....
> 
> In the spec, it is said that: "Indicates that the given web method has 
> only an input message and no output. Typically, a oneway method 
> returns the thread of control to the calling application prior to 
> executing the actual business method"
> 
> What typically means ? Does it mean MUST-SHALL, SHOULD or MAY 
> according to you ?
> 
> Still about the OneWay what is the HTTP binding for this annotation ? 
> I have seen that some implementation returns a 202. Is it a standard 
> HTTP status code  value for OneWay ?



--
Daniel Kulp
[email protected] - http://dankulp.com/blog Talend Community Coder - 
http://coders.talend.com

Reply via email to