camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael PrieƟ <mailingliste...@googlemail.com>
Subject HTTP request
Date Fri, 29 Apr 2011 07:23:21 GMT
Hello,

I like to request some data from a soap service and after receiving
the response I like to convert the received data in another route. But
I not understand how to use the http component to send a http request
to the server. Is this the right way to do that?

    <route id="Webservice" autoStartup="true">
      <from uri="direct:requestWebservice" />
      <setBody><constant><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body />
</soap:Envelope>]]></constant></setBody>
      <setHeader headerName="Content-Type">
        <constant>text/xml;</constant>
      </setHeader>
      <setHeader headerName="CamelHttpMethod">
        <constant>POST</constant>
      </setHeader>
      <to uri="http://myserver.com?authUsername=myuser&amp;authPassword=myPassword&amp;authMethod=Basic"
/>
      <to uri="file://d:/opt/output" />
    </route>

Regards,

Michael

Mime
View raw message