With the factory, you can register a subclass of AbstractServiceConfiguration
that just has the method:
@Override
public Boolean hasOutMessage(Method m) {
if (m.getReturnType().equals(void.class)
&& m.getExceptionTypes().length == 0) {
return false;
}
return true;
}
and that should do it.
I THOUGHT that was the default for the simple frontend, but there is a bug in
the DefaultServiceConfiguration that is preventing that logic from working
correctly. I'm kind of on the fence on changing that now as that would
affect anyone with void return methods and this bug has been in CXF for, well,
pretty much forever. :-(
Dan
On Saturday 24 July 2010 6:18:02 am Hannes Holtzhausen wrote:
> Hi
>
> I have a service interface that looks like follows:
>
> public interface MyService
> {
> public void doWork(MyWork work);
> }
>
> By default the doWork interface operation would have 2 messages
> associated with it
> in the generated WSDL when using the simple frontend e.g:
>
> <wsdl:message name="doWork">
> <wsdl:part element="tns:doWork" name="parameters">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="doWorkResponse">
> <wsdl:part element="tns:doWorkResponse" name="parameters">
> </wsdl:part>
> </wsdl:message>
>
> Are there any configuration options available that will
> force the simple frontend to exclude the <method name>Response
> messages from the generated WSDL for all interface operations with
> a void return type?
>
> Thanks
> Hannes
--
Daniel Kulp
[email protected]
http://dankulp.com/blog