WSO2 ESB Lesson Two: Mediating Messages - wso2

Stuck at first hurdle.
Just installed WSO2 ESB, & tried to run through the starter tutorial, but the axis2 server fails to start. on issuing "%JAVA_HOME%\bin\java" -Xms256m ... (within bat) the jre just issues the usage statement as if the arguments were bad. Nothing looks obviously wrong, though I think there is an extra \ in -repo "%AXIS2_HOME%\repository" but fixing has no effect.
WSO2 itself starts but just cant do anything with it, especially if I cant I work through the samples.

There's a small configuration fix required to run this in ESB 4.9.0. You can find the fix in this jira ticket.

Related

WSO IS 5.3.0: user dashboard not working out of the box

I'm evaluating WSO2 identity server for a customer of mine and currently we ponder whether to write our own user dashboard or use WSO2's version of it.
According to WSO 5.3.0 it's as easy as opening /dashboard. I don't find anything about how to install or enable the user dashboard and I didn't find a module I could install. Therefore I think that this should work out of the box. Yet, when I open the URL I get an error:
HTTP Status 500 - org.mozilla.javascript.EcmaError: ReferenceError:
"readFile" is not defined. (/dashboard//login.jag#47)
type Status report
message org.mozilla.javascript.EcmaError: ReferenceError: "readFile"
is not defined. (/dashboard//login.jag#47)
description The server encountered an internal error that prevented it
from fulfilling this request. Apache Tomcat/7.0.73
I tried to find the cause of this issue but the log files are in no way more verbose and after looking at the includes of login.ja redFile seems to be defined.
Can anybody please point me towards something that helps me solve this issue?
Thanks in advance!
For some reason (that are still to explore) three modules that were in the installation archive were missing from the actual installation. The modules were: caramel, handlebar and markdown. After installing them from the archive the dashboard started working.
Installing caramel only didn't work and my guess is that markdown is not necessary to run the dashboard but I might be wrong.
I found that is does not work with Safari. Identity Manager does.
I originally tried it on MacBook pro.
When I tried it with Chrome all is well.

Configuring WSO2 Identity Server as Key Manager with API Manager

I'm looking for some guidance about two specific WSO2 products, API Manager and Identity Server and for the best solution to solve the problem I'm going to explain below.
In my company, we are using ADFS 3.0 for Single Sign On support in our applications. However we are now building applications that will require OpenID Connect Specification (SPA's+Rest API's) and ADFS does not support this out of the box so we've decided to use WSO2 products for that purpose.
I already managed to install WSO2 Identity Server 5.0.0 SP1 and configured ADFS as a federated Identity Provider (the new applications will still have to authenticate users using ADFS). I also installed WSO2 API Manager 1.9.1 and configured it to use WSO2 Identity Server as the Key Manager (Configuration tutorial).
Now the problem:
Using WSO2 Identity Server 5.0.0 SP1 I couldn't get the Logout feature to work due to the issue reported here. It seems that this issue has been solved in version 5.1.0M4 so I tried to install version 5.1.0-alpha and managed to make the logout to work with ADFS (I tested it by enabling SSO for the carbon administration). However, now I'm not able to install the Key Manager feature through the carbon repositories due to incompatibilities.
As a result, with the first combination (wso2is 5.0.0 SP1/wso2am 1.9.1) I had the logout issue with ADFS and with the second combination (wso2is 5.1.0-alpha/wso2am 1.9.1), I'm not able to install the Key Manager feature in Identity Server.
Is there any way to apply a patch to solve the logout issue in the first combination? Is there a way to install the key manager feature on WSO2IS 5.1.0-alpha? Or can someone point me to another solution to solve this issue?
The issue you pointed above, marked as it type as "Patch". Usually that means WSO2 have fixed this issue for a earlier version and provided a patch to its customer. Easiest thing would be, if you are already a customer of WSO2 ask for the patch directly from their support.
If you are not a paid customer of WSO2 you are in bit of a trouble. As per this question, the source of the Service Pack also not available in public.
But luckily in your case, the component which need to have this fix not a core component. So you wouldn't be in trouble if you change the authenticator code bit. But the warning is, it would lose any fixes done for org.wso2.carbon.identity.application.authenticator.samlsso_4.2.1.jar in the service pack.
Anyway, these are the steps you should follow.
Checkout the source. Lazy path would be checkout the whole source from here. That is the most easy way which you will face less troubles when you try to build the source but the downside of that is, it would take bit of time to checkout. If you know how to build specific component from WSO2 source, you can directly checkout component it needed to changed.
Try to build the component without doing any change just to make sure there are not any issues upto this point.
Goto the class DefaultSAML2SSOManager and do the same change done in the PR.
Build the component again.
Create folder named like "patch9000" inside the <IS_HOME>/repository/components/patches/ folder.
Copy build jar (org.wso2.carbon.identity.application.authenticator.samlsso-4.2.1.jar ) in step 4 from the target folder to the <IS_HOME>/repository/components/patches/patch9000 folder.
Restart the server. If you have done everything to the point, in the server startup it would print a log like, org.wso2.carbon.server.extensions.PatchInstaller - Patch changes detected
Now retry the your flow and it would work as expected.
If you too lazy to do all above, you can wait until Identity Server Service Pack 2, which will have your fix.

Gdata authorization errors

I have installed the google data python library in order to connect to google docs through python. The problem is that I am constantly getting a 401 error, while running the ./samples/docs/docs_example.py (as suggested on https://developers.google.com/gdata/articles/python_client_lib?csw=1#library) saying that authorization is required. But this is really strange, because I ran the tests using ./tests/run_data_tests.py and everything seemed to be fine (no errors here). Also I put in the right credentials of my google account, while running docs_example.py.
Has someone came across this issue before, or does somebody know a solution??
Tnx for your help.

Wso2 ESB don't deploy car

I am trying to remove the car of an Aplication.
I removed the .car by management console and removing the file in wso2esb-4.0.3/repository/deployment/server/carbonapps but wso2 dont put nothing in the log and dont remove the artifacts, I cant shutdown the server.
When I remove de .car and upload the file again the server dont re-deploy anything
The initial problem was that some artifacts had disapeared from management console, but the .car was deployed, a other instance of the .car are in the temp directory.
This was a known issue [1] and fixed from WSO2 ESB 4.5.0. I think its recommended to use the latest version of the product since in that case many bugs fixed and many new features are added to the product. You can find the latest distribution of WSO2 ESB 4.7.0 latest release here [2]
Hope this will help you.
[1] https://wso2.org/jira/browse/ESBJAVA-940
[2] http://wso2.com/products/enterprise-service-bus/
We had this problem too. It can also happen when you have deactivated a proxy within the web console.
Be sure all components from the specific .car file are running.
Uninstall the application (within the web-console)
Wait until all components are gone
If this is not working - you need to stop the server and remove all components (from that .car) from the file system manually. We did that a couple of times and it worked. (search for all affected components and remove them).
We finally solved the issue by upgrading to a new version of WSO2 ESB.

CXF Web Service Error - javax.xml.ws.soap.SOAPFaultException: Unconnected sockets not implemented

I get the following error when attempting to connect to a web service via SSL.
javax.xml.ws.soap.SOAPFaultException: Unconnected sockets not implemented
I had trouble finding the answer to this question. Hopefully this will help anyone else who runs into this issue.
If someone wants to copy / paste this answer I'll accept it.
CXF + SSL doesn't work with the latest jdk1.6.0_10, I downloaded jdk 1.5
and it all worked fine, and then I tried jdk1.6.0_06 and it worked fine.
(Some where along the line I upgraded to _10 in attempts to fix some other
jvm crashes I had with eclipse and I'd forgotten I'd done that.)
Referenced
This has also been fixed in all the recent releases of CXF. I'd suggest also upgrading your CXF version.