Hi, I'm having trouble using recipientList inside of Spring DSL. I'm
relatively new to Camel, but I feel like I have a grasp of a lot of the
concepts. However, I can't seem to figure out what I'm doing wrong here or
if I'm doing something that isn't really supported.

My goal is to invoke multiple webservices using the http4 component from my
camel route by leveraging the recipientList feature. I've included some
pseudo-snippets of what I'm trying to accomplish.

Snippet:
        <camel:process ref="setupSOAPMessageProcessor"/>
        <camel:recipientList>
                <camel:header>getWSEndpoints</camel:header>
        </camel:recipientList>

I have the preceding block in my Camel Spring DSL file. My
"setupSOAPMessageProcessor" is a custom Java implemented Camel Processor
that constructs a SOAP Message and attempts to set the header
"getWSEndpoints" with a list of dynamically constructed 'https4' endpoint
URIs.

Snippet from the Java class (dynamic construction of URIs removed for
brevity in this post):
        String uriEndpoint =
"https4://webservicehost.com/app/webservice?sslContextParametersRef=camelSslContext&authUsername=user1&authPassword=RAW(user1pass)&authenticationPreemptive=true";
        exchange.getOut().copyFrom(exchange.getIn());
        exchange.getOut().setBody(soapMessage);
        exchange.getOut().setHeader(Exchange.CONTENT_TYPE, "text/xml");
        exchange.getOut().setHeader("getWSEndpoints", uriEndpoint);

The problem I'm having is that "sslContextParameters", "authUsername",
"authPassword", and "authenticationPreemptive" are all supposed to be http4
endpoint configuration parameters. However, when I run my route, it seems as
though that these endpoint parameters are instead treated as query params to
the HTTP POST method instead.

Snippet of output from running my route:

    LOG: HTTP operation failed invoking
https://webservicehost.com/app/webservice?sslContextParametersRef=camelSslContext&authUsername=user1&authPassword=RAW(user1pass)&authenticationPreemptive=true
with statusCode: 401
org.apache.camel.component.http4.HttpOperationFailedException: HTTP
operation failed invoking
https://webservicehost.com/app/webservice?authUsername=user1&authPassword=RAW(user1pass)&authenticationPreemptive=true&sslContextParametersRef=camelSslContext
with statusCode: 401

Another curiosity, it seems as though the http4 component re-arranged my
parameters in alphabetical order. :)

Environment Details:
 Application Container: JBoss Fuse 6.1.0
 JRE: Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
 Camel: 2.12.0
 OS: OSX Yosemite

Thanks in advance!



--
View this message in context: 
http://camel.465427.n5.nabble.com/RecipientList-http4-and-Spring-DSL-problems-with-URI-encoding-tp5770235.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to