Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to send optional TLV parameters using Camel / JSMPP

Posted on 2014-04-03
3
Medium Priority
?
659 Views
Last Modified: 2014-04-14
Dear all,

We need to send optional TLV parameters using apache camel to operator. We are using Apache Servicemix 5.0 which has apache camel 2.12.3, running on ubuntu server.
We usually configure new transmitters using xml such as the below
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
         <from uri=""/>
           <setBody>
               <simple>${header.message}</simple>
           </setBody>
         <inOut uri="smpp://operator URI"/>
      </route>
    </camelContext>
</blueprint>

Open in new window


However now with this new requirement, I don't know how exactly I should set these optional TLV parameters when sending the SMS.

Thank you for your help,

Iyad
0
Comment
Question by:iyadFarah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 36

Expert Comment

by:mccarl
ID: 39976940
I haven't used camel too much, but by the looks of things you should just need to set the correct header on the message that gets sent to the SMPP component, and it has the built-in ability to recognize headers on the message and transform those to your TLV parameters, ie. something like this...
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
         <from uri=""/>
           <setBody>
               <simple>${header.message}</simple>
            <setHeader headerName="ADDITIONAL_STATUS_INFO_TEXT">Blah</setHeader>
           </setBody>
         <inOut uri="smpp://operator URI"/>
      </route>
    </camelContext>
</blueprint>

Open in new window

The supported Tag / Header names can be found as constants at the top of the DefaultSmppMarshaler class
0
 

Accepted Solution

by:
iyadFarah earned 0 total points
ID: 39990914
Thank you mccarl for your response. The solution is to use the latest version of Camel and set the header using a java class which can be injected in the xml.

Please refer to following JIRA ticket for more details:
https://issues.apache.org/jira/browse/CAMEL-6655
0
 

Author Closing Comment

by:iyadFarah
ID: 39998540
It is the correct solution
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question