On 6/28/07, spork <[EMAIL PROTECTED]> wrote:

Hi,

I'm just getting started with ServiceMix and am a bit confused, hopefully
someone will be able to help me out.

What I am trying to achieve is to read messages (xml snippets) from a topic
on the ordinary ActiveMQ queue (using a servicemix-jms SU as a consumer),
forward it to another SU (servicemix-http as a provider) and have the
provider perform a request to an external url.

This is the structure I have:

./my-provider-su/pom.xml
./my-provider-su/src/main/resources/xbean.xml
./my-consumer-su/pom.xml
./my-consumer-su/src/main/resources/xbean.xml
./my-sa/pom.xml

This is the content of ./my-provider-su/src/main/resources/xbean.xml:

<beans xmlns:http="http://servicemix.apache.org/http/1.0";
xmlns:test="http://test";>
  <http:endpoint service="test:http"
                 endpoint="endpoint"
                 role="provider"
                 locationURI="http://my.machine.com/reqme.cgi";
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only"; />
</beans>

And this is the content of ./my-consumer-su/src/main/resources/xbean.xml:

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
xmlns:test="http://test";>
    <jms:endpoint service="test:jms"
                  endpoint="endpoint"
                  targetService="test:http"
                  role="consumer"
                  destinationStyle="topic"
                  jmsProviderDestinationName="topic/test"
                  connectionFactory="#connectionFactory"
                  defaultMep="http://www.w3.org/2004/08/wsdl/in-only"; />

    <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
      <property name="brokerURL" value="tcp://localhost:61616" />
    </bean>
</beans>

The above is probably wrong in about a million different ways, so if someone
could point me in the right direction I would be most grateful.

For instance, have I misunderstood the consumer and provider roles?

And if the http SU were actually making requests, what would they look like?
Is it related to the "soap" attribute?

Would it be possible to just send the xml snippets on as POST requests?

Any help highly appreciated.

Actually it looks and sounds to me like you're grasping the concepts
just fine. Your configurations look perfect. The requests that get
sent will be XML messages and should be able to be captured by proxing
calls through the use of something like TCPMon
(http://ws.apache.org/commons/tcpmon/tcpmontutorial.html) or some
similar proxy utility.

Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Reply via email to