[Using Sakai] Sakai WS COnf.

Steve Swinsburg steve.swinsburg at gmail.com
Wed Jul 14 06:24:13 PDT 2010


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
> <html><head><title>Apache Tomcat/5.5.28 - Error report</title><style><!--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;}--></style> </head><body><h1>HTTP Status 404 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource () is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.28</h3></body></html>
>         {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"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20100714/def67b83/attachment.html 


More information about the sakai-user mailing list