One Star

Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

Hi,
I interessting by implemeting this quite (?) simple scenario in Talend ESB with no luck. Hope i will get some help/advice.
My purpose is to create a kind of web service that enables me to send sms messages, via smpp protocol.
I plan to use a route, starting by a cCXF component (that will provide the web service) and route the requests to cMessagingEndPoint that wil use a camel smpp component to send sms. The required information of SMS will be provided by user requests on the webservice.

First i would like to get some feed back about the idea : shoud it be done this way ?
Second, if i'm doing right how shoud i do to dynamically send SMS to diffrent terminal numbers ? I far as i undrestand, I should specify these numbers as option in the URI of my endpoint component, but i didn't find how to make them dynamic (may be a hint is to use context variable, but i didnt manage to make it work).

I using TOS for ESB 5.0.2.r78327
Thanks,
WasYou
5 REPLIES
Employee

Re: Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

Hi WasYou,
Your idea sounds reasonable. And you are correct in your assumption that you could use a context variables in Routes too the same way it is used in Jobs. Later on you could use an OSGi configuration admin service to change context parameter values.
Renat
One Star

Re: Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

Hi,
Thanks for the quick reply. It seems i didnt waste my time with a wrong approach!
Okey, now can i have some advice or tips on how to handle context variable within routes ?
This is what i tried until now without a success :
I create a route with two context parameter lets say srcNum and DestNum. The parameter value is planned to change with every call to the provided webserive.
I have 3 componentsin my route :
cCXF --> cProcessor --> cMessagingEndPoint
- I do use the same cCXF compenent that is provided by ContentBasedRouting example available in ESBDEMO
- cProcessor is used to display the value of the contexte parameters
System.out.println("srcNum = "+context.getProperty("srcNum"));
System.out.println("DestNum = "+context.getProperty("DestNum"));
- cMessagingEndPoint is configured with this URI :
"smpp://user@127.0.0.1:2775?password=user&systemType=producer&sourceAddr="+context.srcNum+"&destAddr="+context.DestNum
I launch the execution in TOS, and that provides the webservice.
I try to call the webserivce from SOAPUI wtih this URL :
http://localhost:8021/services/BeanAsService?args=--context-param SrcNum=1010&DestNum=8888

What i do get is a message that is following my route, but the context values still always null. They didnt change.
I guess i'm not using the correct form to provide a value for my context params, but i d'ont know to fix this.
Any help or Tip ?
Thanks in advance,
WasYou.
One Star

Re: Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

Hi again,
I managed to do it.
I changed my approach to be coherante with esb, by altering message header and message body.
Thanks for help and for the great product !
One Star

Re: Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

Hi mwasyou,
I am about to do exactly the same thing. Would it be possible for you to explain how you managed to get it right? I know this post is old but hopefuly you still see this.
Thanks.
One Star

Re: Dynamic URI endpoint for cMessagingEndPoint (SMPP) in ESB

If anyone would like to know how I managed to accomplish this please email me and I will be happy to let you know how Smiley Happy. Its actually quite simple.