Hello,

I am using hipchat component with camel 15.0 and the below route works for
me. It just reads a file dropped in folder and hipchat's the filename as
message. I use scala with java dsl and not XML. Few things I suggest to
debug issue:
1. Try a simple java DSL like mine and see if that works
2. Does it work with camel 15.0?

I hope this is not related to "@" symbol in your XML being set in header
getting encoded or something.



object HipchatUserMessageSender {
  def main(args: Array[String]): Unit = {
    val camelMain: Main = new Main()
    camelMain.enableHangupSupport()
    camelMain.addRouteBuilder(new HipchatUserSendRB)
    camelMain.run()
  }
}

class HipchatUserSendRB extends RouteBuilder {

  val hipchatOut = "hipchat://?authToken=AAAAA"

  val fileUrlIn =
    s"""
      file:/tmp/hipchat?
      readLock=changed&
      delete=true&
      readLockMinLength=0
     """.lines.map(_.trim).mkString

  override def configure(): Unit = {
    from(fileUrlIn)
    .setHeader(HipchatConstants.TO_USER, constant("@451"))//yes, thats my
handle
    .setBody(simple("in.header.CamelFileName"))
    .setHeader(HipchatConstants.TRIGGER_NOTIFY, constant(true))
    .to("log:hipchat?showAll=true&multiline=true")
    .to(hipchatOut)
  }
}




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-hipchat-15-2-using-XML-DSL-can-t-set-HipchatToUser-tp5767120p5767132.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to