Hi Stefan,

When you say "get data from a web service", does it mean that you want that Camel act as a consumer, binding a HTTP endpoint expecting incoming SOAP message or Camel act as a provider and communicates with an "external" WebService ?

I guess it's the first behavior: Camel as a consumer.

You can do it using camel-cxf or camel-jetty components.

For example, using camel-cxf, you can define something like:

<cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9000/SoapContext/SoapPort";
                wsdlURL="testutils/hello_world.wsdl"
                serviceClass="org.apache.hello_world_soap_http.Greeter"
                endpointName="s:SoapPort"
                serviceName="s:SOAPService"
        xmlns:s="http://apache.org/hello_world_soap_http"; />
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring";>
       <route>
         <from uri="cxf:bean:routerEndpoint" />
         <to uri="cxf:bean:serviceEndpoint" />
       </route>
    </camelContext>

Camel uses Apache CXF to "expose" a WebService and waiting for incoming SOAP messages.

Regards
JB


On 10/22/2010 11:07 AM, Lorenz, Stefan wrote:
Hi,
I'm trying to get data from a web service.
I tried it with the ConsumerTemplate and just using
consumer.receiveBody("http://foo/?query=bar... <http://foo/?query=bar>")
this is working but there I got an error because of the whitespaces in
the query parameter...
I have encoded them correctly...
so is there another way to do that?

Mit freundlichen Grüßen / kind regards

Stefan Lorenz

wissenschaftlicher Mitarbeiter

Hochschule Aalen / Aalen University
Fakultät Elektronik und Informatik
Anton-Huber-Strasse 25

73430 Aalen

E-Mail: [email protected] <mailto:[email protected]>
Internet: www.htw-aalen.de <http://www.htw-aalen.de/>

Reply via email to