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
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
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
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.
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
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.
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
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
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
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-
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
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
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
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
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.
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
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
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.
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
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.
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,
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 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
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() ?
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
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
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
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
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.
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
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
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",
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("
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"))
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
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
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
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
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
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.
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.
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
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
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:
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")
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
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
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())
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
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
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
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:
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
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
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
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.
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
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
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
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;
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
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
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 {
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
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
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
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
67 matches
Mail list logo