Sakai web service gotchas
...
The following are a few tricks I've picked up - I spent ages trying to figure these out and must have gotten a few extra grey hairs along the way. Hoefully these will save your sanity
HTTP vs HTTPS in Using Web Services
I was having difficulties connecting to the SakaiLogin.jws?wsdl file. I was trying to connect through Perl and using the SOAP::Lite module.
...
That got me thinking and finally I came up with...
The solution
We have our server setup so that Apache hands off the requests to Tomcat that it needs to, with Apache running on the standard port 80 and Tomcat running on port 8080. When browsing via the web, I access Sakai through port 80, but under the hood, Apache is handing off the requests to Tomcat and connecting through port 8080. Because I wasn't going through Apache with this Perl script, I needed to add the port to the URL to connect directly through Tomcat so the URL becomes: http://myserver:8080/sakai-axis/SakaiLogin.jws?wsdl
After I did that, the requests went through fine. As for SSL, unless Tomcat handles the SSL I don't believe there is a way to connect via SSL to Tomcat - ie if Apache is handling the SSL, then I don't believe you can connect over https
Panel |
---|
From Seth Theriault: my $loginURI = "https://my.sakai.server/sakai-axis/SakaiLogin.jws?wsdl"; and see no problems. |
Thanks Seth. Maybe it was just the UNE server setup that was presenting difficulties for me?!
A caveat with Perl and Web Services
Some of the web services (which are written in Java and implemented through Apache Axis) require boolean data types to be passed to them. However, Perl has no pure boolean datatypes. Sure, there are ways within Perl to signal a true or false value, but this does NOT extend outside of Perl. So the problem arises when you need to pass a boolean data type to a web service written in Java.
...