[Building Sakai] Requesting for help to access CXF web services

Uday Ghattamaneni ghattamaneni.uday at gmail.com
Tue Dec 16 07:00:03 PST 2014


Hi Chaitanya,

Below is the sample JSP code for login. You have to include necessary jar
files to classpath make it work.

<%@ page
import="org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory" %>
<%@ page import="org.apache.cxf.endpoint.Client" %>
    <%
        try {
            JaxWsDynamicClientFactory dcf =
JaxWsDynamicClientFactory.newInstance();
            Client client = dcf.createClient("
http://localhost:8080/sakai-ws/soap/login?wsdl");
            String pw = request.getParameter("passwd");
            String user = request.getParameter("userName");

            Object[] res = client.invoke("login", user, pw );

            out.println("Session ID: "+res[0]+"<br/>");


        } catch (Exception e ) {
            pageContext.setAttribute("ex",e);
            out.print("Error!! "+e);
            e.printStackTrace();
        }
    %>




-Uday

On 16 December 2014 at 09:12, Chaitanya Cheekate <
chaitanya.cheekate at vidyayug.com> wrote:
>
> Hi All,
>
> Can anybody give me an example on how to access sakai CXF web services(for
> ex: login). I would like to rewrite the sakai connector portlet with CXF.
> I tried to follow tutorials on the web but no luck.
>
>
> --
> Thanks.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20141216/c213e937/attachment.html 


More information about the sakai-dev mailing list