Are you working from a WSDL? Then you can use a binding file as
explained here:
http://cxf.apache.org/docs/wsdl-to-java.html#WSDLtoJava-wrapperstyle.
Note that the meaning of BARE and WRAPPED can be counterintuitive (as
mentioned at that link), BARE may actually be what you want.
Glen
On 02/04/2013 03:10 AM, Jan Martiška wrote:
Hi,
once again I stumbled upon an issue when trying to implement WS-Eventing for
CXF. I would like to know if there is any easy way how to make a JAXWS client
use a request wrapper. I have this scenario - there is an interface from which
I create a JAXWS client (using JaxWsProxyFactoryBean):
@WebService
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface CatastrophicEventSink {
void earthquake(EarthquakeEvent ev);
}
and I need to "magically" change it into this:
@WebService
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface CatastrophicEventSink {
@RequestWrapper(localName = "NotifyEvent", targetNamespace =
"http://some-namespace.com")
void earthquake(EarthquakeEvent ev);
}
.. without having to write the other interface, that should be made somehow
automatically.
We can suppose that the server on the other side will understand it and know
that a request wrapper is used.
I tried some experiments and only found that wrappers are generated some insane
way using ASM library and I wasn't able to understand how exactly it works.
Is there any (not very ugly) way to accomplish this?
Thanks!!
Jan
--
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza