Camel REST DSL - using provided SSL port in karaf

2017-03-16 Thread ychawla
Hello All, In my karaf instances, I have many bundles deployed and I use pax-jetty to provide SSL using this configuration in etc/org.ops4j.pax.web.cfg: org.osgi.service.http.enabled=false org.osgi.service.http.secure.enabled=true org.ops4j.pax.web.ssl.keystore=mykeystore.jks org.ops4j.pax.web.ssl

RE: Camel Log - Karaf

2016-10-20 Thread ychawla
Hi Shuston, I can do log:set DEBUG but then I log everything. I have a file endpoint that I poll from and that generates too much logging for it to be useful. Is there a way to isolate it to the route or context level? Thanks, Yogesh -- View this message in context: http://camel.465427.n5.na

Camel Log - Karaf

2016-10-20 Thread ychawla
Hello All, I have a log statement in a camel route that is at the DEBUG loggingLevel: >From the karaf console, how can I set the logging level for the camel context? I know that I can run a karaf command like this to set the logging level for a java package: log:set DEBUG org.packagename.here

Re: Camel 2.14.4 and CXF 3.0.6

2015-12-18 Thread ychawla
Thanks Claus, I ran these commands: feature:repo-add cxf 3.0.6 feature:install cxf feature:repo-add camel 2.14.4 feature:install camel It looks like CXF 3.0.6 is active although cxf 3.0.5 features are present when I run feature:list | grep cxf in karaf 3.0.5. I will do some further testing

Camel 2.14.4 and CXF 3.0.6

2015-12-18 Thread ychawla
Hello All, I am currently using Camel 2.14.4 for all of our deployments. It uses CXF version 3.0.5. CXF 3.0.6 has a very nice feature in it which allows support for legacy SSL connections: https://issues.apache.org/jira/browse/CXF-6414 With this feature, you can upgrade one server at a time fro

Re: Soap Body is Empty or Partial XML

2015-12-08 Thread ychawla
Thanks Aki, My first step in the Camel Route is to convert the body to a string. I was able to work around it by turning off streaming and since I need to modify the payload, I don't need streaming in this use case. Is it possible that the default for Streaming in older versions of Camel like 2.1

Re: Soap Body is Empty or Partial XML

2015-12-02 Thread ychawla
Hello All, I added the parameter: allowStreaming=false to the CXF endpoints that were causing an issue and then they started to work normally. It definitely seems like a bug because I would send consecutive schema valid messages and one would fail with the WoodStox exception and the other would no

Re: Am I using headers right?

2015-11-24 Thread ychawla
That sounds sensible to me. The headers are for message and exchange metadata. Just be careful to not send them over the wire when you call an external component. -- View this message in context: http://camel.465427.n5.nabble.com/Am-I-using-headers-right-tp5774363p5774365.html Sent from the C

Soap Body is Empty or Partial XML

2015-11-24 Thread ychawla
Hello All, I am using Camel 2.14.4 and deploy to Apache Karaf 3.0.5 with Java 8. I have a web service that I am exposing over HTTP and it worked fine in Camel 2.10.7. When I hit the service now, it returns a WoodStox error when trying to convertBodyTo a String or Document: Caused by: com.ctc.wst

Re: Camel route - autostartup - no endpoint found

