You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michiel <ml...@anwb.nl> on 2016/08/05 12:57:59 UTC

Setting up a SOAP webservice using camel blueprint

I installed apache-servicemix-7.0.0M2 and have been fiddling; trying to get
the hang of this platform.

My latest try doesn't seem to get me close enough to my goal: a webservice
exposed with a wsdl that will put the body and headers on my activemq
broker. I have managed to get messages on a queue by using the file: url, so
the jms works; as well as got the messages from said queue into a database,
so got jdbc working as well...

Now I'm trying this blueprint; but am pretty much stuck: here's the full
blueprint; what am I missing or just simply doing completely wrong? Would
think this should be possible without writing any java code.

<blueprint
        xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">


        <reference id="myJms" interface="javax.jms.ConnectionFactory"
filter="(osgi.jndi.service.name=jms/broker1)" />


        <camelContext xmlns="http://camel.apache.org/schema/blueprint">
                <route>
                        <from
uri="cxf://my_test_01_01?serviceClass=PAYLOAD&amp;wsdlLocation=wsdl/my_test_1.1.wsdl"
/>
                        <log message="Got SOAP message" />
                        <to
uri="activemq:my.test.queue?connectionFactory=myJms&amp;jmsMessageType=Text"/>
                </route>
        </camelContext>

        <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0">
                <cxfbc:provider wsdl="wsdl/my_test_1.1.wsdl"
endpoint="MyTestEndpoint" >
                        <cxfbc:features>
                                <bean
class="org.apache.cxf.transport.jms.JMSConfigFeature">
                                        <property name="jmsConfig">
                                                <bean
class="org.apache.cxf.transport.jms.JMSConfiguration">
                                                        <property
name="concurrentConsumers">
                                                               
<value>5</value>
                                                        </property>
                                                        <property
name="connectionFactory">
                                                                <ref
bean="myJms" /> 
                                                        </property>
                                                        <property
name="targetDestination">
                                                               
<value>test.jmstransport.text.provider</value>
                                                        </property>
                                                        <property
name="useJms11">
                                                               
<value>false</value>
                                                        </property>
                                                </bean>
                                        </property>
                                </bean>
                        </cxfbc:features>
                </cxfbc:provider>
        </beans>
</blueprint>




--
View this message in context: http://servicemix.396122.n5.nabble.com/Setting-up-a-SOAP-webservice-using-camel-blueprint-tp5723899.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Setting up a SOAP webservice using camel blueprint

Posted by Michiel <ml...@anwb.nl>.
Did even more reading and came with another approach; but now getting the
following error:

Bundle testwebservice2queue/1.0.0 is waiting for namespace handlers
[http://camel.apache.org/schema/cxf,
http://www.springframework.org/schema/beans]

Blueprint is now:

<blueprint
        xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">


        <reference id="myJms" interface="javax.jms.ConnectionFactory"
filter="(osgi.jndi.service.name=jms/broker1)" />


        <camelContext xmlns="http://camel.apache.org/schema/blueprint">
                <route>
                        <from
uri="cxf:bean:MyTestEndpoint?serviceClass=PAYLOAD&amp;wsdlLocation=wsdl/my_test_1.1.wsdl"
/>
                        <log message="Got SOAP message" />
                        <to
uri="activemq:my.test.queue?connectionFactory=myJms&amp;jmsMessageType=Text"/>
                </route>
        </camelContext>

        <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:cxf="http://camel.apache.org/schema/cxf"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="
                        http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
                        http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
                        http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">

                <cxf:cxfEndpoint id="MyTestEndpoint"
wsdlURL="wsdl/my_test_1.1.wsdl" />
        </beans>
</blueprint>



--
View this message in context: http://servicemix.396122.n5.nabble.com/Setting-up-a-SOAP-webservice-using-camel-blueprint-tp5723899p5723908.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.