SMS Transport sender in wso2 ESB - sms

Recently I read an article about Sending SMS notifications using WSo2 esb. Unfortunately it does not work for me and I am not 100% sure about some of those configurations. Following are the problems that I have.
Are there any other library files, rather than the two files below, that can be used to enable SMS transport sender over SMPP?
axis2-transport-sms-1.0.0.jar
jsmpp-2.1.0.jar
What is the actual directory into which I should put each of those jars -
is it $ESB_HOME/repository/components/lib ?.
Finally, what should the address endpoint for sending a specific number look like?
Is it like this?
<endpoint>
<address uri="sms://94777179968">
</address>
Note :- I am using a SMSC simulator as my actual SMSC.
Thanks in advance.

Axis2 SMS Transport is designed to support any SMPP implementation by implementing org.apache.axis2.transport.sms.SMSImplManager interface.
Please refer http://ws.apache.org/commons/transport/sms.html
In axis2-transport-sms-1.0.0.jar, there are two implementations.
i. org.apache.axis2.transport.sms.gsm.GSMImplManager - Implements SMSLib http://smslib.org/
ii. org.apache.axis2.transport.sms.smpp.SMPPImplManager - Implements JSMPP https://code.google.com/p/jsmpp/
If you want, you can refer sources of these implementations and write your own implementation. For example, I have used Logica SMPP in one of my projects (A standalone app) and it is a very good library and my project is in production for more than two years.
Here is the website for Logica SMPP: http://opensmpp.logica.com/CommonPart/Introduction/Introduction.htm
For your second and third questions, I think the answers are already there in the blog post you referred. Please go through the steps in that blog.

Answers to your specific questions...
1. no, these are correct put them in the place as directed in the article
2. yes
3. yes, but if this is entered through the design view you will get an error saying it is an invalid format. Switch to source view to add. (However, although I did get the error, it did appear in the source view too, so you'll just have to experiment with this).
Follow the article exactly BUT there is a slight error in both the config file for the proxy service and for the config in the axis2 file (to enable the SMS transport)
In the service xml the description tag surrounds all of the target so move the empty description element outside the closing target element.
The axix2 config file needs the transportsender element altered slightly to be transportSender - note the capital 'S' for sender.
That is how I got this to work. Good luck.

Related

Convert Resuable ErrorHandling flow in to connector/component in Mule4

I'm Using Mule 4.2.2 Runtime. We use the errorHandling generated by APIKIT and we customized it according to customer requirement's, which is quite standard across all the upcoming api's.
Thinking to convert this as a connector so that it will appear as component/connector in palette to reuse across all the api's instead copy paste everytime.
Like RestConnect for API specification which will automatically convert in to connector as soon as published in Exchange ( https://help.mulesoft.com/s/article/How-to-generate-a-connector-for-a-REST-API-for-Mule-3-x-and-4-x).
Do we have any option like above publishing mule common flow which will convert to component/connector?
If not, which one is the best way suits in my scenario
1) using SDK
https://dzone.com/articles/mulesoft-custom-connector-using-mule-sdk-for-mule (or)
2) creating jar as mentioned in this page
[https://www.linkedin.com/pulse/flow-reusability-mule-4-nagaraju-kshathriya][2]
Please suggest which one is best and easy way in this case? Thanks in advance.
Using the Mule SDK (1) is useful to create a connector or module in Java. Your questions wasn't fully clear about what do want to encapsulate in a connector. I understand that you want is to share parts of a flow as a connector in the palette, which is different. The XML SDK seems to be more inline with that. You will need to make some changes to encapsulate the flow elements, as described in the documentation. That's actually very similar to how REST connect works.
The method described in (2) is for importing XML flows from a JAR file, but the method described by that link is actually incorrect for Mule 4. The right way to implement sharing flows through a library is the one described at https://help.mulesoft.com/s/article/How-to-add-a-call-to-an-external-flow-in-Mule-4. Note that this method doesn't create a connector that can be used from Anypoint Studio palette.
From personal experience - use common flow, put it to repository and include it as dependency to pom file. Even better solution - include is as flow to the Domain app and use it alone with your shared https connector.
I wrote a lot of Java based custom components. I liked them a lot and was proud of them. But transition from Mule3 to Mule4 killed most of them. Even in Mule4 Mulesoft makes changes periodically which make components incompatible with runtime.

How to make a Google Home (Mini) publish what it listens to a MQTT topic (and broker)?

I have a Google Home Mini and I'm trying to use it as a speech-to-text device. The way I intend to do so is by having the device listening to what is said and publishing that input to an MQTT broker in order to my application to listen to it.
I have found this, that returns the input as text, but all it gives me is the certainty I can get this data. I have little to no clue on how to make it publish this data as an MQTT message.
Also found this, but can't make it work, because it states "There’s a very easy way to recognize custom phrases in Google Assistant,[...] I won’t cover it here". And even the Google's instructions (open "Create an Applet") seems to be out-dated in relation to IFTTT, because the steps simply aren't followable in IFTTT's interface.
Here is a quick sketch of the architecture:
There're 5 arrows. The first one is, obviously, a physical process. Arrows "Audio" and "Text" are automatically done by the hardware. The right "MQTT Message" is working already. So what I wanted help with is the "MQTT Message" arrow from "Google Home" to "MQTT Broker".
Thanks in advance.
The short answer to this is you don't (as you've described it).
The slightly longer answer is that you first have to move the arrow you are interested into to the cloud and it's not a MQTT message.
The Action box needs to be hosted on a publicly accessable machine (e.g. AWS/GCP/Azure/IBM Cloud) so that the Google platform knows where to find it.
Google have 2 different types of actions, one for conversational type interactions and one for controlling smart homes devices. You've not mentioned what you are trying to do so I can't say which one you really want.
Google have recently announced the Local SDK for interacting with smart home devices that is slightly closer to the diagram you have included. This can only be used for device control and still can't send MQTT messages, it supports HTTP, raw UDP or TCP (you might be able to implement a MQTT client using the raw TCP, but it would be a lot of work and I'm not convinced the keep alive would work)
I think I got what you need:
Configure the Google assistant to parse your speech, then connect it to ifttt (as I already did it in the past, it's very easy) to send HTTP requests.
NOW create a local web server that understands these requests from ifttt, and publish them to your broker.
And that's all!

Using spring-boot-admin for a non spring-boot project

tl;dr
Requesting suggestions, guidelines or examples for possibilities to extend spring-boot-adminto use methods other than HTTP requests for health moitoring of non-spring projects like MariaDB.
Full version
There is a requirement to setup a monitoring application using spring-boot-admin. Several of the clients are spring-bootapplications and are easily implemented. There are however a couple of non spring-boot projects like the database server MariaDB.
The question is therefore formulated thusly : Is it possible to extend SBA to monitor the databse status by methods other than HTTP requests. One possible approach, for example, might be to check if it is possible to connect to the application specific TCP port to verify if the db server is still running. However, other possibilities can be exploited too.
One post I found similar to my question was this :
https://github.com/codecentric/spring-boot-admin/issues/504. The key difference here though is that the provided answer still sugests a HTTP approach. The reference guide also does not suggest an alternative.
Should such a possibility exists, a brief outline of the approach or an example implementation would be most welcome.
SBA currently only supports checking health via http. But your DB should be implicitly monitored if you have an according health indicator on your business application.
It should be possible to extend the StatusUpdater#queryStatus() doing a tcp connect if it encounters an health-url beginning with tcp:// instead of http://...
And in case you accomplish that a PR is appreciated :)

