AggregationStrategy

2015-04-09 Thread Frankiboy
Here is an example of some off my route: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching().onException(Exception.class).handled(true) .setHeader(HubConstants.DURATION.getValue(), constant("Hub received request")) .multicast().to("direct:channel1", "dir

Log request / reponse in my camel.

2015-03-12 Thread Frankiboy
I have a way to log the request and response, from my camel.xml file. But i want to do this from my routing, then i can do it only when im running in info mode. How to do this the best way ? Frank -- View this message in context: http://camel.465427.n5.nabble.com/Log-request-reponse-in-my-ca

LoggingOutInterceptor only info mode, the smartest way ?

2015-03-11 Thread Frankiboy
I have a camel.xml where i log the request - response, i using cxf. Works fine :-) But what is the smartes way, if i only want to show when im in info mode. Can i handle this in my camel.xml, how to do this smartest ? in my programs im using org.apache.commons.logging. I have a log4j.proper

Re: How to setHeader reponse code ?

2015-03-09 Thread Frankiboy
Thanks -- View this message in context: http://camel.465427.n5.nabble.com/How-to-setHeader-reponse-code-tp5763820p5763867.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to setHeader reponse code ?

2015-03-09 Thread Frankiboy
When my endpoint is down, i want to create a soap fault, and set the reponse code to 504. What you cant see, is that on the endpoint have a: "?throwExceptionOnFailure=false" My Route: from("direct:channel2").onException(Exception.class).handled(true). process(new LogError

Re: Can i get the Operation name from camel.

2015-03-03 Thread Frankiboy
Thanks all for a fast reply Frank -- View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459p5763482.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can i get the Operation name from camel.

2015-03-03 Thread Frankiboy
Nt route starts like this: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching This give me null in the operation name... Message in = exchange.getIn(); String operation = (String)in.getHeader(CxfConstants.OPERATION_NAME); Maybe becouse the dataFomat is MES

Can i get the Operation name from camel.

2015-03-03 Thread Frankiboy
Im using CXF, im would like to log the operation name. Is there a easy way to get the operation name, from the exchange or ? Frank -- View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html Sent from the Camel - Users mailing l

How to set throwExceptionOnFailure correct on my recipientList()

2015-02-24 Thread Frankiboy
I have this route, and i want the correct soap fault back to the client, i have found out that i have to set "throwExceptionOnFailure=false". How do i do this on the reciepientList ? I Tried to set it as a header option, but this dosent work. from("direct:channel2").onException(Exceptio

Re: How to set throwExceptionOnFailure correct on my recipientList()

2015-02-24 Thread Frankiboy
I found a solution :-) The methoed that returns the endpoint i just added this :-) endPoint = endPoint + "?throwExceptionOnFailure=false"; I love camel ... -- View this message in context: http://camel.465427.n5.nabble.com/How-to-set-throwExceptionOnFailure-correct-on-my-recipientList-

Get soapfault fra endpoint back to the client.

2015-02-23 Thread Frankiboy
If have this routing. from("direct:channel2").onException(Exception.class).handled(true).process(new LogError(HubConstants.CHANNEL2.getValue())).end().recipientList() .method(Util.class, "getEndpoint"); I want to throw the endpoints soapfault: private void setChannel2ConnectExc

Re: How to remove camel framework text in my soap fault ?

2014-11-17 Thread Frankiboy
Thanks a lot the handled(true) , and don´t throw my own soapfault, makes it ... exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500); exchange.getOut().setFault(true); SoapFault sf = new SoapFault(message + " Unique log number: " + errorUuid, SoapFault.FAULT_COD

How to remove camel framework text in my soap fault ?

2014-11-17 Thread Frankiboy
I want to give this back in my soap fault: Endpoint don't exist in property files Unique log number: 1c291263-a2a1-4505-bcc3-efbc260b29a5 I get this: Sequential processing failed for number 1. Exchange[Message: [Body is null]]. Caused by: [org.apache.cxf.bindi

How to remove Sequential processing failed for number ... from soap fault.

2014-11-14 Thread Frankiboy
I want to give this back in my soap fault: Endpoint don't exist in property files Unique log number: 1c291263-a2a1-4505-bcc3-efbc260b29a5 I get this: Sequential processing failed for number 1. Exchange[Message: [Body is null]]. Caused by: [org.apache.cxf.b

Re: I cant throw the correct HTTP status codes from camel.

2014-10-30 Thread Frankiboy
Yes i tried , but i fiend out a solution This dosen´t work: exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 522); exchange.getOut().setFault(true); Becouse there is already a exception on the exchange. But here is the trick, remove the exception that already is on t

