I have developed some APIs flow in WSO2 developer studio and host it on WSO2 EI Server.
And then i published those URLs to WSO2 API Publisher and implemented the oAuth2 security over there.
At last the client/consumer have access to the URLs from API Publisher.
Now what i want that every request and response of the service should be stored in MySQL external table.
Any idea what to do in WSO2 EI flow. or any other alternate.
You need to store the
request
when it comes to the sequence in aproperty mediator
and the same has to be done forresponse
. You need to create adata service
wherein you need to mention the query of MySQL else you can use aDB mediator
. Next before ending the out sequence with asend or loopback or respond mediator
you need to useclone mediator
and call either thedata service
orDB mediator
. For DB Mediator refer below link. https://docs.wso2.com/display/ESB500/Sample+361%3A+Introduction+to+DBReport+MediatorBelow is the code snippet