Sending message to single person using Spring STOMP websockets

On the internet I've found some info on how to accept and send messages using Spring and STOMP, however I did not find any good examples on how to send a message to a single user. Only how to broadcast them to every single one. Are there any good examples on it?
I basically want to run one or two controllers with STOMP in a Spring MVC structure, so I can authenticate people outside of the websocket, and later on tie that authentication to the STOMP controllers, and for that I obviously need to be able to send messages to individuals.
There is a reasonable spring blog post which covers this:
http://assets.spring.io/wp/WebSocketBlogPost.html
The source code is on github (and linked from the blog).
There is a concept of User Destinations where messages can be bound to a specific destination belonging to a user's session.
There is this article from the Spring docs that explains it nicely. Hope this helps someone.
For anyone looking for the same answer with a nice code example, I've found this repo: spring-websocket-chat

Need your suggestion for Exchange ActiveSync client

I'm just about to start building MS Exchange ActiveSync client. I found two type of implementations. I don't know which one is the right approach.
http://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/3b1e73fc-b69a-4ed2-a905-d15af6666f22
http://msdn.microsoft.com/en-us/library/hh361570%28EXCHG.140%29.aspx
First option says that the command being sent to my Exchange server (from my iPhone mail app) and the body is not xml encoded. I really didn’t find any other standard documentation regarding ActiveSync without using encoded xml.
Second option says to use WBXML and ActiveSync HTTP to perform the right action. It seams very well documented.
I'm really confused while thinking what should be the right approach to perform actions like SendMail, Reply, Forward, mark Read/Unread etc..
Can you guys guide me to select right basic approach which supports all versions of exchange servers with minimal change (Exchange 2007, 2010 etc.).
Since you mentioned Exchange ActiveSync, I believe you are building a PDA Mail client ? If yes, you can use WBXML approach.
For example, if you are building a Android application in phoneGap, then you can resolve this issue by two approach. Either user KXML java parser to parser, encode and decode wbxml, xml or a javascript approach with this library.

Resources