Hi Juanjo,
Good question.
That's configuration problem.
First of all, since what you use is soap message provider, the provider
expect the message payload is soap, so you need and
useJBIWrapper="false" for both your bc and se, this is new feature after
servicemix 3.2.1 release, so you need use 3.2.2 snapshot. [1] for more
details about this configuration
Next, provider has no explicit SEI (service endpoint interface), all
its method is "invoke", so you need specify your targetInterface of
your cxf bc consumer configuration, not use SEI as usual (since there is
no actual SEI at all), just use GreeterSoapMessageProvider itself. There
is also a little tricky here, your package of GreeterSoapMessageProvider
is demo.hwDispatch.server, so the related namespace of this package
should be http://server.hwDispatch.demo. You need add a namespace
declaration like
xmlns:myProvider="http://server.hwDispatch.demo" in your configuration
and then
specify your cxf bc consumer
targetInterface="myProvider:GreeterSoapMessageProvider"
All this could make your provider get invoked and you can handle the raw
soap message there.
[1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/xbean_without_jbi_wrapper.xml
Regards
Freeman
Juanjo Vázquez wrote:
Hi,
Lately, I have been deploying JAX-WS web services into the ServiceMix CXF-SE
component and publishing them with the CXF-BC component. Everything was ok
until I tried to deploy a web service in a dispatch/provider style. My goal
is to work with message oriented synchronous exchanges between client and
server [1].
My basic code is the JAX-WS Dispatch/Provider Demo from the CXF distribution
[2]. The service unit´s configuration (xbean.xml) is more or less like this:
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
<cxfse:endpoint>
<cxfse:pojo>
<bean class="demo.hwDispatch.server.GreeterSoapMessageProvider" />
</cxfse:pojo>
</cxfse:endpoint>
</beans>
where GreeterSoapMessageProvider [3] should be the web service implementor.
The communication between BC SU and SE SU seems to be ok, but when a client
sends a soap message I get a null pointer exception in CXF SE Endpoint
(process method). I have debugged and it seems to fault the jbi destination
resolution.
I don´t know if this is a bug, future improvement or a configuration
mistake. Please, any ideas are welcome.
Thanks in advance,
Juanjo
[1] http://cwiki.apache.org/CXF20DOC/provider-services.html
[2]
http://svn.apache.org/repos/asf/incubator/cxf/tags/cxf-2.0.5-incubator/distribution/src/main/release/samples/jaxws_dispatch_provider
[3]
http://svn.apache.org/repos/asf/incubator/cxf/tags/cxf-2.0.5-incubator/distribution/src/main/release/samples/jaxws_dispatch_provider/src/demo/hwDispatch/server/GreeterSoapMessageProvider.java