WSO2 - How to use Endpoint in Registry resource project - wso2

I'm using WSO2 Intergration 6.6.0 , my attention : I want multiple projects can use/reuse Endpoint in registry resource project , is it possible ?
I created a registry resource project with 1 HTTP Endpoint , created a composite application archive including registry resource project and upload it to ESB server successfully.
But I don't know how to use/import this endpoint in a project.
Please help.

If your endpoint exists in a registry you can use it like
<call>
<endpoint key="gov:/endpoints/endpoint.xml"/>
</call>
In this example I used endpoint stored in governance registry in endpoints directory named endpoint.xml.

Related

Cannot browse the h2 database from a web browser in WSO2 api manager

I am trying to browse local H2 db for WSO2 api manager. I made the change in the WSO2_HOME/repository/conf/carbon.xml. I added below configuration.
<H2DatabaseConfiguration>
<property name="web"/>
<property name="webPort">8082</property>
<property name="webAllowOthers"/>
</H2DatabaseConfiguration>
After I restart WSO2 api server the change in the file WSO2_HOME/repository/conf/carbon.xml gets lost. As a result I am not able to connect to H2 db. I am working on version WSO2 3.0.0.
In WSO2 APIM 3.0.0, the configuration model is different. You need to add the following to ../repository/conf/deployment.toml
[database_configuration]
enable_h2_console = true
Ref: https://apim.docs.wso2.com/en/latest/Reference/ConfigCatalog/#enabling-the-h2-database-console
In addition to Bee's answer it is important to mention that we also need to provide proper jdbc URL for that
copy the location of the <API_Manager_home>/repository/database/[databaseName] (here do not copy .mv part i.e extension part)
for me the JDBC URL was jdbc:h2:/Users/akshay/code/w/98/98_base_1/repository/database/WSO2AM_DB
default username and password is wso2carbon/wso2carbon

Error while installing apps from WSO2 app manager

I am trying to install apps using wso2 app manager, but its not actually getting installed on my device. I am attaching the log below
You can install apps on your device with APP Manager(APPM) and Enterprise Mobility Manager(EMM)combination. Follow below steps to integrate those two products and install apps on your device through app manager. These steps were extracted from here
There are two separate cases for APPM and EMM integration
APPM and EMM on a single JVM. ex : EMM standalone pack.
APPM and EMM on separate JVMs. ex : clustered scenario
For the first case, EMM standalone vanilla pack should work without changing any configuration.
For the second case, There are some configurations which should be done. Follow the below steps to configure APPM and EMM on a separate JVMs.
If you run APPM and EMM on same machine change the port offset of one pack. Let's change the port offset of APPM pack.
i) Change the port offset of carbon.xml to 10 which is in /repository/conf directory.
ii) Since APPM default authentication mechanism is SAML SSO change the port of IdentityProviderUrl also in app-manager.xml
<!-- URL of the IDP use for SSO -->
<IdentityProviderUrl>https://localhost:9453/samlsso</IdentityProviderUrl>
<Configurators>
<Configurator>
<name>wso2is</name>
<version>5.0.0</version>
<providerClass>org.wso2.carbon.appmgt.impl.idp.sso.configurator.IS500SAMLSSOConfigurator</providerClass>
<parameters>
<providerURL>https://localhost:9453</providerURL>
<username>admin</username>
<password>admin</password>
</parameters>
</Configurator>
</Configurators>
</SSOConfiguration>
iii) Change the port offset to 9453 for all the ports found in sso-idp-config.xml which is located in /repository/conf/identity directory.
Now setting port offset is done.
Now create a mobile app by going to App Manager publisher. publish it and it will be available in APPM store.
Create an OAuth application in EMM by following article How to map existing oauth apps in wso2.
Open the app-manager.xml in APPM and find for a configuration called MobileAppsConfiguration. change ActiveMDM property to WSO2MDM.
ex: WSO2MDM
Change the MDM properties named as WSO2MDM as follows. Change the port to EMM port of ServerURL and TokenApiURL. Here client key and client secret is which returned from EMM when OAuth application is created.
<MDM name="WSO2MDM" bundle="org.wso2.carbon.appmgt.mdm.restconnector">
<Property name="ImageURL">/store/extensions/assets/mobileapp/resources/models/%s.png</Property>
<Property name="ServerURL">https://localhost:9453/mdm-admin</Property>
<Property name="TokenApiURL">https://localhost:9453/oauth2/token</Property>
<Property name="ClientKey">veQtMV1aH1iX0AFWQckJLiooTxUa</Property>
<Property name="ClientSecret">cFGPUbV11yf9WgsL18d1Oga6JR0a</Property>
<Property name="AuthUser">admin</Property>
<Property name="AuthPass">admin</Property>
</MDM>
Enroll your device in MDM.
Now you can install apps using app manager store to devices enrolled in EMM.

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.

Deploying .car file (packaged with .war file) in wso2 server

I am trying to deploy carbon archieve file (*.car) in wso2 ESB server.For this purpose First I am creating carbon application project in my wso2 dev studio.Then after selecting this project tried to create a web application(war file).But not able to see in the context menu options either to create a new war file or to import an existing war file.
Can somebody clarify me is it possible to deploy .war file (packaged as .car file) in the wso2 ESB server? (After configuring the server role for Application Server in the WSO2 ESB).
WSO2 ESB (Enterprise Service Bus ) is middle-ware product which is used for message routing , mediation and transformation etc. I think you can use WSO2 Application Server for deploying WAR file and use as Web/application server in your back-end.
You can download WSO2AS from http://wso2.com/products/application-server/
Also how to deploy WAR file in WSO2AS is explained here.
http://wso2.com/library/articles/2012/09/develop-deploy-web-applications-using-wso2-developer-studio/

WSO2 ESB 4.5.0 fails to create proxy service from governance registry

I have WSO2 ESB and WSO2 GREG running with registry being mounted to ESB instance.
While trying to create Loging proxy service I picked up the WSDL from registry. The WSDL has a schema import which it depends on. However ESB fails to resolve the schema location trying to find it on the local FS.
Screen here
Logs here.
Can this be overcame? Or that's another bug for WSO2?
Thanks,
Vladimir.
Use exactly the same "SchemaLocation" attribute value used in your WSDL in the "SchemaLocation" attribute of the "resource" element of the "publishWSDL" option.
For example, if the WSDL has a the schema imported as,
<schema namespace="some_namespace" schemaLocation="./TestSchema.xsd">
Then the "schemaLocation" attribute of the "resource" tag should also have the same as mentioned below.
<resource schemaLocation="./TestSchema.xsd" ...>