[Building Sakai] websvc authentication from python fails

Gregory Guthrie guthrie at mum.edu
Thu May 30 20:01:26 PDT 2013


Good idea - thanks, should have thought of that myself!  :-)



Yes, works on the host machine.

   http://localhost/ works fine, brings up Sakai login page.

And also:

   http://localhost/sakai-axis/SakaiLogin.jws?wsdl  works.



That implies that jws answers on the same port as the HTML (:80 in my case).



Also wget & browser access of that URL from remote Windows machine works.



But Python test-connection.py from that same machine fails;

   urllib2.URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>



I'm not sure of two things;

1)     Does the message mean the webService was refused, or that it worked, but refused the login (user/password) attempt?

2)    I have logging set in sakai.properties, where does it log to?

sakai.properties:webservices.allow=.*

sakai.properties:webservices.allowlogin=true

sakai.properties:webservices.log-allowed=true

sakai.properties:webservices.log-denied=true



I say worked; meaning it gave back a lot of XML description of the interface:

SakaiLogin.jws at wsdl



<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions targetNamespace="http://localhost/sakai-axis/SakaiLogin.jws"

xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost/sakai-

axis/SakaiLogin.jws" xmlns:intf="http://localhost/sakai-axis/SakaiLogin.jws"

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<!--WSDL created by Apache Axis version: 1.4

Built on Apr 22, 2006 (06:55:48 PDT)-->

   <wsdl:message name="loginToServerRequest">

      <wsdl:part name="id" type="xsd:string"/>

      <wsdl:part name="pw" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="logoutResponse">

      <wsdl:part name="logoutReturn" type="xsd:boolean"/>

   </wsdl:message>

  <wsdl:message name="logoutRequest">

      <wsdl:part name="sessionid" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="loginToServerResponse">

      <wsdl:part name="loginToServerReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="loginRequest">

      <wsdl:part name="id" type="xsd:string"/>

      <wsdl:part name="pw" type="xsd:string"/>

   </wsdl:message>

... etc...



-------------------------------------------

> -----Original Message-----

> From: John Bush [mailto:john.bush at rsmart.com]

> Sent: Thursday, May 30, 2013 5:25 PM

> To: Gregory Guthrie

> Cc: sakai-dev at collab.sakaiproject.org

> Subject: Re: [Building Sakai] websvc authentication from python fails

>

> So start with the obvious, are you sure you have webservices enabled, and everything is

> working correctly on the sakai side.  Try just hitting the soap service in your browser or

> using wget/curl from where ever you are trying to run your python code.

>

> http://localhost:8080/sakai-axis/SakaiLogin.jws?wsdl

>

> On Thu, May 30, 2013 at 10:25 AM, Gregory Guthrie <guthrie at mum.edu<mailto:guthrie at mum.edu>> wrote:

> > I asked this before, but since not resolved will check again;

> >>

> > I am trying to do a programmed login using python as described in

> > (https://confluence.sakaiproject.org/display/WEBSVCS/WS-Python );

> >

> > but it fails, just does a timeout.

> >> >

> > I am not sure how to debug, does Sakai keep log files(s) for such things?

> > Anyone else get this to work, or an alternative? (I have not tried the

> > perl scripts, since the rest of my application is in Python).

> >

> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130530/5fea5607/attachment.html 


More information about the sakai-dev mailing list