SMS through WSO2 esb proxy services - wso2

can we send SMS through WSO2 esb. i don't want number to be hard coded in proxy services.
if any one done this please provide details

You can use the WSO2 ESB's Twilio Connector for your requirement. It has SMS sending capabilities and you can use that for your requirement.
If you don't need the number to be hard coded (assuming you send the number with the request) you can read the number from the incoming message and then set the number to a property . You can use that property to get the number inside the Twilio Connector

Related

Wso2 API Manager : API Produce and Consume JMS Messages

I have following requirement, is this possible to achieve in WSo2 API Manager. Please advise. I got few article/pages with information on how to post request to message queue but none for how to consume message.
UI client calls a REST API exposed on the API gateway.
The backend service actually providing the implementation is a module
This module reads from a MQSeries queue an XML message, processes it and responds back to an outgoing queue.
So API gateway must be able to transform the REST/JSON payload to an XML payload and put it on the MQ Series queue
Wait synchronously and pick up response from another MQSeries queue.
APIM does not support consuming JMS messages OOTB. But WSO2 ESB. See https://docs.wso2.com/display/ESB500/ESB+as+a+JMS+Consumer
However, since APIM has ESB features installed by default, you should be able to deploy such a JMS consuming proxy in APIM too.
Have a try and post if you face any issues.

How to limit max connection allowed in WSO2 ESB?

I want to limit the number of connection received by WSO2 ESB. Is there any property to be able to limit by properties (axis2, carbon, etc.)?
This answer is based on the understanding gained from your comment. So, I assumed your backend has a limit of requests which can be processed which is less than what the ESB can accept.
There are two option:
Similar to catalina-server.xml for tomcat, there is pass-thru.properties file in the conf folder where you can tune certain parameters to suite the load you expect and also to match the capabilities of the VM you have hosted the ESB.
https://docs.wso2.com/display/ESB490/Configuring+passthru-http.properties
One disadvantage of above option would be, some of your requests will not be accepted by the ESB if its too busy. To overcome that, you can use a queueing mechanism. i.e. You accept all the requests and store them in a message store (a queue). Then configure a message processor to retrieve those messages and process. Disadvantage of this option is, its difficult to cater a request response scenario.
As Bhathiya has mentioned, you can front your ESB with a WSO2 API Manager and throttle the requests too.
Until ESB 4.8.1, it had throttling feature. You also can use Throttling Mediator in each service.
Another option is to front ESB by WSO2 API Manager which has complete throttling support.

How could bpmn service task send messages to WSO2 ESB in WSO2 BPS

I know a service task of BPMN can send messages (JMS or WS calls) to external system using camel or mule in Activiti, but it seems that there's no camel or mule supported in WSO2 BPS, and I'm afraid it is because WSO2 ESB can substitute for them. So, my question is how can a service task send messages to WSO2 EBS?
Obviously, I can create a Java class implementing JavaDelegate class for a service task and write some codes for sending messages in execute method, but I want to know whether there's some "smart" solution..
Thanks a lot.
BPMN service task would be the solution in this case as you have mentioned. What type of service call do you need to do in ESB? If it's a REST API invoke in ESB, you could use the REST TASK extension available in WSO2 BPS. You could find a good use case on this in example
For example, you could add a Service Task with Task Type: Java Class
Class Name: org.wso2.carbon.bpmn.extensions.rest.RESTTask
with following fields.
serviceURL - rest service endpoint
method - http method to use
basicAuthUsername - username if the endpoints are secured
basicAuthPassword - password for the username above
input - payload to be sent
outputVariable - process variable to save the response
header values in the format "key1:value1,key2:value2"

How to monitor webmethod by using WSO2 BAM?

I have integrated WSO2 ESB and BAM. Greatly, I'm able to monitor the Service Proxy. But I wonder if there is anyway to monitor the operator/WebMethod of proxy. Please give me some advice.
I already use Bam mediator to collect ESB data for monitoring Webmethod. But my problem is there is not payload_request_count/response_count... data to sent to bam_service_data_publisher. Whereby the dashboard is always empty.
So how could I do to send those properties?
You can add the BAM mediator to a sequence (when adding a mediator, choose Agent -> BAM) and specify the BAM server profile and stream you want to use to start capturing and sending data events to the BAM server. Be sure to enable statistics on the sequence to start collecting the data.
https://docs.wso2.com/display/BAM250/Setting+up+BAM+Mediator
https://docs.wso2.com/display/ESB481/BAM+Mediator
In addition you can use Api Manager to control and monitor your web method.
http://wso2.com/api-management/

how to send SMS to a mobile phone using software program (like yahoo messenger)?

I am trying to write a small program using Qt to send SMS messages to a mobile phone. Something like what Yahoo Messenger provides. You can send SMS messages to mobile phones if mobile service provider is supported. I would like to know what happens behind the scenes after you click "Send". Especially how does the message you send gets transfered from the server at yahoo to mobile service provider's network?
Yahoo would've purchased access to (or run their own) SMS gateway. The exact method of transferring the message from Yahoo->Gateway would depend on the gateway's API. Could be XML, could be a proprietary binary format, could be a simple HTTP POST, etc... The SMS gateway would take care of the details of getting the message into the back-end cellular data network and on to the recipient's provider's system.
The easiest way to do it is to buy credit with a company like SMS Global ( http://www.smsglobal.com/global/en/ ). I don't work for them, but I have used them in the past. You do a simple web request (with your account number), destination phone number and the message. It deducts credits each time you send an SMS. Obviously, you write it in to your business plan to cover the costs of this :)
They also offer services whereby you can receive SMS messages to your own web service.
Obviously, there are many other SMS gateways, but if you look at the site and the API you should have a general idea of how it works.