cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject Re: oneway is different between wsdl-first and code-first
Date Mon, 03 Sep 2012 12:39:28 GMT
Freeman 

It's an invalid WSDL and should be rejected by the code generator. If you run with validation
turned on, does it reject it?

With WSDL1, operations without an output cannot throw faults. 

Daniel Kulp
http://dankulp.com/blog


On Sep 3, 2012, at 4:43 AM, Freeman Fang <freeman.fang@gmail.com> wrote:

> Hi,
> 
> Currently when we use wsdl first way, if an operation in the wsdl have input and fault
but no output, then it would be considered as a oneway operation,  we can see a auto-generated
oneway operation can throw exception.
> Is this behavior correct? I doubt it but I checked the JAXWS spec but can't find clear
definition about this part. 
> 
> When use code first way, if a java method has Oneway annotation, then it's fault would
be ignore, you can see it from ReflectionServiceFactoryBean
>       if (hasOut) {
>            // Faults are only valid if not a one-way operation
>            initializeFaults(intf, op, method);
>        }
> 
> So the way we process oneway is different between wsdl-first and code-first. In wsdl-first,
we keep the fault but in code-first we ignore the fault. This mismatch could cause problem
like CXF-4493, I think we should unify oneway behavior between wsdl-first and code-first.
> 
> Any thoughts?
> 
> Thanks
> Freeman
> -------------
> Freeman Fang
> 
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042
> 
> 
Mime
View raw message