CxfEndpoint soap client usernametoken authentication

2016-09-21 Thread catequil
I am trying to access a soap service that requires that I athenticate with a
usernametoken in the security header.  Example desired outcome:



I can get the soap envelope part right with body, but the header with
security header alludes me.
Does anyone have a best practices for doing this in Camel?

Camel route below:


camel-config.xml below:





--
View this message in context: 
http://camel.465427.n5.nabble.com/CxfEndpoint-soap-client-usernametoken-authentication-tp5787910.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel returns HTTP operation failed invoking with status code 400

2016-09-21 Thread Vanshul . Chawla
Hello All,

I have a peculiar problem. I have a service written in camel using Camel 2.17. 
I am invoking an external webservice over https. I have imported certificates 
in a keystore( my local jdk keystore) and the service returns a correct 
response.

When I execute same jar on a server, it gives http 400 for same service and 
same request. I have imported same certificates there too.

Could someone lead me to some pointers please.

Vanshul


Why is the set body not being returned?

2016-09-21 Thread sim085
Hello, I am trying some Camel with Jetty examples. The problem I have is that
after I do an http request to another site jetty no longer returns the set
body.

For example,

[code]
from("jetty:http://localhost:8080;).setBody(constant("OK")); 
[/code]

Returns "OK" when from the browser I call the above set URL. However if the
following will not work.

[code]
from("jetty:http://localhost:8080;)
.to("jetty:http://www.google.com; + 
"?bridgeEndpoint=true" + 
"=false")
.setBody(constant("OK")); 
[/code]

This returns the response from google (see attachment at end of message) and
not "OK" even though after the call to google I am setting the body to "OK".

What I find strange is this ...

The following code prints in the console that the body is "OK" but the
response returned to the browser is still the response got from google.

[code]
from("jetty:http://localhost:8080;)
.to("jetty:http://www.google.com; + 
"?bridgeEndpoint=true" + 
"=false")
.setBody(constant("OK"))
.log("THE BODY IS ${body}"); // This line prints "OK" in the console.
[/code]

After looking through the Jetty Camel documentation I saw an example which
was overriding the body and that one works.

[code]
from("jetty:http://localhost:8080;)
.to("jetty:http://www.google.com; + 
"?bridgeEndpoint=true" + 
"=false")
.process(new Processor(){
public void process(Exchange e) throws Exception {
e.getOut().setBody("HELLO");
}
})
// .setBody(constant("OK")) // LINE 1
.log("THE BODY IS ${body}");
[/code]

The above without LINE 1 remarked returns "HELLO" in both browser and
console and with LINE 1 not remarked it returns "OK" in both browser and
console.

So why does setBody work when e.getOut().setBody(...) is used but not if
this is used without the processor?


 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Why-is-the-set-body-not-being-returned-tp5787905.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-21 Thread Brad Johnson
I have to wonder if this is related to the problem you're seeing with the
CBTS using weaving. It just popped up.  Since I've never used that
mechanism I don't know.  I usually just add my test endpoint definitions in
the test-blueprint-proerties.xml and then have a different default and cfg
production.

http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-td5787900.html

On Wed, Sep 21, 2016 at 4:30 AM, owain  wrote:

> Brad,
>
>
>
> Thanks I will give it a go.
>
>
>
> O.
>
> ![](https://link.nylas.com/open/ez36v71u7uh7qiundny4ougdd/local-bdc9cbeb-
> 0fb0?r=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmxlLmNvbQ==)
>
>
> On Sep 21 2016, at 12:01 am, Ranx [via Camel]  node+s465427n5787793...@n5.nabble.com> wrote:
>
> > One part of this that's been bothering mainly due to my ignorance of not
> having used in my testing is the adviceWith.  And the weaveById.  Route
> definitions throw the generic big E exception.  I wonder if you'd see
> anyting in there if you did something like this.  At least that could
> identify whether there was a problem there or not. By the way I'm
> freehanding my try/catches there so the may not be aligned correctly.
>
>   @Test
>   public void testMessageReceived() throws Exception {
> try{
>
> context.getRouteDefinition("i4ip-order-publish-route").adviceWith(context,
> new AdviceWithRouteBuilder() {
>   @Override
>   public void configure() throws Exception {
> *try{*
> replaceFromWith("direct:in");
> weaveById("publishedMessage").after().to("mock:increment");
> *} catch(Exception e) {*
> *System.out.println("We threw an exception in the weaving".*
> *  }*
> *} catch(Excepion e)*
> *System.out.println("We caught an error in the route builder."*
> *}*
> });
>
> On Tue, Sep 20, 2016 at 12:15 PM, Brad Johnson <[[hidden
> email]](/user/SendEma
> il.jtp?type=node=5787793=0=bWwtbm9kZStzNDY1NDI3bjU3ODc3OT
> NoMzdAbjUubm
> FiYmxlLmNvbQ==)
> > wrote:
>
> >
>
> >
> > Too bootstrap a route from the Java DSL you only need to do something
> like
> > this:
> >
> > http://camel.apache.org/schema/blueprint](http://
> camel
> .apache.org/schema/blueprint=bWwtbm9kZStzNDY1NDI3bjU3ODc3OT
> NoMzdAbjUubmFiYmx
> lLmNvbQ==)">
> >
> >  my.routes.internal
> >
> > 
> >
> > And in the my.routes.internal package (or whatever you want to call it)
> you
> would have route builder. You could put mock:out instead of direct:out.
> You'll still use blueprint to export or import OSGi services if you are
> using
> them but that's a trivial matter and I wouldn't worry about it just yet.
> While
> those routes are hard coded in here you'll later replace them with
> substitution variable names that you can change from the properties.  Use
> the
> default properties first and then you can override them in you cfg file for
> production.
> >
> > public class ARouteBuilder extends RouteBuilder {
> >
> > public void configure() {
> >
> > from("direct:in")
> >.log("${body}")
> >.to("direct:out");
> >
> > }
> >
> > }
> >
> > Also, I'm not sure how IDEA works but I'm sure there's something
> > equivalent to what one would do in Eclipse to start a project with a
> Maven
> > archetype.  Just type in:
> >
> > camel-archetypes-
> >
> > and it should give you a list of sample archetypes to use to start a
> > project.  Also, since you are using Fuse there's a selection of projects
> > under the "quickstarts" directory in there.
> >
> > Brad
> >
> >
> >
> >
> > On Tue, Sep 20, 2016 at 6:27 AM, owain <[[hidden
> email]](/user/SendEmail.jtp
> ?type=node=5787793=1=bWwtbm9kZStzNDY1NDI3bjU3ODc3OT
> NoMzdAbjUubmFiYmxl
> LmNvbQ==)>
> > wrote:
> >
> >> Brad,
> >>
> >> I am using 2.15.6 since this is the
> >> closest
> >> to Fuse-6.2.1.  I have just tried the test with CBTS 2.17.0.  Is there a
> >> higher version?
> >>
> >> I add mock:increment (now refactored to mock:out) and replace the "from"
> >> with direct:in in.
> >>
> >>
> >> context.getRouteDefinition("i4ip-order-publish-route").advic
> >> eWith(context,
> >> new AdviceWithRouteBuilder() {
> >>   @Override
> >>   public void configure() throws Exception {
> >> replaceFromWith("direct:in");
> >> weaveById("publishedMessage").after().to("mock:out");
> >>   }
> >> });
> >>
> >> Also I am drawing the same conclusion about the XML only approach.
> Could
> >> you kind enough to post and example to how to bootstrap the Java DSL
> from
> >> the Blueprint XML.
> >>
> >> Thanks for your help. I will try putting it in a new project and see if
> >> that
> >> was the problem.  In a single xml file.
> >>
> >> O.
> >>
> >>
> >>
> >> \--
> >> View this message in context: [http://camel.465427.n5.nabble](
> http://camel.
> 465427.n5.nabble=bWwtbm9kZStzNDY1NDI3bjU3ODc3OT
> NoMzdAbjUubmFiYmxlLmNvbQ==).
> >> com/org-osgi-service-blueprint-container-ComponentDefinition
> >> 

Re: Why is the set body not being returned?

2016-09-21 Thread souciance
I would think it is because the setbody is setting the body in the IN
exchange and the response you get is from the OUT exchange due to the
request/reply nature of your operation. It works similarly with RabbitMQ
where you have to set exchangePattern to InOut to get request/reply. If you
log the actual headers you will see the exchange values so you can compare.

On Wed, Sep 21, 2016 at 8:59 PM, sim085 [via Camel] <
ml-node+s465427n5787905...@n5.nabble.com> wrote:

> Hello, I am trying some Camel with Jetty examples. The problem I have is
> that after I do an http request to another site jetty no longer returns the
> set body.
>
> For example,
>
> [code]
> from("jetty:http://localhost:8080;).setBody(constant("OK"));
> [/code]
>
> Returns "OK" when from the browser I call the above set URL. However if
> the following will not work.
>
> [code]
> from("jetty:http://localhost:8080;)
> .to("jetty:http://www.google.com; +
> "?bridgeEndpoint=true" +
> "=false")
> .setBody(constant("OK"));
> [/code]
>
> This returns the response from google (see attachment at end of message)
> and not "OK" even though after the call to google I am setting the body to
> "OK".
>
> What I find strange is this ...
>
> The following code prints in the console that the body is "OK" but the
> response returned to the browser is still the response got from google.
>
> [code]
> from("jetty:http://localhost:8080;)
> .to("jetty:http://www.google.com; +
> "?bridgeEndpoint=true" +
> "=false")
> .setBody(constant("OK"))
> .log("THE BODY IS ${body}"); // This line prints "OK" in the console.
> [/code]
>
> After looking through the Jetty Camel documentation I saw an example which
> was overriding the body and that one works.
>
> [code]
> from("jetty:http://localhost:8080;)
> .to("jetty:http://www.google.com; +
> "?bridgeEndpoint=true" +
> "=false")
> .process(new Processor(){
> public void process(Exchange e) throws Exception {
> e.getOut().setBody("HELLO");
> }
> })
> // .setBody(constant("OK")) // LINE 1
> .log("THE BODY IS ${body}");
> [/code]
>
> The above without LINE 1 remarked returns "HELLO" in both browser and
> console and with LINE 1 not remarked it returns "OK" in both browser and
> console.
>
> So why does setBody work when e.getOut().setBody(...) is used but not if
> this is used without the processor?
>
>
>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Why-is-the-set-body-not-
> being-returned-tp5787905.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Why-is-the-set-body-not-being-returned-tp5787905p5787907.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Blueprint and property placeholder

2016-09-21 Thread Brad Johnson
I don't believe the same properties can be used by multiple bundles yet.  I
think it's in the specification but isn't implemented in Aries yet.

Anyone out there that knows otherwise please correct.

On Tue, Sep 20, 2016 at 12:43 PM, dpravin  wrote:

> Hello All,
>
> We have some common properties, not integration/bundle specific. Can
> multiple routes/bundles refer to these property files from blueprint using
> cm:property-placeholder?
>
> I also found out that if you have set update-strategy="reload" the bundle
> get restarted irrespective of the property being used by the bundle. Is
> this
> the default behavior? Is there anything that can help avoid reload/restart
> of bundle if the property is not used?
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Blueprint-and-property-placeholder-tp5787763.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-21 Thread ncsibra
Upload a corrected file, which starts the route after adviceWith setup, but
doesn't matter, it fails with the same exception.

OnExceptionTest.java
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5787901.html
Sent from the Camel - Users mailing list archive at Nabble.com.


weaveAddFirst doesn't work correctly with route level onException

2016-09-21 Thread ncsibra
Hi,

I'm using camel version 2.17.1 and I have some problem with the
weaveAddFirst method.
When a route level onException clause exist and only one advice added or
multiple advice added, but the first one contains the weaveAddFirst method,
then camel will throw an exception:

"java.lang.IllegalArgumentException: There are no outputs which matches: *
in the route: Route(exceptionFirst)[[From[direct:exceptionFirst]] ->
[OnException[[class java.lang.Exception] ->
[process[Processor@0x49438269]]], process[Processor@0xba2f4ec]]]"

Attached a single junit test file, I'm able to reproduce the bug with this
in the mentioned camel version and even in the latest one(2.17.3) too.
OnExceptionTest.java
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml

2016-09-21 Thread owain
Brad,

  

Thanks I will give it a go.

  

O.

![](https://link.nylas.com/open/ez36v71u7uh7qiundny4ougdd/local-bdc9cbeb-
0fb0?r=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmxlLmNvbQ==)

  
On Sep 21 2016, at 12:01 am, Ranx [via Camel]  wrote:  

> One part of this that's been bothering mainly due to my ignorance of not  
having used in my testing is the adviceWith.  And the weaveById.  Route  
definitions throw the generic big E exception.  I wonder if you'd see  
anyting in there if you did something like this.  At least that could  
identify whether there was a problem there or not. By the way I'm  
freehanding my try/catches there so the may not be aligned correctly.  
  
  @Test  
  public void testMessageReceived() throws Exception {  
try{  
  
context.getRouteDefinition("i4ip-order-publish-route").adviceWith(context,  
new AdviceWithRouteBuilder() {  
  @Override   
  public void configure() throws Exception {   
*try{*   
replaceFromWith("direct:in");   
weaveById("publishedMessage").after().to("mock:increment");   
*} catch(Exception e) {*   
*System.out.println("We threw an exception in the weaving".*   
*  }*   
*} catch(Excepion e)*   
*System.out.println("We caught an error in the route builder."*   
*}*   
});   
  
On Tue, Sep 20, 2016 at 12:15 PM, Brad Johnson <[[hidden email]](/user/SendEma
il.jtp?type=node=5787793=0=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubm
FiYmxlLmNvbQ==)  
> wrote:  

>

>  
> Too bootstrap a route from the Java DSL you only need to do something like  
> this:  
>  
> http://camel.apache.org/schema/blueprint](http://camel
.apache.org/schema/blueprint=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmx
lLmNvbQ==)">  
>  
>  my.routes.internal  
>  
>   
>  
> And in the my.routes.internal package (or whatever you want to call it) you
would have route builder. You could put mock:out instead of direct:out.
You'll still use blueprint to export or import OSGi services if you are using
them but that's a trivial matter and I wouldn't worry about it just yet. While
those routes are hard coded in here you'll later replace them with
substitution variable names that you can change from the properties.  Use the
default properties first and then you can override them in you cfg file for
production.  
>  
> public class ARouteBuilder extends RouteBuilder {  
>  
> public void configure() {  
>  
> from("direct:in")  
>.log("${body}")  
>.to("direct:out");  
>  
> }  
>  
> }  
>  
> Also, I'm not sure how IDEA works but I'm sure there's something  
> equivalent to what one would do in Eclipse to start a project with a Maven  
> archetype.  Just type in:  
>  
> camel-archetypes-  
>  
> and it should give you a list of sample archetypes to use to start a  
> project.  Also, since you are using Fuse there's a selection of projects  
> under the "quickstarts" directory in there.  
>  
> Brad  
>  
>  
>  
>  
> On Tue, Sep 20, 2016 at 6:27 AM, owain <[[hidden email]](/user/SendEmail.jtp
?type=node=5787793=1=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmxl
LmNvbQ==)>  
> wrote:  
>  
>> Brad,  
>>  
>> I am using 2.15.6 since this is the  
>> closest  
>> to Fuse-6.2.1.  I have just tried the test with CBTS 2.17.0.  Is there a  
>> higher version?  
>>  
>> I add mock:increment (now refactored to mock:out) and replace the "from"  
>> with direct:in in.  
>>  
>>  
>> context.getRouteDefinition("i4ip-order-publish-route").advic  
>> eWith(context,  
>> new AdviceWithRouteBuilder() {  
>>   @Override  
>>   public void configure() throws Exception {  
>> replaceFromWith("direct:in");  
>> weaveById("publishedMessage").after().to("mock:out");  
>>   }  
>> });  
>>  
>> Also I am drawing the same conclusion about the XML only approach.  Could  
>> you kind enough to post and example to how to bootstrap the Java DSL from  
>> the Blueprint XML.  
>>  
>> Thanks for your help. I will try putting it in a new project and see if  
>> that  
>> was the problem.  In a single xml file.  
>>  
>> O.  
>>  
>>  
>>  
>> \--  
>> View this message in context: [http://camel.465427.n5.nabble](http://camel.
465427.n5.nabble=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmxlLmNvbQ==).  
>> com/org-osgi-service-blueprint-container-ComponentDefinition  
>> Exception-Unable-to-validate-xml-tp5787642p5787758.html  
>> Sent from the Camel - Users mailing list archive at Nabble.com.  
>>  
>  
>  

>

>  
  

>

> * * *

>

> If you reply to this email, your message will be added to the discussion
below:

>

> [http://camel.465427.n5.nabble.com/org-osgi-service-blueprint-container-
ComponentDefinitionException-Unable-to-validate-xml-
tp5787642p5787793.html](http://camel.465427.n5.nabble.com/org-osgi-service-
blueprint-container-ComponentDefinitionException-Unable-to-validate-xml-tp5787
642p5787793.html=bWwtbm9kZStzNDY1NDI3bjU3ODc3OTNoMzdAbjUubmFiYmxlLmNvbQ==)

>

> To unsubscribe from

Re: XML Security - Is it possible to change transform algorithm on KeyInfo-object and SignedProperties?

2016-09-21 Thread Franz Paul Forsthofer
Hello Niklas,

can you point me in the spec https://www.w3.org/TR/xmldsig-core/ to the
part which allows to define transformations also for the KeyInfo element. I
could not find such kind of definition. If it is there in the specification
we might think about to include this into our camel processor.

This holds as well as for the SignedProperties element. See spec
http://www.etsi.org/deliver/etsi_ts%5C101900_101999%5C101903%5C01.04.02_60%5Cts_101903v010402p.pdf

Best Regards Franz

On Tue, Aug 30, 2016 at 10:34 AM, salkin 
wrote:

> *I'm trying to generate an XML-signature using Apache Camel Xml-Security
> component. My RouteBuilder and configuration looks like this:
> *
> /
> private void createRouteBuilders() throws Exception {
> /**
>  *  Sign XML with enveloping signature
>  *
>  *  JndiRegistry is used to bind signature variables
>  *
>  *  Key accessor = Use organisation X509Certificate
>  *  Signature algorithm =
> http://www.w3.org/2001/04/xmldsig-more#rsa-sha256;
>  *  Canonicalization method =  http://www.w3.org/2001/10/xml-exc-c14n#
>  *  Transform method = http://www.w3.org/2001/10/xml-exc-c14n#
>  *  Xades signature = defined in xadesProperties
>  *
>  * */
> context.addRoutes(new RouteBuilder() {
> public void configure() throws Exception {
> //TODO: Handle exception
> from("direct:xml-signature")
> .convertBodyTo(String.class)
> .to("xmlsecurity:sign://enveloping?"
> + "keyAccessor=#accessor&"
> +
> "signatureAlgorithm=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&;
> + "canonicalizationMethod=#canonicalizationMethod1&"
> + "transformMethods=#transformMethods&"
> + "properties=#xadesProperties")
> .convertBodyTo(Document.class);
> }
> });
> }
>
> private JndiRegistry createRegistry() throws Exception {
> JndiRegistry registry = new JndiRegistry();
>
> registry.bind("accessor", getKeyAccessor(keyPair.getPrivate()));
> registry.bind("canonicalizationMethod1", getCanonicalizationMethod());
> registry.bind("transformMethods", getTransformMethods());
> registry.bind("xadesProperties", getXadesProperties());
>
> return registry;
> }
>
> private XAdESSignatureProperties getXadesProperties() {
> XAdESSignatureProperties props = new XAdESSignatureProperties();
>
> props.setNamespace("http://uri.etsi.org/01903/v1.3.2#;);
> props.setPrefix("xades");
> props.setAddSigningTime(true);
>
> return props;
> }
>
> private AlgorithmMethod getCanonicalizationMethod() {
> return
> XmlSignatureHelper.getCanonicalizationMethod(CanonicalizationMethod.
> EXCLUSIVE);
> }
>
> private List getTransformMethods() {
> ArrayList transformMethods = new
> ArrayList();
> transformMethods.add(getCanonicalizationMethod());
> return transformMethods;
> }/
>
> *The resulting XML looks like this:*
> /
> http://www.w3.org/2000/09/xmldsig#;
> Id="_78256618-6394-43fb-a551-45013f9df404">
> 
>  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
>  Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
> 
> 
>  Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
> 
>  Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
>
> KKcHfq+gpUlD9ltfvxUJC0DRLySRKeZqKebHr
> jxz1aI=
> 
> 
> 
>  Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
> 
>  Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
>
> g6DR+ETW13DssymC5AHS2CsPwUFAlBKQeTH
> H81b+w/c=
> 
> http://uri.etsi.org/01903#SignedProperties;
> URI="#_f6ff95f0-42af-41f0-a4d7-37d9c7070bb6">
>  Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
>
> w+s0PSrSzE1bfGZYt2U3mipZMYv+ETcdB6eK6DtqB48= DigestValue>
> 
> 
> JOxBA0/9+hoxI7azTMemZfijEF4BoOU1wMmdzYt
> TSQchxDxr2LerQswNG2/26ANVAmWgmvMnrd5a8yxJsUw9EbkpQfAaJXX+
> ccXWLQVLxFSKYOVZqOG0UR1uPRN/Gs9LYjpDYsdKHbWzycfaSiKwSvFFUx
> rdt40xev4YEHh0xMVDpUQwruXEOrSfw1ceWLpJYTrLWAPcM3Ynd1/
> lXfEPylUJhHZPZ38ALk6QopOJ4D5jqndvzzGnWyXF1n0YImFut4OeviD+
> pHujRga6I3BN16ADErtEJQaQOR6CAVDkQvaiC12qrPwTm3vD4k5zgdtkdYPW
> Wexxl3IiRJlcqoVuSQ==
> 
> 
> 
>
> 
> 
> 
> 
>
> 
> 
>  xmlns:xades="http://uri.etsi.org/01903/v1.3.2#;
> Target="#_78256618-6394-43fb-a551-45013f9df404">
> 
> 
>
> 2016-08-25T14:43:39+02:00
> 
> 
> 
> /
> *
> I want my chosen transform algorithm (Exclusive Canonicalization) to also
> apply on the KeyInfo and the SignedProperties objects. Is this possible? If
> it is, how do I achieve this? *
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/XML-Security-Is-it-possible-to-change-transform-
> algorithm-on-KeyInfo-object-and-SignedProperties-tp5786982.html
> Sent from the Camel - Users 

Re: Database route shutdown

2016-09-21 Thread redpower1989
Hello,

Thanks for the response. According to the FAQ in order to stop a route it is
better to do it inside a different thread. In my case that worked fine. Now
i am trying when the database is available to start egain the stopped route.
If i want to start a route do i have to do it again from a different thead
or should i implement the loging inside the stopping thread? 

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Database-route-shutdown-tp5787725p5787860.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Blueprint and property placeholder

2016-09-21 Thread dpravin
Hello All,

We have some common properties, not integration/bundle specific. Can
multiple routes/bundles refer to these property files from blueprint using
cm:property-placeholder?

I also found out that if you have set update-strategy="reload" the bundle
get restarted irrespective of the property being used by the bundle. Is this
the default behavior? Is there anything that can help avoid reload/restart
of bundle if the property is not used?

Thanks,
Pravin 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Blueprint-and-property-placeholder-tp5787763.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel MQTT Connection Pooling

2016-09-21 Thread Joe San
Camel Users,

Is there a comparable pooled connection implementation for the MQTT
component in Camel? For the ActiveMQ / JMS, there is a
*PoolingConnectionFactory* that I could use. Is there something for the
MQTT component? Looking at the configuration parameters, I suspect it is
not:

http://camel.apache.org/mqtt.html

Any suggestions?

Thanks and Regards,
Joe


Re: rabbitmq component headers

2016-09-21 Thread Ismail Emre Kartoglu
Sorry, I’ve switched to using the camel & rabbitmq-component version 2.17.3 
(latest in maven central repo), and my initial issue does not exist with this 
version. 

Now I have a slightly different question:

from("rabbitmq://localhost/A?username=guest=guest=B=1=false")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
System.out.println("X: " + 
exchange.getIn().getBody(String.class));
exchange.getOut().setBody("Test X");
exchange.getOut().getHeaders().put(“key”, “val"); **
}
})
.to("rabbitmq://localhost/C?username=guest=guest=D=1=false");



If you comment out the line with **, the message does not get sent to exchange 
C, as specified in the “to” endpoint, because:

1) in-message headers contain the exchange name and routing key of the consumer.
2) out-message headers copy the in-headers if no out-message header is set.
3) RabbitMQProducer.java (2.17.3), line 246 and 248 set the exchange name and 
routing key from the header, and ignore the producer URI configuration.


I think the documentation suggests that this is the expected behaviour. But it 
would be more intuitive to set the exchange name and the routing key from the 
producer uri, rather than setting it from the in-message headers (which are not 
visible in code) and ignoring the producer configuration.

Kind regards
Ismail


> On 21 Sep 2016, at 05:26, Ismail Emre Kartoglu  
> wrote:
> 
> Thanks Willem.
> 
> The documentation says the URI should look like:
> 
> rabbitmq://hostname[:port]/exchangeName?[options]
> 
> So I do have the exchange name in the URI in my example.
> 
> See http://camel.apache.org/rabbitmq.html 
> 
> 
> Sent from phone
> 
> 
> On 21 Sep 2016 1:49 a.m., "Willem Jiang"  > wrote:
> You should add the exchangeName parameter to the rabbitmq uri if you don’t 
> want to specify the message header there.
> 
> --
> Willem Jiang
> 
> 
> Blog: http://willemjiang.blogspot.com  
> (English)
> http://jnn.iteye.com  (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
> 
> 
> 
> On September 21, 2016 at 5:14:54 AM, Emre Kartoglu Ismail 
> (ismailemrekarto...@gmail.com ) wrote:
> > Hello Camel users,
> >
> > I have a question regarding the camel-rabbitmq component. The following
> > code sends the message “test” to exchange “A” with routing key “B” every
> > 5 seconds:
> >
> >
> > from("timer:test?period=5000").process(new Processor() {
> > @Override
> > public void process(Exchange exchange) throws Exception {
> > exchange.getOut().setBody("test", String.class);
> > exchange.getOut().getHeaders().put("rabbitmq.EXCHANGE_NAME", "A”); **
> > exchange.getOut().getHeaders().put("rabbitmq.ROUTING_KEY", "B”); **
> > }
> > })
> > .to("rabbitmq://localhost/A?username=guest=guest=B=1=false");
> >
> >
> >
> > However when I comment out the lines with **, the message does not get
> > sent. Is this an expected behaviour? I found this stack overflow post,
> > essentially discussing the same issue:
> > http://stackoverflow.com/questions/22449086/apache-camel-rabbitmq-endpoint-not-creating
> >  
> > 
> > .
> >
> > There is a paragraph at http://camel.apache.org/rabbitmq.html 
> >  that says
> >
> > "Headers are set by the consumer once the message is received. The
> > producer will also set the headers for downstream processors once the
> > exchange has taken place. Any headers set prior to production that the
> > producer sets will be overridden.”
> >
> > The last sentence seems to suggest that the behaviour I described here
> > is expected. My question then is would it not make more sense if we did
> > not have to specifically set the headers in the out message?
> >
> >
> > Kind regards,
> > Ismail
> >
> 



Re: cxf-core 3.1.7 Validation issue with camel

2016-09-21 Thread sari.reach
Hi,

Please find the entire camel-config.xml. 
Schema information is inside the resource folder(in classpath). For this
scenario, request validation is working fine and only response validation is
creating an issue



http://www.springframework.org/schema/beans;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xmlns:camel="http://camel.apache.org/schema/spring;
xmlns:cxf="http://camel.apache.org/schema/cxf;
xsi:schemaLocation="http://www.springframework.org/schema/beans 
   
http://www.springframework.org/schema/beans/spring-beans.xsd
   
http://camel.apache.org/schema/spring 
  
http://camel.apache.org/schema/spring/camel-spring.xsd
   http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd;>


http://camel.apache.org/schema/spring;>












--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787798.html
Sent from the Camel - Users mailing list archive at Nabble.com.