Configuring the synapse properties file in wso2 - wso2

How to configure the wso2/repository/conf/synapse.properties files in wso2? I need to change the synapse.global_timeout_interval value but updates to the synapse.properties seems to be overridden when the server restart.

Assuming you are using API manager product and a version that use deployment.toml for configurations, you can add following config in wso2/repository/conf/deployment.toml.
[synapse_properties]
"synapse.global_timeout_interval"=value

Related

WSO2 API Manager 4.1.0 - Unable to update api-manager.xml

Downloaded WSO2 API Manager 4.1.0 Zip Archive
Navigated to APIM\wso2am-4.1.0\wso2am-4.1.0\repository\conf\api-manager.xml
Updated the api-manager.xml for JWTConfiguration and set EnableJWTGeneration to
true
save the api-manager.xml changes and restarted the server.
after restarting the server the api-manager.xml changes are reverting back to old values
false
Why changes are not reflecting in api-manager.xml?
Help us how to update api-manager.xml
Do not change xml configuration files directly, you should be changing deployment.toml instead.
Complete list of options can be found here
Read more about this behaviuor at Understanding the new configuration model
Edit APIM\wso2am-4.1.0\wso2am-4.1.0\repository\conf\deployment.toml
remove '#' before
[apim.jwt]
enable = true
then restart APIM

How i can change the User-Agent Header in WSO2 API Manager

WSO2 APIM has a default User-Agent header which is:
Synapse-PT-HttpComponents-NIO
I want to change it to something else, so i have added header mediation from the publisher run time configuration but no luck, also i tried to add this line http.user.agent.preserve=true in passthru-http.properties as many people said but whenever i restart the server it is removed from the file.
How I can accomplish it ?
I am using wso2am-3.2.0
In APIM 3.2.0, we use deployment.toml file to add/modify configurations. If you edit the configuration files directly, it will be overridden by the configs in the deployment.toml during server startup. Try adding the below values in deployment.toml found inside <APIM_HOME>/repository/conf/
[passthru_http]
'http.user.agent.preserve'=true

How to perform following changes in tomcat configuration in WSO2IS 5.9.0?

I am trying to make /oauth2/token API call from reactjs fronted and getting CORS error.
My friend asked the same question and got answer for the same also.
Please open the link for solution.
WSO2 IS returns CORS error when wrong credentials sent
But when I am trying to perform the same in WSO2IS 5.9.0 the configuration is getting overwritten to the default config.
How to perform this in 5.9.0 using deployment.toml file?
As I have mentioned in that earlier answer you need to add the given tomcat filter in the web.xml.j2 file in the path repository/resources/conf/templates/repository/conf/tomcat. The .j2 files will not get replaced by the deployment.toml at the server startup.

Usage of deployment.toml in wso2 apim 3.0.0

I want to deploy a gateway-worker profile for WSO2 APIM 3.0.0. As i understand, the new deployment.toml file is used to override all configuration files when the instance is started.
Is the shared DB required for a deployment of a gateway instance only, because toml overidding failed if I remove this database ? I was thinking that gateway doesn't required any database.
Why this toml file doesn't remove all not necessary datasources in master-datasources.xml, all datasources are still active with h2 even if they are not describe in the toml file ?
Thanks.
shared DB is required for the gateway in tenancy mode. Hence it is a required data source.
Default APIM distribution required both AM DB and Shared DB, hence only those data sources are defined in the TOML file. In profiles, some data sources can be removed. In order to configure the profile, you need to run the profile optimization tool[1]. Optimization tool will generate profile-specific TOML configuration with minimum required configuration.
[1] https://apim.docs.wso2.com/en/latest/SetupAndInstall/DeployingWSO2APIManager/DistributedDeployment/product-profiles/

WSO2 ESB Callout Mediator axis2Configuration

I have a question regarding the WSO2 ESB callout mediator using an individual Axis2 configuration file. I would like to have the individual Axis2 configuration to be deployed using a carbon application. Unfortunately the callout mediator doesn't seem to be able to read the Axis2 configuration from the registry. I'm getting an error that the file axis2_blocking_client_proxy.xml can't be resolved when I deploy the carbon application that contains the mediation with my callout mediator.
The deployment works when I Quote a relative file path that points to the configuration file. Does anybody know if there is a way to tweak carbon application files so that distinct resources will be written to a dedicated directory on the WSO2 ESB Server?
Best regards,
Heiko
AFAIU, your requirement is to deploy an axis2 configuration file using a CAR (carbon application) file. This is not a recommended approach. If you need to deploy a configuration file in to the ESB, you can deploy that during the server creation time. CAR files are used to deploy the actual implementation code rather than the static configuration files.