I would like to use email output event adapter in WSO2 BAM 2.5.0. So according to documentation I should go to Configure --> Output Event Adapters --> Add Output Event Adapter, but there is no email adapter in select list.
Why?
Where are output adaptors?
According to documentation there should be email, mysql, websocket etc. adapters.
Should I enable something in BAM configs files?
Or it just a bug, if yes, is there any patch?
Here is link to documentation: Output Event Adapters
The SOAP output event adaptor does not get loaded properly and this is a bug in this version. So you would need to remove the "org.wso2.carbon.event.output.adaptor.soap_1.0.2.jar" file from "repository/components/plugins" directory and restart the server. You should get the email output event adapter to work after doing this.
Related
I'm trying to enable a new post authentication handler in order to use the authenticated user info. I tried to follow this guide: https://docs.wso2.com/display/IS570/Writing+a+Post-Authentication+Handler#WritingaPost-AuthenticationHandler-ByreturningaPostAuthnHandlerFlowStatus using the sample code in https://github.com/wso2/samples-is/tree/master/etc/sample-post-authentication-handler
So I created the jar of sample-post-authentication-handler and i putted it in the dropins server folder, and disclaimer.jsp in the authenticationendpoint folder.
I run the server and I logged with a sample application, but the handler doesn't fire.
I tried to put logs on DisclaimerPostAuthnHandlerServiceComponent and DisclaimerPostAuthenticationHandler, I enabled the log4j log level of the package. In the end, I tried to log with system.out, but I never see in the server log something about the registration of the handler.
I think the DisclaimerPostAuthnHandlerServiceComponent is ignored, so the handler is not registered.
Where I'm wrong?
I'm using wso2 5.7.0 and I'm really new to wso2 and osgi.
Seems you have built the master branch source code https://github.com/wso2/samples-is/tree/master/etc/sample-post-authentication-handler and obtained the jar and tried to use it with IS-5.7.0
But, the samples are available in the master branch might not compatible with the previous releases due to dependency updates.
When I tried the sample-post-authentication-handler jar file built from the master branch, it won't get activated properly in IS-5.7.0. It's in installed state due to the failure of resolving required dependencies.
NOTE: Check the "Useful OSGi commands to debug" section of https://medium.com/p/482f6e5e3ea5 to understand how we can check whether the OSGi bundles are activated or not.
Can you try the sample-post-authentication-handler in tag v1.0.0? It's compatible with Is-5.7.0
https://github.com/wso2/samples-is/tree/v1.0.0/sample-post-authentication-handler/src/main
I am setting up the native windows Postman and trying to run the "Request Header" api provided in Postman Echo collection. I get the following error.
"Error: tunneling socket could not be established, statusCode=407"
I can see in the postman console that it is picking up the correct proxy server from environment. My proxy server requires authentication, how do I provide credential information. I tried to start Postman using the following command but it did not help.
postman.exe --proxy-server=userName:password#myproxy:8090
Unfortunately the proxy tab in Settings does not allow authenticated proxies.
Entering proxy info in the format "userName:password#myproxy" will cause everything before the '#' symbol to be removed.
You may already know, but since version 5.2, Postman includes a "Proxy" tab into the "Settings" section.
You should be able to configure your proxy on your system (if you are using Windows you can do it in Internet Options>>Connections>>LAN Settings) and then enable the "Use system proxy" in this tab.
After testing this method is helpful:
Windows- create a postman.bat file with the following content:
set HTTP_PROXY=http://USER:PASS#host:port
set HTTPS_PROXY=https://USER:PASS#host:port
start C:\path\to\Postman.exe
as I get this from here
In the "Global Proxy Configuration" section of the Proxy tab, setting the "Proxy Server" value to -
userName:password#proxyHost:proxyPort resolves the issue.
I could solve this problem for Postman and also for other local tools that are not capable of NTLM authentication against a proxy.
The solution is the open source proxy service/demon CNTLM that runs under Linux, macOS and Windows. The project has not been updated for a while but I could easily install and run it under Windows 10.
Best part is that it is able to check your proxy's capabilities and automatically find the latest NTLM version that the proxy supports.
http://cntlm.sourceforge.net/
You can add Proxy-Authorization header with value Basic base64encode($user:$password)
launch postman through :
vagrant#localhost:~/Downloads/Postman-linux-x64-7.6.0/Postman/app$ ./Postman
and set/unset proxy values
I make plug-in to jarfile. and I copy to jarfile in dropin folder. (reference https://docs.wso2.com/display/CEP410/Building+Custom+Event+Receivers)
I execute wso2 cep. command is './wso2server.sh -DosgiConsole'. and 'osgi > ss event-adaptor-name' checked ACITVE!
but WSO2 Management web page is not exist. 'Input Event Adapter Type' of my event is not exist.
I check to 'osgi > bundle event-adaptor-id'
The result is
No registered services.
How to registerd service in WSO2 CEP?
I use eclipse, not using maven. I use plug-in project.
Exposing Custom Event Receiver as an OSGI Service section in WSO2 CEP 4.1.0 documentation gives an example as how to register the custom adapter as an OSGI service.
With reference to the same document pointed above, following is the point where the custom adapter register itself under the OutputEventAdapterFactory service.
context.getBundleContext().registerService(OutputEventAdapterFactory.class.getName(),
emailEventAdaptorFactory, null);
If it is successfully registered, you will see "osgi > bundle event-adaptor-id" result as something similar to:
osgi> bundle org.wso2.carbon.event.output.adapter.email
org.wso2.carbon.event.output.adapter.email_5.0.10 [215]
Id=215, Status=ACTIVE Data Root=/home/userx/wso2cep-4.1.0/repository/components/default/configuration/org.eclipse.osgi/bundles/215/data
"Registered Services"
{org.wso2.carbon.event.output.adapter.core.OutputEventAdapterFactory}={service.id=117}
(please note that I have not posted the complete output above, for the sake of clarity of the answer)
I try to use WSO2 ESB at workplace where Proxy Server is available.
Set Proxy Server settings in axis2.xml,
Install certificate.
Initialize Salesforce connector(Salesforce certificate has been installed).
Test the API, run into an exception - SOAPProcessingException,
Really appreciate if someone can give ideas of solution.
First of all I have tried this type of a scenario using WSO2 ESB 4.9.0 and which was perfectly working fine. By looking at your error messages I can see that there was an Authentication failure, hence Sales Force end point returns some HTML error message. The ESB tries to build this HTML error message using the SOAP builder leading to this situation.
This could be due to some missing configuration in your setting. You may follow [1] to enable HTTP Proxy to Sales Force. Then to setup Sales Force [2] will be helpful.
Couple of thing I need to highlight here. Did you import the Salesforce certificate into the ESBs client trust store using the keytool import command. If not please go ahead and do so. Also is there a particular reason for you to use NHTTP transport here. Ideally we would use Passthrough transport to add the proxy host as given in [1].
If you still get the error after following the above steps please enable the wirelogs and post it here to investigate further. Follow these steps to enable wirelogs.
Open log4j.properties file from a text editor.
log4j.properties file is located in $ESB_HOME/repository/conf directory.
Un-comment the following entry.
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Hope this helps you.
[1] https://docs.wso2.com/display/ESB470/Enabling+SSL+Tunneling+through+a+Proxy+Server
[2]https://docs.wso2.com/display/ESBCONNECTORS/Working+with+Salesforce+Connector+Operations
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