I have following usecase to implement in an WSO2 ESB.
During server startup , I need to execute a service which will load reference data from DB . This will be cached , An API is exposed to fetch this data from cache. Client make call to this API , ESB fetch this data from cache and respond back to client.
Question is , is there a possibility to execute the service / data retrieval logic during ESB startu ?
Related
I have a DEEP INSERT set up in ABAP + SAP Gateway Client.
The issue is I can only run this through SAP GATEWAY CLIENT, not through Postman (externally).
E.g. I've setup my service in SCP oData provisioning...
First Call gets my auth-token for the client.
https://oauthasservices-xxxxxx.hana.ondemand.com/oauth2/api/v1/token?grant_type=client_credentials
Second Call performs a GET to FETCH the X-CSRF-TOKEN (This is done automatically through SAP Gateway Client)
https://gwaas-xxxxxx.hana.ondemand.com/odata/SAP/ZGW_XXX_SRV/orderSet?FromOrder
Lastly I run a POST Call using the Authentication + X-CSRF-TOKEN, and exactly the same payload as my call in SAP Gateway Client.
https://gwaas-adddcbbb0.hana.ondemand.com/odata/SAP/ZGW_JUSTEAT_SRV/orderSet?FromOrder
This returns
INTERNAL_SERVER_ERRORCould not perform the operation, contact your System Administrator: Transaction ID :4d237684-b708-4b8a-9b88-xxxxxxxxxx
I have a breakpoint in my DEEP_INSERT method which is triggered when ran through the SAP Gateway Client, but not through postman.
Any ideas?
I'm now using WSO2 ESB for creating WebService Proxy and Bam for monitoring. I can seee the data in Bam explorer, but the payload_operation_name is always be "mediate".
How could I config to see the real name of the operation?
According to your description, I think you are using the Service Data Agent [1] to capture the proxy related statistics here where as you actually need to us the Mediation Data Agent for that. Because the Service Data Agent is mainly for statistics monitoring of the axis2 services, and hence you are getting the operation name as 'mediate' always when accessing the proxy service. The correct way to go forward is to use, Mediation Data Agent, but it will not publish the operation name what you are accessing, and if your backend services is axis2 service then you could use WSO2 Application server and use the Service Data Agent to collect the operation level stats of the web service. If your back end service is not within WSO2 servers, then you can use BAM mediator [3] or Publish Event Mediator (if ESB 4.9.0) [4] to publish this information to BAM.
[1] https://docs.wso2.com/display/BAM250/Setting+up+Service+Statistics+Data+Agent
[2] https://docs.wso2.com/display/BAM250/Setting+up+Mediation+Stat+Data+Agent
[3] https://docs.wso2.com/display/BAM250/Setting+up+BAM+Mediator
[4] https://docs.wso2.com/display/ESB490/Publish+Event+Mediator
I have integrated WSO2 ESB and BAM. Greatly, I'm able to monitor the Service Proxy. But I wonder if there is anyway to monitor the operator/WebMethod of proxy. Please give me some advice.
I already use Bam mediator to collect ESB data for monitoring Webmethod. But my problem is there is not payload_request_count/response_count... data to sent to bam_service_data_publisher. Whereby the dashboard is always empty.
So how could I do to send those properties?
You can add the BAM mediator to a sequence (when adding a mediator, choose Agent -> BAM) and specify the BAM server profile and stream you want to use to start capturing and sending data events to the BAM server. Be sure to enable statistics on the sequence to start collecting the data.
https://docs.wso2.com/display/BAM250/Setting+up+BAM+Mediator
https://docs.wso2.com/display/ESB481/BAM+Mediator
In addition you can use Api Manager to control and monitor your web method.
http://wso2.com/api-management/
I have a flow that is using the SalesForce connector to establish a connection and perform standard operations through the API. I have a new requirement for Mule to act as a web service proxy for an Apex class exposed as a service. Mule will need to insert or create a session Id before executing the Apex service. Since the other Mule flow will likely have a valid session Id, I did not want to create one needlessly. Is there anyway to retrieve the session Id that the SalesForce connector is creating and holding so that I can use it in my other flow?
Or is there a more simple way to call the Apex service which could make use of the SalesForce connector?
So for this project I was trying to build a web-service-proxy pattern to front a Apex Web Service, manage the login to Salesforce, and pass the Soap payload with the session Id to the Salesforce endpoint.
I ended up building a transformer that extended the AbstractMessageTransformer, and another class that extended Mule's SalesforceConnector module. The transformer used its existing instance of the SalesforceConnector or created a new one which created/got the sessionId and server Url from the LoginResult. The transformer then manipulates the XML to set the sessionId and return the message.
I couldn't find a way to get the Connector's pool, but this method only makes one login call as long as the session is active and will reconnect if it is not.
how can i get response time of each services in ESB using class mediator?
I created a DiscoveryProxy in ESB and want to access QoS (response time) of services that have been deployed in application server.
how can i access to SLA/response time of services in ESB?
You can find the service stat details in the monitor-->System Statistics page.
If you need more fine grained details about your service,you might need to integrate BAM with AS.