cxf-dev mailing list archives

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

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

On Sep 3, 2012, at 4:43 AM, Freeman Fang <> 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
> Web:
> Twitter: freemanfang
> Blog:
> weibo:
View raw message