I cant throw the correct HTTP status codes from camel.

2014-10-29 Thread Frankiboy
I cant throw the correct HTTP status codes from camel. I have a route like this: from("direct:channel2").onException(Exception.class).process(new LogError(HubConstants.CHANNEL2.getValue())).end().recipientList() .method(Util.class, "getEndpoint"); The endpoint is down, and i

The doc isent namespaceAware, how to set this up ?

2014-09-18 Thread Frankiboy
I need to get the target namespace "targetNamespace="http://schemas.bankconnect.dk/2014""; of incomming soap message: http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://schemas.bankconnect.dk/2014"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap

Re: I want to save the whole reply on disk an read the reply later ?

2014-09-09 Thread Frankiboy
Thanks a lot ;-) What im looking fore Frank -- View this message in context: http://camel.465427.n5.nabble.com/I-want-to-save-the-whole-reply-on-disk-an-read-the-reply-later-tp5756223p5756230.html Sent from the Camel - Users mailing list archive at Nabble.com.

I want to save the whole reply on disk an read the reply later ?

2014-09-08 Thread Frankiboy
Can someone give me a hint, where and what i schould look for solving this problem. I want to save the reply, and if the same request comes again, "can see it in header information", give the reply back i have saved on disk. Frank -- View this message in context: http://camel.465427.n5.nab

Re: Fastet way to check the size of a soap request ?

2014-09-05 Thread Frankiboy
Thanks a lot -- View this message in context: http://camel.465427.n5.nabble.com/Fastet-way-to-check-the-size-of-a-soap-request-tp5756054p5756088.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Fastet way to check the size of a soap request ?

2014-09-05 Thread Frankiboy
Thanks i can se that i can to something like this: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching().getStreamCache().length(); I want this value in my bean, soo i can log something, when the size is bigger then 20mb. But how do i get this length down in my bean, via my DSL syntax,

Fastet way to check the size of a soap request ?

2014-09-04 Thread Frankiboy
I have to stop the camel route if the request ist bigger then 20 MB. Normal i will think i have to intercept the incoming request stream and buffer it all in to see the total size, then generate a new stream and hand it to the SOAP service if desired. Sounds like a job for a filter to me. But

When to use Proxy ?

2014-09-02 Thread Frankiboy
When to use Proxy in Camel ? I have to create a sort og "HUB" , the "HUB´s" function is to get a webservice request , and from the header information, route the request to one of 3 difrent endpoints. The Hub logs the header in MQ. The Hub change some of the header information. The Hub is runnin

How do i control my soap foult back to the client ?

