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

Chaitanya Cheekate chaitanya.cheekate at vidyayug.com
Tue Dec 16 20:45:06 PST 2014


It worked. Thank you very much.

On Tue, Dec 16, 2014 at 8:30 PM, Uday Ghattamaneni <
ghattamaneni.uday at gmail.com> wrote:
>
> 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"
>>
>

-- 
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20141217/705d7213/attachment.html 


More information about the sakai-dev mailing list