WSO2 ESB Callout Mediator axis2Configuration - wso2

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.

Related

WSo2 - Enterprise Integrator 6.4.0 - SNMP Listening Connector

NewBie here. I am struggling with adding SNMP connector to my ESB project. As per https://docs.wso2.com/display/ESBCONNECTORS/Configuring+SNMP+Inbound+Operations
Step1) I created folders and added files to /home/repository/components/dropins
and home/repository/components/libs
Step2) I then created inbound-endpoint for SNMP in my EI editor.
since my inbound Endpoint editor design layout looked different from wso2 tutorial i mentioned above, I copied Inbound Configuration from tutorial.
Step3) I also went ahead and created sequence as request.xml [took code from tutorial]
When I deployed my Inbound EP and sequence, I am getting
ERROR - GenericEventBasedListener Class org.wso2.carbon.inbound.snmp.SNMPListeningConsumer not found. Please check the required class is added to the classpath.
**java.lang.ClassNotFoundException: org.wso2.carbon.inbound.snmp.SNMPListeningConsumer cannot be found by synapse-core_2.1.7.wso2v80**
What else should I do to get my SNMP files in to classpath? I have restarted my server and SNMP connector is available on the Palette in EI 6.4.0.
The above ClassNotFoundException should be a result of not having the correct classes in the OSGi layer upon server startup due to missing JAR files. The following JAR files should be available in the EI server in the corresponding folders and the server needs to be restarted.
org.apache.synapse.snmp.listen.class-x.x.x.jar - <EI_HOME>/dropins
snmp4j-x.x.x.jar - <EI_HOME>/lib
The dropins directory should contain only the OSGi bundles and the lib directory should have the NON-OSGi bundles. Upon server startup even the NON-OSGi JAR files will be converted to OSGi with a corresponding JAR file in the dropins directory.
The best way to troubleshoot this kind of a ClassNotFoundException is to access the OSGi console of WSO2 carbon-based products. Any unsatisfied constraints of the OSGi bundle can be identified easily with a couple of commands as explained in https://movingaheadblog.blogspot.com/2014/01/how-to-debug-wso2-carbon-products-using.html

Can WSO2 API Manager send JMS messages to TIBCO EMS Server directly (No ESB in between)? How?

I'm trying to understand if and how is possible to send a JMS message to TIBCO EMS Server using WSO2 API Manager without using the WSO2 ESB in between.
The Pattern 1 of this article: http://wso2.com/library/articles/2015/10/article-how-to-enable-wso2-api-manager-to-work-as-a-jms-producer/ does something similar but for Apache ActiveMQ.
Is this possible? Any hint? Article?
Thanks in advance,
Gianfranco
EMS is a JMS provider like ActiveMQ.
The feature list mention : Maps between HTTP(s) and other protocols, such as JMS or writing to file systems.
You can ix the article you already have with JMS examples from the sample folder on a typical EMS installation.
I think the code will be mostly the same... but your are going to depend on jar provided inside the EMS installation.
You can follow the instructions here to configure the APIM[1] axis2.xml file.
As for placing the jars you need to do the following:
In the APIM_HOME/lib/endorsed folder delete the geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
Add the jms-2.0.jar to the APIM_HOME/lib/endorsed folder
Add the tibjms.jar in the APIM_HOME/repository/components/libs folder.
[1] https://docs.wso2.com/display/Ei620/Configure+with+Tibco+EMS

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 Identity Server and Web Service Client

I'm refering to the following article
http://wso2.com/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform/
I would like to use the sample echoService from the WSO2 AS over a secured proxy in WSO2 ESB in combination with the Identity Server for fine-grained authorization. All the settings mentioned on this page seem to work, however I am stuck concerning the client part. I use NetBeans and the given client code, but the .jars in the classpath there have older versions then the ones in the current version of WSO2 IS, so I started to exchange them manually. Now I get some exceptions like
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init()V
and I am stuck again. I just want to test the echoService in this constellation and send some string over the ESB via IS and receive the response(if I have the appropriate role) from the AS, is there not another client or how could I test it else?
Thank you!
I can suggest you 3 options:
Use SoapUI to test the service which is the easiest way to test a web service.
Generate the stub for the service and have stub as the dependency in your client. You can use the WSDL2Java tool that ship with AS. Loging to AS --> Tools in left pane --> WSDL2Java --> Provide the wsdl URL and generate the stub jar.
Generate correct dependency libs. Go to [IS-Home]/bin folder, and issue that command "ant" to run the build.xml, this will copy all required libs to [IS-HOME]/repository/lib/ folder. Have them in your class path.

WSO2 Greg and ESB integration samples

I am attempting to use Greg to hold endpoint URL's for services deployed into non-WSO2 containers (Weblogic/JBoss). I would like to use WSO2 ESB to perform mediation and routing of data through these endpoints.
However, when I look at the WSO2 ESB samples, it is not clear how I instruct the ESB to use WSO2's Greg. Below is the xml used to have the ESB use a registry deployed to the filesystem.
<definitions xmlns="http://ws.apache.org/ns/synapse">
<registry provider="org.wso2.carbon.mediation.registry.ESBRegistry">
<parameter name="root">file:./repository/samples/resources/</parameter>
<parameter name="cachableDuration">15000</parameter>
</registry>
</definitions>
My assumption is that the registry tag's provider element should probably be able to be overridden with a web-service address providing access to Greg.
When all is said and done, I would like to create simple BPMN configuration files that connect to Greg, obtain URI's and URL's for the services used by the file, and then to reference them as properties later in the BPMN route.
First question, is this a standard configuration, or is there a better way to integrate WSO ESB and Greg.
Second question, are there any examples I could refer to that will answer this question?
Please refer following documentation.
[1] http://wso2.org/library/tutorials/2010/04/sharing-registry-space-across-multiple-product-instances
[2]http://docs.wso2.org/wiki/display/ESB460/Storing+Various+WSO2+Enterprise+Service+Bus+Configurations
Those include how you can store and using WSO2 governance registry in highlevel.
If you need to manage endpoints through API in governance registry following will help.
[3] http://docs.wso2.org/wiki/display/Governance453/Endpoints+with+Governance+API
[4] http://docs.wso2.org/wiki/display/Governance453/Endpoint+Look-up+Sample
Futher this thread include some of the hints how you can access custom stored properties in Registry
[5]How to access system property from WSO2 ESB and Registry
WSO2 Governance Registry is a meta data repository, therefore you can use it to store the SOA artifacts (WSDL,Schems,Policies, Mediation configurations , customs artifacts ..etc) of your deployment. After that you can govern those artifacts through the Governance Registry. You can find more details in the ESB documentation[1].
[1]http://docs.wso2.org/wiki/display/ESB460/Config+and+Governance+Partitions+in+a+Remote+Registry
Thanks & Regards,
Ajith