On Feb 4, 2013, at 3:10 AM, Jan Martiška <[email protected]> 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?

Not really, no.  Mostly because you end up with either a "mixed" method 
(request is wrapped, response unwrapped) which isn't supported, or a new method 
that doesn't match the original WSDL.   (unless this is also an @OneWay)


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

Reply via email to