[Using Sakai] Sakai WS COnf.

Steve Swinsburg steve.swinsburg at gmail.com
Thu Jul 15 01:43:34 PDT 2010


You probably want either copySite or addNewSite. Check the docs on what each does. 

To add a quiz to a site via web services may be difficult. There was a thread about it a few days ago. There are no web services to do this yet. And no public API that will allow it out of a site context. However it can be done with some work, also in the other thread, so if you want to tackle this go for it and send patches!

~steve
[sent from my abacus]

On 15/07/2010, at 18:05, Jigar Joshi <jigarjm at gmail.com> wrote:

> Hi Steve,
> 
> Thank you. 
> I am done with login and registration call,
> now what i need to do is i want to create Quiz & Tests using WS,
> for that i need to create work site,
> i couldn't find any method like "createNewWorkSite" in SakaiScript.jws.
> 
> 
> 
> On Thu, Jul 15, 2010 at 7:10 AM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> Hi Jigar,
> 
> Great. For documentation, the two that you will use the most, if not exclusively, are SakaiLogin and SakaiScript. These have javadocs in the source, or here:
> https://source.sakaiproject.org/svn//webservices/tags/sakai-2.6.2/axis/src/webapp/SakaiScript.jws / SakaiLogin.jws
> 
> The other JWS scripts have been deprecated and in 2.8, removed from the deployment altogether.
> 
> cheers,
> Steve
> 
> 
> On 15/07/2010, at 3:03 AM, Jigar Joshi wrote:
> 
>> It worked.
>> One more thing Steve,
>> can you provide me any link to document which describes the 
>> 
>> Functionality of each WS EndPoint for each JWS available in 2.6.2
>> 
>> 
>> On Wed, Jul 14, 2010 at 6:54 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>> Hi Jigar,
>> 
>> The Axis code looks ok, but the sakai.properties need tweaking:
>> 
>> try:
>> webservices.allowlogin=true
>> webservices.allow = .*
>> 
>> ie all lowercase and no quotes around the true. This will also open it up to all IP addresses, so lock it down with the regex expression after you get it running.
>> 
>> You can also add:
>> webservices.log-allowed=true
>> webservices.log-denied=true
>> 
>> To add a bit more request logging output to the Tomcat logs so you can see what it's trying to do.
>> 
>> cheers,
>> Steve
>> 
>> 
>> 
>> 
>> On 14/07/2010, at 9:47 PM, Jigar Joshi wrote:
>> 
>>> I have setup Sakai 2.7 demo
>>> i have added followings to sakai.properties
>>> 
>>> webservices.allowLogin="true"
>>> webservices.allow = 127\.0\.0\.1,192\.168\.[3,6]\.\d+,m\.y\.i\.p
>>> 
>>> and now if i try to get 
>>> 
>>> myserver.com/sakai-axis/SakaiPortalLogin.jws
>>> or
>>> myserver.com/sakai-axis/SakaiPortalLogin.jws?wsdl
>>> 
>>> i am getting 404
>>> 
>>> code i have written to access login webservice is
>>> 
>>>  Service service = new Service();
>>> 
>>>             String id = "admin";
>>>             String pw = "admin";
>>> 
>>>             Call nc = (Call) service.createCall();
>>> 
>>>             nc.setTargetEndpointAddress("http://myserver/sakai-axis/SakaiPortalLogin.jws");
>>> 
>>>             nc.removeAllParameters();
>>>             nc.setOperationName("login");
>>>             nc.addParameter("id", XMLType.XSD_STRING, ParameterMode.IN);
>>>             nc.addParameter("pw", XMLType.XSD_STRING, ParameterMode.IN);
>>>             nc.setReturnType(XMLType.XSD_STRING);
>>> 
>>>             String results = (String) nc.invoke(new Object[]{id, pw});
>>>             System.out.println("sakai_session" + results);
>>> 
>>> 
>>> output i am getting
>>> 
>>> faultCode: {http://xml.apache.org/axis/}HTTP
>>>  faultSubcode: 
>>>  faultString: (404)Not Found
>>>  faultActor: 
>>>  faultNode: 
>>>  faultDetail: 
>>>         {}:return code:  404
>>> &lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.5.28 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 - &lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The requested resource () is not available.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache Tomcat/5.5.28&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;
>>>         {http://xml.apache.org/axis/}HttpErrorCode:404
>>> 
>>> (404)Not Found
>>>         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
>>>         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>>>         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>>         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
>>>         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
>>>         at org.apache.axis.client.Call.invoke(Call.java:2767)
>>>         at org.apache.axis.client.Call.invoke(Call.java:2443)
>>>         at org.apache.axis.client.Call.invoke(Call.java:2366)
>>>         at org.apache.axis.client.Call.invoke(Call.java:1812)
>>>         at com.mycompany.SakaiWSConsumer.App.main(App.java:31)
>>> 
>>> 
>>> 
>>> Please do the needful
>>> 
>>> 
>>> -- 
>>> Regards
>>> Jigar
>>> Programmer Analyst.
>>>  
>>> 
>>> _______________________________________________
>>> sakai-user mailing list
>>> sakai-user at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-user
>>> 
>>> TO UNSUBSCRIBE: send email to sakai-user-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>> 
>> 
>> 
>> 
>> -- 
>> Regards
>> Jigar
>> Programmer Analyst.
>>  
>> 
> 
> 
> 
> 
> -- 
> Regards
> Jigar
> Programmer Analyst.
>  
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20100715/24139c8a/attachment-0001.html 


More information about the sakai-user mailing list