2014-08-12 Thread Frankiboy
here is some of my route: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError("")).end() .bean(AddIpBean.class) .bean(SetRoutingKey.class) .bean(Util.class, "setMiljo") .multicast() .to("direc

DSL how to set aggregationStrategy on a choise() when() ?

2014-08-08 Thread Frankiboy
DSL how to set aggregationStrategy on a choise() when() ? I have looked at littel on this problem, but cant figure out how to do it... This dosent work, but how ? this fails with syntax error: The method aggregationStrategy(HubAggregationStrategy) is undefined for the type Cho

Re: 3 Routes how to get the second routes reply back to the client ?

2014-08-08 Thread Frankiboy
Thanks for the hint Solved this way from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .bean(AddIpBean.class) .bean(SetRoutingKey.class) .bean(Util.class, "setMiljo") .multicast() .to("direct:channel1", "direct:channel2","direct:channel3") .aggregatio

3 Routes how to get the second routes reply back to the client ?

2014-08-07 Thread Frankiboy
I have this 3 routes, now the input from channel3 gets back to the client i want the channel2 reply back to the client, any ideas out there ? from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .bean(AddIpBean.class) .bean(SetRoutingKey.class) .bean(Util.class, "setMi

Reply from camel Route inOnly ?

2014-08-07 Thread Frankiboy
I would like to have the reply from direct:channel2 back to the client. And thought that inOnly means only request not reply. But when a client calls this route, the reply is the String i generate in .bean(Mq.class, "logStart") in my channel3 What to do ? I have this camel route: from("cxf

Re: How to stop routing with onException ?

2014-08-04 Thread Frankiboy
Thanks that explains a lot -- View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-routing-with-onException-tp5754736p5754765.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to stop routing with onException ?

2014-08-04 Thread Frankiboy
My routing is this way, and my endpoint in channel2 is down... But still my channel3 is executed. I have tried: onException(Exception.class).process(new LogError()).stop(); onException(Exception.class).process(new LogError()).end(); onException(Exception.class).process(new LogEr

Re: how to get .Choice().When to continue ?

2014-07-31 Thread Frankiboy
Not nice, than i have to copy the same 3 lines 3 times in my code Is there not a better solution to this... from("direct:channel1") .bean(SetRoutingKey.class) .choice() .when(header(ROUTING_KEY).contains(ROUTING_HREG_BD)).setHeader("BD", constant("YES")) .set

how to get .Choice().When to continue ?

2014-07-30 Thread Frankiboy
The 3 lines in Bold newer get Executed, how to get .Choice().When to continue ? Route: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .multicast() .bean(AddIpBean.class) .to("direct:channel1",

Re: Same messages to 2 endpoints ?

2014-07-30 Thread Frankiboy
Thanks , that was the way to do it from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .multicast() .to("direct:channel1", "direct:channel2"); from("direct:channel1") .setHeader("BD", constant("

Same messages to 2 endpoints ?

2014-07-30 Thread Frankiboy
This is my routes: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .to("direct:channel1", "direct:channel2"); from("direct:channel1") .setHeader("BD", constant("YES"))

Re: Why this route times out ?

2014-07-30 Thread Frankiboy
Works i get my String messages to MQ, with inOnly, but throwing an exception before starting my last route "direct:channel2" .. Caused by: org.apache.cxf.binding.soap.SoapFault: Exception occurred during execution on the exchange: Exchange[Message: Frank was here from LogMq] from("cxf:b

Why this route times out ?

2014-07-30 Thread Frankiboy
This line returns a String . .bean(LogMq.class, "logStart") I want to create a String that goes in the MQ, i want to do that in a bean, the string is create from headers an other information. Can anyone give me a Hint, what way i schould go from("cxf:bean:hubws?dataFormat=MESSAGE").s

Re: Is there parameters missing when using topic/ selector ?

2014-07-29 Thread Frankiboy
Thanks i will try something like this tomorrow on the job. from("file:c:/camel-input/?delete=true") .setHeader("BD", "YES") to("activemq:queue:BCA_TEST"); -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-parameters-missing-when-using-topic-selector-tp5754574p575460

Re: Is there parameters missing when using topic/ selector ?

2014-07-29 Thread Frankiboy
Okay let me know if i undertand this correct i new to MQ ? I have a topic named: "HUB_TOP01" There is three selectors: selector=BD= 'YES selector=BEC = 'YES selector=SDC = 'YES The selector is only for the subscriber and not the publischer. So away with the selctor, but what is correct

Is there parameters missing when using topic/ selector ?

2014-07-29 Thread Frankiboy
I got this route from("file:c:/camel-input/?delete=true").to("activemq:topic:HUB_TOP01?selector=BD='YES'"); When i put a file into the camel-input directory, the file is deleted, but nothing in the MQ. Should i use clientID or other options ? I have tryed this out: from("file:c:/came

Re: IBM MQ The data received from host is not valid ?

2014-07-29 Thread Frankiboy
I find the problem, i missed one jar file com.mq.mq.jms.jar so this problem is solved -- View this message in context: http://camel.465427.n5.nabble.com/IBM-MQ-The-data-received-from-host-is-not-valid-tp5754448p5754573.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

2014-07-29 Thread Frankiboy
Ahhh thats the way to do it , Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Failed-to-start-route-route2-because-of-Multiple-consumers-for-the-same-endpoint-is-not-allowed-tp5754511p5754558.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Rép. : Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

2014-07-28 Thread Frankiboy
My first endpoint is the recipientList, then i want to call LogMq.class , and send a string back and go to my second endpoint activemq.. What is wrong here: I tryed this, but get exception: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .multicast() .onException(Excep

Re: Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

2014-07-28 Thread Frankiboy
I dont quite understand this my endpoint is the but how to define this, in camel.xml Frank -- View this message in context: http://camel.465427.n5.nabble.com/Failed-to-start-route-route2-because-of-Multiple-consumers-for-the-same-endpoint-is-not-allowed-tp5754511p5754517.html Sent from the C

Re: Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

2014-07-28 Thread Frankiboy
But how to define that i camel.xml. http://service.bankconnect.dk"; wsdlURL="WEB-INF/bankconnect.wsdl" /> http://service.bankconnect.dk"; wsdlURL="WEB-INF/bankconnect.wsdl" /> This is not correct, i just the cfxEndpoint with 2 difrent ids ? Frank -- View this message in context:

Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

2014-07-28 Thread Frankiboy
I want to have the same message into two routes, but when i add number 2 i get a error. How to ? My route: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .filter().method(LogMq.class, "logStart")

IBM MQ The data received from host is not valid ?

2014-07-25 Thread Frankiboy
I reading from a file , with the only text "Frank was here" from a file named test.txt Schold i format my data in some way or ? But on the remote MQ mashine a "AIX" there is this error in MQ log: AMQ9207: The data received from host 'BDD03240 (10.10.173.88)' is not valid. When i look this up

Re: Only one, but difrent endpoints in same route, is this the way ?

2014-07-25 Thread Frankiboy
Thanks , just wat im looking fore, it works "); from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .bean(LogMq.class, "logStart") .bean(AddIpBean.class) .recipientList().method(Util.class, "getEndpo

Only one, but difrent endpoints in same route, is this the way ?

2014-07-24 Thread Frankiboy
I have information in my header, where i look in a property fil, to get the correct url. So in my SetRoutingKey.class i have this line where i put the correct endpoint requestHeaders.put(CentralRouter.ENDPOINT, Util.getEndpoint()); but my .to(header(ENDPOINT).convertToString().toString())

Re: Anyone seen this problem: Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195

2014-07-23 Thread Frankiboy
Solved name="transportType" value="1" , must be 2 then its TCP/IP and this is nessesary when im a client that connect to a remote mashine But new problem, this i will put i a new thread :-) Frank -- View this message in context: http://camel.465427.n5.nabble.com/Anyone-seen-this-problem

An exception occurred while creating the TopicConnection.

2014-07-23 Thread Frankiboy
I try to build up a simpe connection to a MQ and put something in it. camel.xml: Route: from("file:c:/camel-input/?delete=true").to("activemq:topic:H

Re: Anyone seen this problem: Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195

2014-07-22 Thread Frankiboy
Thanks I use this jar files: com.ibm.mq.commonservice.jar com.ibm.mq.headers.jar com.ibm.mq.mq.jar com.ibm.mq.jmqi.jar com.ibm.mq.pcf.jar All version 7.0.1.1 I looked at the RC2195, and that tells my that i have to contact the system programmer, but but, he is on holliday to monday... So mayb

Re: Anyone seen this problem: Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195

2014-07-21 Thread Frankiboy
Thanks for the reply. All the examples i have looked at is this the way to do it, yes its possible to use sjms, this is new, and there stille some problems using it. I have struggelt with this problem for 2 days now, i dont know what my problem is here Frank -- View this message in context:

Anyone seen this problem: Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195

2014-07-21 Thread Frankiboy
When i try to call MQ from appache camel, i get this error: aused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodException[com.ibm.mq.jmqi.remote.internal.RemoteFAP.(com.ibm.mq.jmqi.JmqiEnvironment, int)],3=Class.throwNoSuchMethodExcep

Re: Classpath problem, any good ideas ?

2014-07-21 Thread Frankiboy
My camel.xml http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:cxf="http://camel.apache.org/schema/cxf"; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spr

Classpath problem, any good ideas ?

2014-07-04 Thread Frankiboy
Cannot convert value of type [com.ibm.mq.jms.MQConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst

How to print alle the header information to MQ in the Route, get Exception

2014-07-02 Thread Frankiboy
I want to write the header information to MQ. LogMq class returns a string "Hello world" My route looks like this: from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() .onException(Exception.class).process(new LogError()).end() .bean(LogMq.class, "logStart").to("activem

Im trying to write "Frank was here" into my websphere MQ from camel with Topic and Subscribtions.

2014-07-01 Thread Frankiboy
Im trying to write "Frank was here" into my websphere MQ from camel with Topic and Subscribtions. The MQ is defined as Topic: HUB_TOP01 With 3 subscribtions "HUB_SUB01" and "HUB_SUB01" and "HUB_SUB03" here im trying to write to HUB_SUB01 This bean fails with a exception bean(LogMq.class, "logSta

Examples HowTo write from local WebSphere to remote MQ

2014-06-26 Thread Frankiboy
I have just installed difrent com.ibm.mq client jars on my local mashine, is there a site where i can get some examples HOWTO write som messages to a MQ from my local camel project, to my MQ on a remote AIX mashine. I new to MQ... I haved googled a littel, but i dident find anything. Is there an

Re: Green test, but my RouteBuilder dosent run...

2014-06-20 Thread Frankiboy
This works :-) Im actuel come into my bean package dk.bankconnect.hub.unittest; import java.util.List; import org.apache.camel.Exchange; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apach

Green test, but my RouteBuilder dosent run...

2014-06-20 Thread Frankiboy
I tried this and debug thrue the entiere test and get green ligth, but i newer go into AddIpBean, what to do, to start the route. public class FilterTest extends CamelTestSupport { String header = "abc20"; protected MockEndpoint resultEndpoint; protected ProducerTemplate template;

Re: Green test, but my RouteBuilder dosent run...

2014-06-19 Thread Frankiboy
I have allerady tried this, i got green ligth but newer go into my AddIpBean. Its like the Route newer startsup , thats why i tried. context.addRoutes(createRouteBuilder()); context.start(); -- View this message in context: http://camel.465427.n5.nabble.com/Green-test-but-my-RouteBuilder-do

Green test, but my RouteBuilder dosent run...

2014-06-19 Thread Frankiboy
What is wrong here Green test, but notning happens i dont get into my AddIpBean with this signature. package dk.bankconnect.hub.unittest; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.ap

Re: Test a single Bean with CamelTestSupport ?

2014-06-19 Thread Frankiboy
Green light but i dosent work ? I Want to go thrue my bean AddIpBean, and give som input and get some output. Its not running in a server, i want to test this offline, is this possible ? I dont go thrue my AddIpBean, what is wrong here ? public class FilterTest extends CamelTestSupport {

Re: Test a single Bean with CamelTestSupport ?

2014-06-19 Thread Frankiboy
Now i tried this way public class FilterTest extends CamelTestSupport { // @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; // @Produce(uri = "direct:start") protected ProducerTemplate template; @Testpublic void testSe

Re: Test a single Bean with CamelTestSupport ?

2014-06-19 Thread Frankiboy
I tryed it this way, to mock my endpoint, but get a nullpointer exception. Do i have to set up something somewhere else or ? public class FilterTest extends CamelTestSupport { String header = "abc20"; @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndp

Test a single Bean with CamelTestSupport ?

2014-06-19 Thread Frankiboy
All i want is to call a Bean class, with a header and body , and check the body if its correct when it returns. Her is the bean i try to call: public Document enrich(@Headers Map requestHeaders, Document doc) throws TransformerException { // There is some more code here... } This is my t

Only want to print 10 lines stacktrace...

2014-06-13 Thread Frankiboy
In my route i have this: .onException(Exception.class).process(new Log()).end() That calls this bean: public class Log extends Exception implements Processor { public static final String ROUTING_KEY = "datacentral"; @Override public void process(Exchange exchange) throws Exc