You still can do it with smx4.
Take a look at the cxf-wsdl-first-osgi-package example shipped with kit, the working flow in this example is
cxfbc consumer endpoint--->cxf se endpoint
Here the cxfbc consumer endpoint equal your <jbi:endpoint role='consumer' />, it just need specify a wsdl, no more java code needed, and it can handle incoming soap message request.
However, you do need some endpoint to process the incoming soap message inside ESB, right?
In this example, it's cxf se endpoint which use java code, but you can use any other endpoint you want, such as xpath, or any camel endpoint(if you use camel-jbi as a bridge) you want, in this case there might be no java code get involved at all.
Thanks, I'll take another look at it. I had passed on it because a.) I saw the PersonImpl.java in the wsdl-first-cxfse-bundle and thought it was required by the example as a whole and b.) this looks like JBI in OSGi clothing. It's using the servicemix-cxf-bc JBI component and the wsdl-first-cxfbc-bundle shows up as a JBI service assembly when I run "jbi:list" from the Karaf prompt. Is there another approach that does not use Java or JBI? Am I trying too hard to be pure?
I believe camel-cxf consumer endpoint can do it also, which means handle incoming soap request only with wsdl, no java code needed.
Here is some unit tests which shows how to start up the came-cxf consumer just by using the WSDL.
Thanks to help from Willem in a different thread, I have my example. Here it is for posterity:
<camel:from uri="cxf://http://0.0.0.0:9001/CxfTest?portName=HelloWorldImplPort&serviceName=HelloWorldImplService&wsdlURL=file:examples/cxf-ws-rm/src/main/resources/HelloWorld.wsdl&dataFormat=PAYLOAD&loggingFeatureEnabled=true" />
<camel:to uri="log:test" />
Is there any way to do this without having to explicitly set the port?
Also, the '0.0.0.0' is not working for me.
I assumed this means 'all interfaces', but it doesn't seem to do that for me.
I think you can use http-osgi transport with http-osgi default port.
How do I use the http-osgi transport?
Is that different than cxf component?
Do I prefix the CXF url with http-osgi (uri="cxf://http-osgi://0.0.0.0/...)?
Thanks for responding quickly to my issue.
No, camel-cxf component can't take the address like "http-osgi://0.0.0.0/.."
You need to the same thing as the cxf-osgi example does, imports the configure of
<import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"></import> <import resource="classpath:META-INF/cxf/cxf-extension-http.xml"></import> <!-- You just need to import this one if you are using the CXF 2.4.x --> <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml"></import>
And you can configure your camel-cxf endpoint uri like this
I didn't know I could omit the host and port.
I'm only having one issue now.
When I browse to http://localhost:8181/cxf/myservices?wsdl, I don't get the WSDL in my browser like I do for jaxws endpoints.
I am specifying a wsdlURL property in the cxf endpoint definition.
I'm pretty sure that also worked for the other iterations I tried (although I can't them working now for some reason).
Is there some other way to access the WSDL through a browser in this configuration?
I can probably work around it, but it would be easier if it were available.
Thanks for the import resource tip. We are using FUSE 4.3.1-01-15 which, if I'm reading the osgi list correctly, uses camel-cxf 2.6.0.fuse-01-15. I'm assuming it's correct because I only include the one resource line and it works.
Thanks again for all your help.