I have been trying out Apache Synapse and been trying to use the JavaScript mediator to set the JSON payload. But the ScriptMessageContext class doesn't contain any method for reading a JSON payload or setting a JSON payload. But there has been numerous examples of setting and getting JSON Payload in WSO2 such as mc.getPayloadJSON(); and mc.setPayloadJSON(response). Is there anyway to workaroud this in Apache Synapse?
No setPayloadJSON() in Apache Synapse
175 Views Asked by pacman At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in WSO2
- How to make gRPC request in WSO2 micro-integrator via Postman?
- Following PATTERN 3 Deployment ,Not able to consume apis in Gateway
- WSO2 change localhost - ERR_CERT_AUTHORITY_INVALID
- How to resolve unauthenticated error after calling REST API endpoint to update the Challenge Questions in WSO2 v5.11.0?
- Enable logging for API calls in wso2 identity server
- How to set weight of enpoints durin laod balancing in wso2 manager
- old apikey dont works for newly subscribed apis in wso2 apim
- WSO2 API-M: What is Synapse and why it spits following error: I/O error: Connection reset java.net.SocketException: Connection reset?
- how to upgrade httpcore-nio plugin of wso2 api manager
- Amazon RDS PostgreSQL - Caused by: java.net.UnknownHostException: yyyy.xxx.us-west-1.rds.amazonaws.com in WSO2 EI docker container
- How to Extract Queue Name, Priority, and Message ID from RabbitMQ Inbound Endpoint Messages in WSO2 MI 4.2?
- how do i manage role and permission in server side for my predefined roles and assign permission in wso2 identity server?
- Installation process of wso2 Enterprise integrator
- WSO2 - SSL troubleshooting: ERR_CERT_AUTHORITY_INVALID
- How to do error handling in Clone-Aggregator mediator in WSO2 Micro Integrator?
Related Questions in APACHE-SYNAPSE
- Unable to Read Synapse LakeDB tables from PowerBI
- Synapse pipeline datasets
- Apache Spark pool accruing cost even when paused?
- Pyspark processing 50gb and over parquet files efficiently in memory technique
- How to avoid adf pipeline converting the date fields to datetime while writing CSV files?
- Corrupt Synapse Notebook
- get no. of columns with no. of rows for each table from synapse lake database
- JsonNull UnsupportedOperationException on null value using WSO2 JsonTransform Mediator
- How to access API Version in WSo2 MI backend
- WSO2 IntegrationStudio 8.2.0 Endpoint requiring SSL
- Joining two tables with different sizes takes hours to execute
- WSO2 API Manager(wso2am-4.0.0) - Where are the synapse configurations located in the latest version?
- XSL:FO to PDF Mediator fails in "no object DCH for MIME type application/pdf"
- WSO2EI 7.1.1 File Processing not working on centos server
- HashiCorpVaultLookupXPathFunctionProvider cannot be found by synapse-core_2.1.7.wso2v182
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I found the answer for myself.Synapse process every data by converting it into soap.So first I needed to convert the flow flie to soap. Then processed the data using javascript and convert the script back to json using xslt. The complete xml code is shown below.Here I used synapse as proxy to send a get response from another server. then the data from that api is converted to soap and then processed in javascript and converted back from soap to json and send back to client.