Solved

how to send optional TLV parameters using Camel / JSMPP

Posted on 2014-04-03
3
634 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches viewers about errors in exception handling.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

696 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