To send file as attachment using HTTP request node in IIB - ibm-integration-bus

I have requirement to send a file over API as attachment. This works fine from Postman. I have to implement same using IIB using HTTP Request Node. I am not able to find any property on the node related to attachment. Can anyone suggest the solution
I want to implement this binary file upload option via HTTP request node

I assume there is already a published API that you are sending that attachment to it and you want to develop some interface from IIB to mask this API , Correct ? If it is correct then all what you need is to set the HTTPRequest Node to work in the gateway operation mode then you will have to specify the URL of the published API and of course an HTTPInput node in the beginning of the flow.

Related

IBM App Connect Enterprise - Form Data in Rest Request Node

According to this IIB v10 link application/x-www-form-urlencoded form data parameters are not supported for a Rest Request Node.
https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bi12026_.htm
Is this still the case for IIB 11? have they included support.
Is there another way to call a back-end API having form data parameters in the swagger file?
Thanks in advance.
I got this done by a work around. Used an HTTP Request Node with the following ESQL in a compute node.
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputLocalEnvironment.Destination.HTTP.QueryString.grant_type = 'client_credentials';
I know this is not an answer but this worked and retrieved my token.
Hope this helps to someone.
You will need to use BLOB domain in order to send a request with "x-www-form-urlencoded" header content-type in IIB.
Check below links for reference:
Example1
Example2

Send SMS from AngularJS Web App using Ozeki sms Gateway

I want to send SMS from AngularJS web application using Ozeki sms gateway. Can anyone tell me how to do this? pr suggest me some reference link or code sample.
Plain sending
Assume we skipping other protocols available inside Ozeki Sms NG product (like SMPP, Email, DB etc), and getting to HTTP protocol only, you can go this way:
Prerequisites:
Figure out best way for you to make HTTP request to send SMS
(I'm not AngJS guy so may be there are already few ways to make HTTP-request from Angular, but at least any Ajax method passing params to executing PHP-script for making HTTP request (with curl, file_get_contents) will be totally Ok).
Make sure your Ozeki SMS server is reacheable via IP/domainname etc by your PHP-script so your code can reach its endpoint.
Doing it:
Inside Ozeki install service provider like HTTP Client
http://www.ozekisms.com/index.php?owpn=195&info=service-provider-connections/http-client-connection
or HTTP Server (more powerful version of HTTP Client allowing call back URLs)
http://www.ozekisms.com/index.php?owpn=197&info=service-provider-connections/http-server-connection
Then according (to docs) execute request like
http://server_ip:9501/api?action=sendmessage&username=________&password=________&originatior=__________________&recipient=__________________&messagetype=SMS:TEXT&messagedata=______________
*Some fields are not necessary, it may vary depending on Ozeki version you use.
** port 9501 - is a default Ozeki HTTP port which may be changed in general settings, also it has HTTPS port as well. Basically the correct port is the same which you already use when accessing Ozeki Web GUI.
After executing sending request (try from browser or from something like Postman first) you should get responce in XML format informing you about result of your transaction.
Possible next step... DLRs
Getting delivery reports (if supported by your operator) is a common "i want it too" question.
In case you need them - there is great embedded feature inside "HTTP Server" connector (mentioned above).
Here you can see more details
http://www.ozekisms.com/index.php?owpn=431
"reporturl" - is a field you may use to set kind of "call back url". In other words in this optional field you may specify full URL and list fields to be passed along. So you only have to create your own endpoint to catch them (as GET request from Ozeki server) and use inside your software.

how to use the proxy service without tryit tool in wso2 esb?

I am learning and working on building some wso2 sample prototypes.
I have created a proxy service and tried using it with the tryit tool inside.
But i don't know how to use it externally. i mean how to send data to the proxy service because in API there is a endpoint created where the request is sent.
Is there anything like link to request or how to use it externally in some application.
You can use SOAP UI. Please check the article.
The easiest way to call Your proxy service is to use some Rest Client on Your Browser. I use Add-On in Firefox (RestClient i think). U can create there whole request (json, xml), add headers, Authentications or Content Type. It should helps U to call any services in wso2.

ESQL to send attachments using a SOAP request node in IBM Integration Bus

Can anyone please tell me the ESQL code for sending an attachment using a SOAP request node in IIB?
If you want to use SOAP with Attachment, then you can provide attachments and metadata for those in the OutputRoot.SOAP.Attachment subtree:
http://www-01.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/ac64020_.htm?lang=en
If you want to use MTOM, then the attachments are represented inline, within the body of the message, so you need to set the field(s) in your message containing base64Binary data:
http://www-01.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/ac56630_.htm?lang=en

Shopify webhook verification in parse

I am trying to get a shopify webhook to fill my customer class in parse.com, however something must go wrong. I don't know how to verify the parse response since Shopify sends this webhook out from it's ruby backend. I used requestbin to catch the webhook and I replicated a post request using postman to my parse url and everything works fine. Does anyone know how to debug requests like these? Is there a console in Parse where I can see all the incoming requests and the responses Parse.com sent back?
Try using Runscope for debugging webhooks. Full guide here: https://www.runscope.com/provider-guide/troubleshooting-webhooks - this is more than just a request bin. It's a full transparent proxy that will, like a bin, record the webhook notification, but will also pass it along to the intended destination (your webhook receiver) and record that response as well.

Resources