I am trying to filter JSON results coming from our main application in our WSO2 API Manager and to filter URL's in the results. I haven't tried anything specific. Any ideas?
In Filter mediator use xpath to identify the certain messages/properties.check the url in the payload and filter..Check the documenation
Related
New to WSO2 EI,
I have built an API that will give a response JSON, i want to parse and save this in Database. How can I do this.
Db is external Oracle, for which I have a JNDI built already.
~Jawa
There are multiple ways of achieving this,either you can perform entire things in ESB or you can use DSS as well.
Once you get JSON response you need to frame a query, you can use DB mediator add insert query which would then insert into DB.
Else you can create a data service in DSS and then pass this JSON, write a insert query in DSS and insert it into DB.
For DB mediator check this link
https://docs.wso2.com/display/ESB490/DB+Report+Mediator
For Data service check below link.
https://docs.wso2.com/display/DSS322/Exposing+Data+as+REST+Resources
Just as the title suggests.
I want to wrap a database call in an API or REST API whichever is easiest preferable API Manager API.
How can i do this and return the data from the database in json?
You can use DSS to access the database, and then a payload factory mediator or Data Mapper to transform the response in a json.
Alternatively, you can use DSS to expose your data as a set of REST style resource.Take a look at this link for an example on how to achieve this.
I would like to know how to add url params in wso2 for a url similar to http://localhost/mytestapi/123456 where 123456 is the id I want to pass onto the mytestapi api.
You can define the API and Endpoint like below. I gave a sample API with Endpoint mapping. For more information, please check on this documentation on Map the Parameters of your Backend URLs with the API Publisher URLs
I have an internal webservice exposed in SOAP/HTTP. What I am trying to achieve using API manager is to expose my internal SOAP based webservice over different protocols like XML, JSON etc.
Does WSO2 API manager have that capability.
Thanks and Regards
Privin Thomas
If you wish to transform the incoming message into a different format for the backend. This can be done using the underlying ESB capabilities of the API Manager - there are actualy several ways. IMHO, the easiest way to do this is with Mediation Extensions. For information on adding a Mediation Extension to an API, please see the documentation here:
https://docs.wso2.com/display/AM170/Adding+Mediation+Extensions
Wso2 DSS Fetch Data From Table
Please Help
I have a table named "Address". I want to fetch the all details(all coulmns) from this table using service created through wso2 dss.
I have to get the responce in json format.
I Have tried it ,but not getting the result
pls help
You can check the wso2dss documentation on how to create a DSS and how to return a JSON message. If you face any issue, please post the error stack.
WSO2 DSS distribution comes with default RDBMS sample. you can try that too.
As told by ratha, you can try the sample & understand how it is created. or else you post your table schema and anyone can post xml of that service.
For JSON reponse you need not worry much, you just need to pass one "Accept:application/json" header while calling dss service. first try to get output from dss service.