2015-03-16 Thread ychawla
I tried injecting a Camel Context into the Route Policy, but it looks like the route isn't yet created so it can't be deleted: @Override protected void doStart() throws Exception { LOG.info("In custom do start"); boolean removed = camelContext.removeRoute("myServic

Camel route - autostartup - no endpoint found

2015-03-16 Thread ychawla
Hello All, I have a route with autoStartup set to 'false'. However, Camel will still try to resolve the endpoint in the 'from' URI on the route. For example: However, I don't have 'myCXFServiceEndpoint' defined because the Spring profile that I am using does not defin

Re: Camel Route autostartup with Spring Profiles

2015-03-12 Thread ychawla
Hello All, I decided to set all routes autostart to false and then implement an ApplicationListener: @Component public class MyListener implements ApplicationListener { @Autowired(required=false) private CamelContext camelContext; @Override public voi

Camel Route autostartup with Spring Profiles

2015-03-12 Thread ychawla
Hello All, I am looking to dynamically start up routes based on Spring profiles properties. I am aware that you can control this via a boolean on the route and you can define a property to make it dynamic. I have a scenario where I would like to allow the implementer to choose which beans to dy

Re: Multicast Position and Exchange Properties

2015-03-12 Thread ychawla
Thanks Claus, This is exactly what I am looking for. I will try to update the Multicast WIKI so it shows these Exchange properties like it does on the Splitter WIKI page. -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-Position-and-Exchange-Properties-tp57

Multicast Position and Exchange Properties

2015-03-06 Thread ychawla
Hello All, I am multicasting and need to alter the document before I send it to different endpoints. To do this, I use onPrepareRef="myProcessor". The issue that I am running into is that the copy of the Exchange that I get does not have much info other than a copy of the exchange. It would be h

Re: Exposing request/response Web Service that would interact with legacy system

2015-02-04 Thread ychawla
Have you look into the Camel Aggregator pattern? http://camel.apache.org/aggregator.html If you have any mechanism in the request/response message to correlate a request to a response, you can set up the aggregator to collect your response from a separate route and match the request/response usin

Re: CamelDestinationOverrideUrl documentation

2015-02-03 Thread ychawla
Hi Willem, Sorry to revive this old thread but it looks like this is supported in Camel CXF in addition to camel-cxfrs component. Would it be worthwhile to update the Camel CXF wiki page with this info? Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/CamelDes

Re: Problem with multiple CXF services using the same https port

2015-01-30 Thread ychawla
Hi Christian, Can you provide an example of how to set this up? The situation I have is this, which I think is the exact same as you describe. I have a central broker server on it with many different bundles: bundle A bundle B bundle C Each bundle hosts a web service with a distinct WSDL and sc

Re: Problem with multiple CXF services using the same https port

2015-01-30 Thread ychawla
Hello all, I got a little further with my configuration and think I got it working. I looked at the camel-example-cxf-osgi and it looks like all you really have to do is remove the standalone jetty HTTP(s) listener and then provide your address as a relative path in your Camel CXF bean. Just remo

Re: Change property in unit test

2014-10-28 Thread ychawla
t;greeting", "Bye"); > return extra; > } > > Regards, > > On Mon, Oct 27, 2014 at 3:40 PM, ychawla <[hidden email] > <http://user/SendEmail.jtp?type=node&node=5758199&i=0>> > wrote: > > > Hi Claus, > > I am using plain

Re: Change property in unit test

2014-10-27 Thread ychawla
Hi Claus, I am using plain spring testing and annotating my custom class like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class MyCamelTest { I don't think I am able to use useOverridePropertiesWithPropertiesComponent in this scenario. Is there a similar technique I

Re: Camel Mail CC and BCC headers

2014-10-27 Thread ychawla
Thanks Willem, Looks great. -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Mail-CC-and-BCC-headers-tp5757943p5758097.html Sent from the Camel - Users mailing list archive at Nabble.com.

Change property in unit test

2014-10-24 Thread ychawla
Hello All, I have a unit test and I want to change a camel property. I am only a single version of the configuration file to test against so I would like to change the property in code. For example, I thought I could do something like this: context.getProperties().put("myProperty", "false"); Ho

Re: Camel Mail CC and BCC headers

2014-10-23 Thread ychawla
Hello All, The MailBinding class contains this method setRecipientFromEndpointConfiguration. Perhaps it is just as easy as checking the recipients map to see if the CC or BCC are blank or empty string prior to setting them in the method. If so, I wouldn't mind submitting a patch for this. Thanks

Camel Mail CC and BCC headers

2014-10-23 Thread ychawla
Hello All, I recently had a production issue where there was an exception thrown when the CC or the BCC headers were set to "": com.sun.mail.smtp.SMTPAddressFailedException: 554 5.1.1 Invalid recipient address Is this the expected behavior in Camel or would it be possible for camel to check for a

Re: Getting entire Soap Message with header and body in Payload mode

2014-07-11 Thread ychawla
Hi Guys, Thanks for the help. I found a CXF interceptor online based off of the logging interceptor that gets the message: public SoapMessageInterceptor () { super(Phase.RECEIVE); } @Override public void handleMessage ( SoapMessage message ) throws Fault {

Re: ws-security

2014-07-10 Thread ychawla
Can you try to create a new exchange or use the out exchange when calling the proxied service? In my code, I have a special processor which copies a few headers to the out exchange and then calls it. This will remove all the exchange headers from the original exchange and remove a lot of the Came

Re: Concurrent problem with message Body using WireTap

2014-07-10 Thread ychawla
Thanks Guys, The detailed solution that Stanislaw outlined worked perfectly. In ServiceMix, you will need to install the following libraries: install -s mvn:uk.com.robust-it/cloning install -s mvn:org.objenesis/objenesis/1.4 Thanks for the assistance! -- View this message in context: http:/

Re: Concurrent problem with message Body using WireTap

2014-07-07 Thread ychawla
Hi Guys, Any hints on writing a processor that will do a deep clone? I am running into the same issue. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-problem-with-message-Body-using-WireTap-tp5502505p5753470.html Sent from the Camel - Users mailin

Re: Concurrent problem with message Body using WireTap

2014-07-07 Thread ychawla
Hi Guys, Any hints on writing a processor that will do a deep clone? I am running into the same issue. I have a CXF Payload on my Exchange. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-problem-with-message-Body-using-WireTap-tp5502505p5753471.

Getting entire Soap Message with header and body in Payload mode

2014-07-01 Thread ychawla
Hello All, We use payload mode to process our CXF messages. It is very convenient and will properly process the Soap Headers, SAML assertions, WS-Security headers etc. I have a requirements to get the entire raw Soap message in my camel route and call a processor with it. There are other ways to

Intercept - Log Message EIP for testing

2014-06-18 Thread ychawla
Hello All, I am writing a Camel Context test and I want to intercept a logging endpoint to verify that a message is being logged. Here is a snippet from my route:

Re: Camel Filter Bean when return value is false

2014-06-17 Thread ychawla
I can do this:

Camel Filter Bean when return value is false

2014-06-17 Thread ychawla
Hello All, I have a bean that will return a boolean of true or false. When the value is false, I want to go in a camel filter. Filter looks for 'true', like below: However, when t

Camel Validation Relative Paths

2014-03-07 Thread ychawla
Hello All, I see that an issue was reported validating XML documents with relative paths: https://issues.apache.org/jira/browse/CAMEL-6572 Judging by the schema that was attempting to be imported, it looks like a NIEM document. I am seeing the same issue using SMX 4.5.2 / Camel 2.10.6. I was wo

Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException

2013-11-12 Thread ychawla
Hi, You can also try to convert your body to a string prior to calling your XSLT. This worked for me when I had this issue: Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/CXF-consumer-endpoint-XSLT-Tracer-EmptyStackException-tp5741942p5743127.html Sent fro

Re: Xpath parameter binding NodeList vs. Node

2013-08-27 Thread ychawla
Hi Raul, Thanks for you reply. The query returns exactly one node. To retrieve the node, I do something like this: Node containerNode = containerNodeList.item(0); The OJBCamelXpath annotation is a class like this: @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHO

Xpath parameter binding NodeList vs. Node

2013-08-27 Thread ychawla
Hello All, I am using Camel Xpath parameter binding. I have a method that has an expression like this for example: public void process(Exchange exchange, @OJBCamelXPath("/foo:Container") NodeList containerNodeList) throws Exception I know that the Xpath will only

Re: Inject camel resources into Spring bean

2012-12-23 Thread ychawla
Hello, To solve this issue, you can access the CXF message like this: Message message = PhaseInterceptorChain.getCurrentMessage(); Camel will copy Camel headers to CXF headers. You can set your 'key' to your map as a Camel Header and then grab it off the CXF message. Thanks, Yogesh -- View

Inject camel resources into Spring bean

2012-12-21 Thread ychawla
Hello All, I am working on a WS-Policy implementation that requires a SAML token to be passed in the security header. CXF provides a SAML callback handler to support adding the token. I am using an STS so I call a web service to obtain the token. I obtain the token and set it in a header:

Re: XMLSecurity key recovery fails when keystore and key use different passwords

2012-08-28 Thread ychawla
Hi Dominik, I think this is the default behavior in Java. Whenever I work with keystores, the keystore password must match the key password. This could be due to the KeyManagerFactory implementation: http://docs.oracle.com/javase/6/docs/api/javax/net/ssl/KeyManagerFactory.html#init%28java.secu

RE: Debugging Live Camel Routes

2012-08-28 Thread ychawla
Hi Guys, The ServiceMix wiki also has a page on this. It says basically what Graham said : http://servicemix.apache.org/remote-debugging-servicemix-in-eclipse.html Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Debugging-Live-Camel-Routes-tp5718181p5718216.

Re: JsonEndpoint and Router

2012-08-23 Thread ychawla
Hi Marco, I have had a similar situation. I grab the JSON input, unmarshall to a POJO, inspect the payload for a parameter, and then set a camel header for routing. I have also had cases where I could route directly based of information in the HTTP Headers. Handling this by setting a header ba

Re: problem in aggregation

2012-08-14 Thread ychawla
Hi, Can you add some debug statements to your aggregator: newIn.setBody(oldBody + newBody); For example, what is oldBody and what is newBody? Based on the error you are receiving, you might be concatenating two XML documents like this: This will not create a valid XML document bec

Re: JSON - Jackson return list rather than POJO

2012-08-14 Thread ychawla
A simple workaround for this is a custom bean processor like so: public void processPersonSearchResponseJSON(Exchange exchange) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper();

Re: exposing different operations under same service in camel + cxf routing.

2012-08-14 Thread ychawla
Hi, Have you tried turning on the tracer to see what headers are on your exchange? A simple filter such as this should work: ${in.headers.operationName} == 'SearchRequest' Try looki

Re: Using Simple header notation to define where to send a message

2012-08-14 Thread ychawla
Hello, You can also try using a recipient list and only have a single recipient on it. It can function as a dynamic router when you dynamically set a header. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Using-Simple-header-notation-to-define-where-to-send-

JSON - Jackson return list rather than POJO

2012-08-14 Thread ychawla
Hello All, I am unmarshalling data using Jackson. My dataFormats bean is set up as such: However, my return value isn't a simple POJO, it is a list of POJO's. For example this is a sample stripped down JSON response: [{"last_name":"xxx",,"first_name":"Heather

Re: way to convert multiple csv files to single xml file

2012-08-09 Thread ychawla
Here is an example method to aggregate: @SuppressWarnings("unchecked") public void aggregateGroupMessages(Exchange groupedExchange) { List grouped = groupedExchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class); for (Exchange ex

Re: way to convert multiple csv files to single xml file

2012-08-09 Thread ychawla
Hi Matheen, Can you explain your problem a little more? Are all the files going to be available at the same time? Do you know how many files you need to aggregate? For example, in pseudo code: do all your bindy processing here but send to aggregator rather than 'fi

Re: routing mail with camel on fuse esb

2012-08-03 Thread ychawla
Hi Mathieu, Not sure why you are getting an unknownhostexception. Can you telnet to the URL: telnet smtp.gmail.com 587 Also, I think port 587 on gmail is running on TLS. Maybe you need to use smtps? Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/routing-m

Re: How to invoke CXF webservice from processor bean

2012-07-27 Thread ychawla
I have something like this working in a unit test. Maybe you can try something similar: public static final String CXF_OPERATION_NAME = "operation"; public static final String CXF_OPERATION_NAMESPACE = "http://opNamespace";; @Test @DirtiesContext public void

CamelDestinationOverrideUrl documentation

2012-07-23 Thread ychawla
Hello All, There is a header that can be set called: CamelDestinationOverrideUrl. This is really cool because you can have a single CXF endpoint and set this header to set to different endpoints that implement this interface. For example, you can have 10 endpoints you send to that use the same

Re: How to invoke CXF webservice from processor bean

2012-07-23 Thread ychawla
Hi, I see that you set the operationName but did you set the operationNamespace. For example: senderExchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE, "http://yourOperationNamespace";); Try setting that and see if you get the same results. Thanks, Yogesh -- View this message in con

Re: Parallel processing using apache camel

2012-07-23 Thread ychawla
Hi Nafees, Have you looked into using SEDA component? You can send from your file path to the SEDA component and set up your concurrency there: http://camel.apache.org/seda.html There is another Camel post that discussed how to do this: http://camel.465427.n5.nabble.com/Ability-to-process-multi

Re: Camel & Spring testing framework

2012-07-23 Thread ychawla
Hi Sri, The Camel in Action book has great resources on testing. There is also a good WIKI page for Camel testing: http://camel.apache.org/testing.html Also check on the 'adviceWith' page. It has some great testing strategies: http://camel.apache.org/advicewith.html Thanks, Yogesh -- View t

Camel keeps dropping ActiveMQ connections

2012-07-19 Thread ychawla
Hello All, I have an application running that has frequent lulls in activity. What I find is that the activemq consumers lose their connections. I have a read few posts about this and taken the suggestions to set keepAlive to true and use a connection pool: [1] keep alives http://camel.465427.n5

Re: Dynamic generation of Camel routes

2012-07-18 Thread ychawla
Would a routing slip work for you? You can dynamically configure where your message is going, not necessarily what your input is. However, depending on your requirements, this could suffice: http://camel.apache.org/routing-slip.html -- View this message in context: http://camel.465427.n5.nabbl

Re: Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

2012-07-17 Thread ychawla
Hi Igor, I am not sure what version of Camel and CXF that FUSE version uses. When using the 'synchronous=true' URI option in Camel 2.6.0, I wrote an interceptor to rethrow the exception so it would propogate back to my route. Something simple like: public class CamelExceptionInterceptor extends

Re: camel-cxf and HTTP BASIC authentication

2012-07-17 Thread ychawla
Just re-read your message and you have a ServiceMix requirement so Tomcat and Apache HTTPD wouldn't work. I saw some blog entries that talks about an interceptor based approach that might help: http://chrisdail.com/2008/03/31/apache-cxf-with-http-basic-authentication/ http://chrisdail.com/2008/08

Re: camel-cxf and HTTP BASIC authentication

2012-07-17 Thread ychawla
Hi Christian, What about adding an HTTP Conduit to your CXF bean? http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html Is your requirement for inbound or outbound HTTP basic auth? Depending on your container, you might be able to do this at the Apache HTTPD or Tomcat layer

Re: xslt error with document('')

2012-05-25 Thread ychawla
Hi Marco, Are you using the same XSLT processors in eclipse and in Camel? I like using Saxon and you can customize your XSLT processor like this: Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/xslt-error-with-document-tp5713535p5713572.html Sent from the C

Re: Best Practice for splitting on header?

2012-05-25 Thread ychawla
Hi, Do you need to use a bean/producer template to do this? Some of this might be built right in to the Recipient List EIP. For example, in Spring: endpointsToCall In the above snippet, you set a header with your endpoints, a delimiter of '|' and a strategy to aggregate all your responses

Re: Converting CSV to XML

2012-05-17 Thread ychawla
Hi Christian, You are correct that you can use XSLT on CSV, but he can get the data into this format: Name Age Sex Zip Edward 22 M 33639 .. He can use an XSLT to go from that to this: Edward 22 M 33639 Th

Re: Converting CSV to XML

2012-05-17 Thread ychawla
Hi Amby, What about using a simple XSLT to go from the outputted format to your desired format? It should be a pretty straight forward transformation. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Converting-CSV-to-XML-tp5711086p5711598.html Sent from the Cam

Re: how to specify remote file name when using FTP endpoint

2012-05-09 Thread ychawla
Hi, Did you try setting the camel file name header: someNewFileName.txt Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/how-to-specify-remote-file-name-when-using-FTP-endpoint-tp5697227p5698676.html Sent from the Camel - Users mailing list archive at Nabbl

Re: CXF webservice asyn

2012-05-08 Thread ychawla
Hi Deepthi, Claus has a blog post about concurrency that might point you in the right direction. Do you want a thread pool for your 'from' file endpoint? http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-concurrency-with.html Thanks, Yogesh -- View this message in context: http://camel

Re: dynamically creating directory with current date in yyyyMMdd format

2012-05-08 Thread ychawla
Hi Mahesh, You can try setting your file name with the dynamic format: ${date:now:MMdd}/someFileName.xml This will create a folder with the dynamic date and then put 'someFileName.xml' inside of it. This should work in the Java DSL as well. Thanks, Yogesh -- View this message in conte

Re: Waiting for Routes to Finish

2012-05-08 Thread ychawla
Hi, Camel offers some graceful shutdown functionality out of the box: http://camel.apache.org/graceful-shutdown.html Take a look and see if this fits your needs. Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Waiting-for-Routes-to-Finish-tp5695837p5696383.htm

Re: How to set the CRL path for Camel HTTP component?

2012-05-08 Thread ychawla
Hi Yoleng, I believe Camel uses not-yet-commons SSL under the covers. This page details how to set the CRL checking: http://juliusdavies.ca/commons-ssl/ssl.html It says that by default it will check the CRL: client.setCheckCRL( true ); // default setting is "true" for SSLClient Thanks, Y

Re: Integration Testing Best Practices...

2012-05-07 Thread ychawla
Hi James, I am working through the exact same issue as you are now. One thing that has been really worthwhile to look into is 'adviceWith': http://camel.apache.org/advicewith.html You can weave around particular endpoints and either replace the endpoint or intercept the messages in and out of th

Re: multicast and setting header

2012-05-07 Thread ychawla
Hi Tyler, Are some of the headers in there but not all of them? If you want, you can use an aggregator with the multicast and set a custom aggregation strategy: http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html This way you can

Re: Dynamic source endpoint

2012-05-04 Thread ychawla
Hi, I would look into using a routing slip here as well. Depending on how dynamic your endpoints are you can poll the database using a timer, retrieve your endpoints, havw a bean processor that creates a routing slip header, and then send the exchange to the routing slip. This could work if you k

Re: camel-jaxb namespace prefix

2012-05-04 Thread ychawla
Hi Thomas, You can use JaxB NameSpacePrefixMapper to customize what the namespaces look like. Basically it would take ns2 and set it to something more intuitive of your choosing. See here for details: http://stackoverflow.com/questions/1982977/is-it-possible-to-customize-the-namespace-prefix-tha

Re: If camel-jetty/camel-http can dynamically load keystore/trustsore changes

2012-05-04 Thread ychawla
Hi Leng, The keystore/truststore updates should be infrequent, right? Do you have a production environment with load balancing/failover? If so, you can take one server out of commission and perform maintenance and then update the other server. Otherwise, you probably have to do it in a maintenan

Re: Producer Template to Invoke HTTP Endpoint Request/Reply

2012-05-03 Thread ychawla
Hello All, Sorry for the bother. Please ignore this issue. I was setting the body of my response on my rest service as a buffered reader. This worked fined in the SMX container but was causing an issue in my unit test. I read a string from the buffered reader and set that as my service response

Re: Producer Template to Invoke HTTP Endpoint Request/Reply

2012-05-03 Thread ychawla
So I also tried with an exchange/processor and no luck: Exchange result = template.request("http://localhost:8081/REST";, new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); in.setBody(inputFile);

Producer Template to Invoke HTTP Endpoint Request/Reply

2012-05-03 Thread ychawla
Hello All, I have set up a simple HTTP service using Jetty that acts similar to a REST endpoint and servers up XML responses. The service works just fine and I am trying to add some unit tests to it. I have set up a simple producer template test and tried this: File inputFile = new File("someFil

Re: Problem with Camel,osgi-compendium and mvn camel:run

2012-05-02 Thread ychawla
Hi Dinesh, You will see a similar error if you try to run Camel JUnit tests and are using OSGi for your properties file. To make this slightly less painful, you can put your PropertyPlaceHolder in its own file. For example, this file can be called properties-context.xml http://www.springframewor

Retrieve Endpoint in Recipient List OnPrepareRef

2012-04-18 Thread ychawla
Hello All, Consider a simple recipient list: RecipientListHeader The Recipient List header has the contents: endpoint1, endpoint2 The endpoints are defined as: In my 'prepareMessage' processor, I want to access the endpoint that I am calling. This is becaus

Re: Recipient List Error Handler

2012-03-30 Thread ychawla
Please ignore this question. The error was with the bindingOperationInfo so it was fatal to the point where it wasn't a delivery issue. Once I fixed that, the redelivery policy works fine. Thanks! Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Recipient-List-Error-H

Recipient List Error Handler

2012-03-30 Thread ychawla
Hello All, I have a simple recipient list in Camel 2.8.4: cxf:bean:someEndpoint?dataFormat=PAYLOAD&&synchronous=true routingSlipHeader I have my dead letter error handler set up with a redelivery policy. However, the recipie

Re: Dynamically set WSS4J interceptor properties

2012-03-09 Thread ychawla
Another idea here is to set the scope to 'request' on the WSS4J interceptor and override a method to set the encryption user. Has anyone done that before similar to this: http://forum.springsource.org/showthread.php?81311-Configuring-WSS4J-Encrypt-for-multiple-clients-how Thanks, Yogesh -- View

Dynamically set WSS4J interceptor properties

2012-03-09 Thread ychawla
Hello All, I am using Camel/CXF to implement WS-Security Requirements, specifically in this case Signature Encrypt and Timestamp. I used an example that Camel distributed as a starting point and manually configured the WSS4J interceptors. My issue is that my service will call maybe 10 or 20 ser

Re: SMTP: sending file binary as attachment corrupted

2012-03-07 Thread ychawla
Hello, I remember I had some issues attaching files so I added a processor that read them directly from the file system. For example: public void addEmailAttachment(Exchange ex) { String fileNameWritten = (String)ex.getIn().getHeader("CamelFileNameProduced");

Re: Propogate CXF Exception to Camel

2012-03-07 Thread ychawla
Hi Aki, I do have a one-way service. I added the 'synchronous=true' to the endpoint and now it is throwing the error without using my custom interceptor. Will setting this attribute affect other behavior of the one-way service? Thanks, Yogesh -- View this message in context: http://camel.46542

Re: http client cert verification

2012-03-06 Thread ychawla
On your client, you can add a HTTP conduit:

Re: Need help in Camel to send emails

2012-03-06 Thread ychawla
Hi, Are you trying to set the 'to' field in your email. You can either set that on the smtp URI or in a header. For example: recipi...@domain.com The body of your email is whatever is on your message body. If you want to set it as part of your route, try using a bean: public String createEm

Re: Need help in Camel to send emails

2012-03-06 Thread ychawla
Hi, The body of the email will be whatever you have as the current body of the Camel exchange. You can explicitly set the body as well: This is my email body To control when the email is sent, you can split up your route: Then you can use quartz to set up a timer to poll your folde

Camel Properties Component Cache

2012-03-05 Thread ychawla
Hello All, The Camel Properties component is very cool, however there are a few enhancements which would make it even better. First off the 'Cache' property is very nice. If Cache is set to false, then you can change your properties file and Camel will pick up the changes. The default on this i

RE: CXF endpoint's address dynamically modified?

2012-03-05 Thread ychawla
Hello All, I think this would be a great feature to have available with a cxf bean URI configuration. Consider the use case where Camel is acting as an intermediary broker/facade for other services. The broker and the services it fronts all share the same WSDL and service definition. The only di

Re: Does Camel supports dynamic routing by getting the routing info from database

2012-03-05 Thread ychawla
The other way you can do this is by using the Recipient List pattern: http://camel.apache.org/recipient-list.html You can query your database, have a bean where you setup a recipient list Header, and then call the recipient list. -- View this message in context: http://camel.465427.n5.nabble.co

Re: Propogate CXF Exception to Camel

2012-03-02 Thread ychawla
Hi Willem, I upgraded to Camel 2.8.4 and CXF 2.4.6 and I still see this behavior. Here is my route. It basically reads from a folder and calls a web service:

Camel log - part of body

2012-02-21 Thread ychawla
Hello All, In my camel routes, I use the log component quite a bit. For example: Is there a way with the simple language to only print out the first 100 characters or so of the body? I have some large XML file coming through that are really clogging up my logs. Thanks, Yogesh -- View this me

Re: Propogate CXF Exception to Camel

2012-02-16 Thread ychawla
Well Willem, You have solved the problem... It is a bug with Camel 2.6.0 that is corrected in Camel 2.8.4. I am on ServiceMix 4.3.0 and that ships with Camel 2.6.0. I changed my POM to use the newer version of Camel and CXF and ran it in Eclipse just fine. Thanks for helping with this. -Yogesh

Re: Propogate CXF Exception to Camel

2012-02-16 Thread ychawla
Hi Willem, Thanks for posting the unit test. I am wondering if I am getting the error because I am using a one-way exchange. For example, I also tried this with a producer template: senderExchange = new DefaultExchange(context, ExchangePattern.InOnly); enderExchange.getIn().setBo

Re: Propogate CXF Exception to Camel

2012-02-16 Thread ychawla
Hello All, I got Camel to see the exception by throwing a fault in my interceptor. This is probably not the preferred way to do this, but it seemed to work: public class CamelExceptionInterceptor extends AbstractPhaseInterceptor { public CamelExceptionInterceptor() { supe

Re: Using Camel to as WS Broker

2012-02-16 Thread ychawla
Hi Guys, It looks like you want to use a single service as a facade to the multiple services behind the scenes. Camel can do that. Does the service that you want to use as the facade have a WSDL/Service Spec? If yes, you can set up a CXF endpoint in either Payload or POJO mode for that service.

Propogate CXF Exception to Camel

2012-02-16 Thread ychawla
Hello All, Consider a simple camel route like this that invokes a one way service: opName opNamespace If the endpoint you are invoking is down, CXF will throw an exception: Caused by: java.net.ConnectException: Conn

TypeConverter GenericFile to InputStream

2011-12-02 Thread ychawla
Hello All, It looks like in Camel 2.6.0 there is no TypeConverter from GenericFile to InputStream. It is easy enough to get an InputStream from a GenericFile: Object body = exchange.getIn().getBody(); InputStream inputStream = null; if (body instanceof GenericFile) { GenericFile file = (GenericFi

  1   2   >