-
1. Re: SMX4 WSDL-first web service consumer without Java
ffang Mar 8, 2011 9:45 PM (in response to mlabrot)Hi,
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.
Freeman
-
2. Re: SMX4 WSDL-first web service consumer without Java
mlabrot Mar 9, 2011 10:27 AM (in response to ffang)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?
-
3. Re: SMX4 WSDL-first web service consumer without Java
ffang Mar 9, 2011 9:09 PM (in response to mlabrot)Hi,
I believe camel-cxf consumer endpoint can do it also, which means handle incoming soap request only with wsdl, no java code needed.
Freeman
-
4. Re: SMX4 WSDL-first web service consumer without Java
njiang Mar 9, 2011 9:16 PM (in response to mlabrot)Here is some unit tests[1][2] which shows how to start up the came-cxf consumer just by using the WSDL.
https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest.java
https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyMessageModeNoSpringTest.java
Willem
-
5. Re: SMX4 WSDL-first web service consumer without Java
mlabrot Mar 10, 2011 9:53 AM (in response to njiang)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" />
</camel:route>
</camel:camelContext>
</beans>
-
6. Re: SMX4 WSDL-first web service consumer without Java
futuredan May 31, 2011 5:40 PM (in response to mlabrot)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.
-
7. Re: SMX4 WSDL-first web service consumer without Java
ffang May 31, 2011 7:28 PM (in response to futuredan)Hi,
I think you can use http-osgi transport with http-osgi default port.
Freeman
-
8. Re: SMX4 WSDL-first web service consumer without Java
futuredan Jun 1, 2011 9:59 AM (in response to ffang)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.
-
9. Re: SMX4 WSDL-first web service consumer without Java
njiang Jun 1, 2011 10:12 PM (in response to futuredan)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
from("cxf://myservices? xxx")
Willem
-
10. Re: SMX4 WSDL-first web service consumer without Java
futuredan Jun 2, 2011 10:28 AM (in response to njiang)That's awesome.
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.