IBM App Connect Enterprise - Form Data - HTTP Request Node - ibm-integration-bus

I am trying to send form data through HTTP request node to Microsoft graph API. It is failing with a bad request. Can someone who have worked on Graph Mail API in IIB/ACE, can provide your inputs??
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/x-www-form-urlencoded';
SET OutputLocalEnvironment.Destination.HTTP.QueryString.grant_type = 'client_credentials';
The above is giving me a bad request response.
The below post is related to this but hasn't answered my question.
IBM App Connect Enterprise - Form Data in Rest Request Node

Related

How to send a file through http post using Data Fusion

Wanted to send a file to an http end point url using Data fusion.
Making this http call as a pipeline alert at the completion of the pipeline.
This is not working. Getting 500 response from API. Can someone help me on how do I send the file?
If this can be achieved with http plugin as sink, please let me know the steps.
I doubt you can send files using HTTP. You can create a request using the HTTP plugin as I answered one of your previous question - Data Fusion - Issue with http post plugin.
In HTTP Callback you can find information:
This action can be used when you want to perform an HTTP request at the end of a pipeline run.
Using this plugin, you can send a request or text, not a file.
If you would like to send a file, you should use File like it's mentioned in this thread: Some questions about google Data fusion
Regarding Error 500
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
It means that there is an issue with your endpoint. It might be a firewall or HTTP server issue. Too many possibilities of what could be wrong with current details.
In addition, you can find some additional information in doc Ingest CSV data to BigQuery using Cloud Data Fusion - Batch ingestion

To send file as attachment using HTTP request node in IIB

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.

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

How to do correlation on dynamic parameter that are occuring in request and not in response in JMETER?

I am developing a mobile script using jMeter. i.e trying to record and replay mobile web applications using JMeter 2.9 and firefox 43.0.4
I am able to record the application. But it throws an error during replay, as some dynamic parameter is passed with the post data as below:
POST data:
skin=&skinLoaderChecksum=&isAjaxRequest=true&**x=****0.7379947959390617**
When I checked the same flow in Load Runner, the same failure occurs on the same URL again.
In Load Runner:
HTTP Status-Code=500 (Internal Server Error) and {"errorCode":"UNEXPECTED_ERROR","errorMsg":"FWLSE0009W: User identity is null. Check your application''s authentication requirements. These settings must match to the deployed application [project mobile]"}
In JMeter:
Response headers:HTTP/1.1 401 Unauthorized in Sampler Result and in response data: /-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"geqcaecehouktkfn0rfqmmdu6"}}}/
Is anyone able to help with this?
Responses will be highly appreciated :-).
I don't have Worklight server to play with now hence I can provide you only generic information. You need to properly simulate mobile application authentication flow, actually this dynamic parameter can be fetched from the previous response.
Reference links:
How to do Worklight Server performance testing
How to Load Test CSRF-Protected Web Sites

Getting 400 Bad request error when sending huge amont of data with post

I am using yahoo YUI Ajax call to post request.
Page is developed in JSP and server is Tomcat 6 and using Struts 2.x.
While i am sending small amount of data using Ajax call post request it is working fine.But when i am sending huge amount of data i am getting 400 bad request error.
The 400 error comes when The Web server thinks that the data stream sent by the client (e.g. your Web browser ) was 'malformed' i.e. did not respect the HTTP protocol completely. So the Web server was unable to understand the request and process it.
There could be possibilities that data is too large, so you should better encode the data using java script inbuilt function for example escape().
Please check maxPostSize attribute of Connector in conf/server.xml.
See the following doc for the details
In Tomcat, when the post data exceeds the maximum specified in maxPostSize (server.xml) it returns a 400 as error code

Resources