On Fri, Apr 5, 2013 at 7:52 AM, William King <w...@terrafugue.com> wrote:

> ok, so if camel-jetty accepts the camel-http component options, hopefully a
>
> def endpointUri = "jetty:http://<whatever>?**Exchange.CONTENT_TYPE=**
> application/soap+xml
>
> inside an akka producer actor should do the trick. I'll give this a whirl
> when I
> can find a moment and see what happens. thanks again Chris


William, my advice at this point would be to spend some time learning
standard camel so you can get a better understanding of how it goes
together before. Those basics can then be translated into using akka-camel.

This is a typical route I might use when using jetty when I want to use a
specific content type:

from("direct:start")
                .setHeader("Content-Type", constant("text/xml"))
                .to("jetty:http://localhost:9999/xyz";)


>
>
> On Fri, 05 Apr 2013 00:08:14 -0500, Chris Geer <ch...@cxtsoftware.com>
> wrote:
>
>  On Thu, Apr 4, 2013 at 4:31 PM, William King <w...@terrafugue.com> wrote:
>>
>>  it does, thanks. my confusion arises from not completely understanding
>>> how
>>> the
>>> CamelMessage headers are used to build the http request headers by an an
>>> akka actor
>>>
>>>
>> I can only speak for camel-jetty but if you look at the component page [1]
>> you'll see that it uses the same parameters as the HTTP component [2].
>> Those can be set to control how camel-jetty reads/writes the http request.
>>
>> [1] http://camel.apache.org/jetty.**html<http://camel.apache.org/jetty.html>
>> [2] http://camel.apache.org/http.**html<http://camel.apache.org/http.html>
>>
>>
>>> tinkering around, I see a few familiar things int the CamelMessage header
>>> (like Content-Length) and some unfamiliar Camel specific headers so I'll
>>> try setting Content-Type in the Camel Message and see what happens.
>>> Thanks
>>> for your suggestion
>>>
>>>
>>> On Thu, 04 Apr 2013 18:09:53 -0500, Chris Geer <ch...@cxtsoftware.com>
>>> wrote:
>>>
>>>  William, I guess I was responding on how camel-jetty works. If you set
>>> the
>>>
>>>> Content-Type header it will use that in the request/return. Can you be
>>>> more
>>>> specific in what you are trying to do?
>>>>
>>>> I'm not familiar with akka-camel (or scala) but looking at the
>>>> CamelMessage
>>>> documentation [1] it does appear to have ways to set/read headers.
>>>>
>>>> [1]
>>>> https://github.com/akka/akka/****blob/master/akka-camel/src/**<https://github.com/akka/akka/**blob/master/akka-camel/src/**>
>>>> main/scala/akka/camel/****CamelMessage.scala<https://**
>>>> github.com/akka/akka/blob/**master/akka-camel/src/main/**
>>>> scala/akka/camel/CamelMessage.**scala<https://github.com/akka/akka/blob/master/akka-camel/src/main/scala/akka/camel/CamelMessage.scala>
>>>> >
>>>>
>>>>
>>>>
>>>> On Thu, Apr 4, 2013 at 3:21 PM, William King <w...@terrafugue.com>
>>>> wrote:
>>>>
>>>>  there is no setHeader method on CamelMessage in akka-camel but there
>>>> are
>>>>
>>>>> some other header related methods.
>>>>>
>>>>> back to tinkering ...
>>>>>
>>>>>
>>>>> On Thu, 04 Apr 2013 16:48:16 -0500, Chris Geer <ch...@cxtsoftware.com>
>>>>> wrote:
>>>>>
>>>>>  Have you tried setHeader("Content-Type", "application/soap+xml")?
>>>>>
>>>>>
>>>>>>
>>>>>> On Thu, Apr 4, 2013 at 2:46 PM, wpking <w...@terrafugue.com> wrote:
>>>>>>
>>>>>>  I'm building a scala/akka-camel SOAP WS client using the jetty:http
>>>>>> camel
>>>>>>
>>>>>>  component. What is the recommended way of changing the Content-Type
>>>>>>> http
>>>>>>> request header to application/soap+xml ?
>>>>>>>
>>>>>>> Thanks in advance for your suggestions.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://camel.465427.n5.nabble.******com/Changing-the-jetty-**
>>>>>>> http-****
>>>>>>> Content-Type-request-header-******tp5730365.html<http://camel.****
>>>>>>> 465427.n5.nabble.com/Changing-****the-jetty-http-Content-Type-****<http://465427.n5.nabble.com/Changing-**the-jetty-http-Content-Type-**>
>>>>>>> request-header-tp5730365.html<**http://camel.465427.n5.nabble.**
>>>>>>> com/Changing-the-jetty-http-**Content-Type-request-header-**
>>>>>>> tp5730365.html<http://camel.465427.n5.nabble.com/Changing-the-jetty-http-Content-Type-request-header-tp5730365.html>
>>>>>>> >
>>>>>>>
>>>>>>> >
>>>>>>>
>>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>

Reply via email to