Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3459528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:07:01+00:00 2026-05-18T10:07:01+00:00

We’re using camel routes to post values from a queue to an http endpoint.

  • 0

We’re using camel routes to post values from a queue to an http endpoint.

I’ve successfully set up the route using camel’s http component, but I’m unable to get the body of the jms message to post.

For example, my route is set up like this:

<route errorHandlerRef="dlc" autoStartup="true" id="route2" xmlns:ns2="http://camel.apache.org/schema/web" xmlns="http://camel.apache.org/schema/spring">
    <from uri="activemq:test"/>
    <setHeader headerName="CamelHttpMethod">
            <constant>POST</constant>
        </setHeader>
    <to uri="http://localhost/tim/camel/" id="to2"/>
</route>

Which results in a POST, but the message body does not show up in my POST string (as print_r’d from $_SERVER):

Array
(
    [instance] => local
    [HTTP_JMSDELIVERYMODE] => 1
    [HTTP_JMSDESTINATION] => queue://test
    [HTTP_JMSEXPIRATION] => 0
    [HTTP_JMSTYPE] => 
    [HTTP_JMSTIMESTAMP] => 1291468702773
    [HTTP_JMSPRIORITY] => 0
    [HTTP_JMSCORRELATIONID] => 
    [HTTP_JMSMESSAGEID] => ID:new-host-3.home-62248-1291465669089-4:3:1:1:4
    [HTTP_JMSREDELIVERED] => false
    [HTTP_USER_AGENT] => Jakarta Commons-HttpClient/3.1
    [HTTP_HOST] => localhost
    [HTTP_COOKIE] => $Version=0; PHPSESSID=32aa692c71e1003f2e540c1b80c3b363; $Path=/
    [CONTENT_LENGTH] => 44
    [CONTENT_TYPE] => text/html
    [PATH] => /usr/bin:/bin:/usr/sbin:/sbin
    [SERVER_SIGNATURE] => <address>Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7l Server at localhost Port 80</address>

    [SERVER_SOFTWARE] => Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7l
    [SERVER_NAME] => localhost
    [SERVER_ADDR] => 127.0.0.1
    [SERVER_PORT] => 80
    [REMOTE_ADDR] => 127.0.0.1
    [DOCUMENT_ROOT] => /wufoo/trunk/
    [SERVER_ADMIN] => you@example.com
    [SCRIPT_FILENAME] => /wufoo/trunk/tim/camel/index.php
    [REMOTE_PORT] => 62877
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => POST
    [QUERY_STRING] => 
    [REQUEST_URI] => /tim/camel/
    [SCRIPT_NAME] => /tim/camel/index.php
    [PHP_SELF] => /tim/camel/index.php
    [REQUEST_TIME] => 1291468702
    [argv] => Array
        (
        )

    [argc] => 0
)

Notice REQUEST_METHOD is POST, but argv does not contain a message body.

In short, I need to transfer the message body from the ‘from’ route to the ‘to’ route so it may be sent as a POST, but I’m failing somehow.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:07:01+00:00Added an answer on May 18, 2026 at 10:07 am

    I found the answer. To fix, I had to add the Content Type node to the header and set the body to a name/value pair, as shown below:

    <route errorHandlerRef="dlc" autoStartup="true" inheritErrorHandler="true" id="route2" xmlns:ns2="http://camel.apache.org/schema/web" xmlns="http://camel.apache.org/schema/spring">
        <from uri="activemq:test"/>
        <setBody inheritErrorHandler="true" id="setBody2">
            <simple>name=${body}</simple>
        </setBody>
        <setHeader headerName="Content-Type" inheritErrorHandler="true" id="setHeader3">
            <constant>application/x-www-form-urlencoded;</constant>
        </setHeader>
        <setHeader headerName="CamelHttpMethod" inheritErrorHandler="true" id="setHeader4">
            <constant>POST</constant>
        </setHeader>
        <to uri="http://localhost/tim/camel/" inheritErrorHandler="true" id="to2"/>
    </route>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.