Re: [Dev] [IS] Accessing a SOAP Web Service from a JSP
Hi johan, As per the conversation I had with team/you, I will go ahead an implement REST services. Thanks. On Wed, Jan 21, 2015 at 10:33 AM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi Johan, On Wed, Jan 21, 2015 at 1:18 AM, Johann Nallathamby joh...@wso2.com wrote: On Tue, Jan 20, 2015 at 10:02 PM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. What's the requirement to implement SOAP service ? why not REST ? Don't need to use SOAP services unnecessarily. I already have a SOAP service component to initiate the TOTP authentication from jaggery layer. On the Dashboard/User_Profile UI, I have put the option to enable TOTP authentication, that function needs a SOAP service to Initiate TOTP. Since already there is a soap service component, I put the GenerateTOTPToken service to that component as a soap service too. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. This means you are having your authenticator specific logic in authenticationendpoint which should not be the case. Noted, I have actually created a client class to call the stub. That client class is in the authenticationendpoint. I'll discuss about this with the team how to do it properly. Any comments about this approach ? Is there a better way of doing this ? You should be able to just hit the regular /commonauth servlet using ajax and handle it in the authenticator like any other login response handling flow. It is no different I guess except the response from the authenticator will be a 200 OK instead of usual 302 Redirect. I'm using the ajax call only to generate the TOTP token. The totp authentication process is handled through the commonauth servlet. If you are suggesting I can do the token generation also through commonauth servlet then i'm not clear about it. Thanks. -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com -- Thanks Regards, *Johann Dilantha Nallathamby* Associate Technical Lead Product Lead of WSO2 Identity Server Integration Technologies Team WSO2, Inc. lean.enterprise.middleware Mobile - *+9476950* Blog - *http://nallaa.wordpress.com http://nallaa.wordpress.com* -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [IS] Accessing a SOAP Web Service from a JSP
Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. Any comments about this approach ? Is there a better way of doing this ? -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [IS] Accessing a SOAP Web Service from a JSP
adding johann... On Tue, Jan 20, 2015 at 10:02 PM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. will it be possible to use separate UI component rather accessing back end service from Servlet inside *authentication.endpoint*? AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. Any comments about this approach ? Is there a better way of doing this ? -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Gayan Gunawardana Software Engineer; WSO2 Inc.; http://wso2.com/ Email: ga...@wso2.com Mobile: +94 (71) 8020933 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [IS] Accessing a SOAP Web Service from a JSP
Hi Gayan , On Tue, Jan 20, 2015 at 11:46 PM, Gayan Gunawardana ga...@wso2.com wrote: adding johann... On Tue, Jan 20, 2015 at 10:02 PM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. will it be possible to use separate UI component rather accessing back end service from Servlet inside *authentication.endpoint*? The jsp through which i'm sending the AJAX request is the main UI of the totp authenticator. Therefore AFAIK can't implement a seperate UI component for this AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. Any comments about this approach ? Is there a better way of doing this ? -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Gayan Gunawardana Software Engineer; WSO2 Inc.; http://wso2.com/ Email: ga...@wso2.com Mobile: +94 (71) 8020933 -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [IS] Accessing a SOAP Web Service from a JSP
Hi Johan, On Wed, Jan 21, 2015 at 1:18 AM, Johann Nallathamby joh...@wso2.com wrote: On Tue, Jan 20, 2015 at 10:02 PM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. What's the requirement to implement SOAP service ? why not REST ? Don't need to use SOAP services unnecessarily. I already have a SOAP service component to initiate the TOTP authentication from jaggery layer. On the Dashboard/User_Profile UI, I have put the option to enable TOTP authentication, that function needs a SOAP service to Initiate TOTP. Since already there is a soap service component, I put the GenerateTOTPToken service to that component as a soap service too. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. This means you are having your authenticator specific logic in authenticationendpoint which should not be the case. Noted, I have actually created a client class to call the stub. That client class is in the authenticationendpoint. I'll discuss about this with the team how to do it properly. Any comments about this approach ? Is there a better way of doing this ? You should be able to just hit the regular /commonauth servlet using ajax and handle it in the authenticator like any other login response handling flow. It is no different I guess except the response from the authenticator will be a 200 OK instead of usual 302 Redirect. I'm using the ajax call only to generate the TOTP token. The totp authentication process is handled through the commonauth servlet. If you are suggesting I can do the token generation also through commonauth servlet then i'm not clear about it. Thanks. -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com -- Thanks Regards, *Johann Dilantha Nallathamby* Associate Technical Lead Product Lead of WSO2 Identity Server Integration Technologies Team WSO2, Inc. lean.enterprise.middleware Mobile - *+9476950* Blog - *http://nallaa.wordpress.com http://nallaa.wordpress.com* -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [IS] Accessing a SOAP Web Service from a JSP
On Tue, Jan 20, 2015 at 10:02 PM, Lasitha Wattaladeniya lasit...@wso2.com wrote: Hi All, I'm developing a TOTP authenticator as my training project. In that I had a requirement to implement $Subject. The requirement is to access the soap service through a AJAX call from a jsp. What's the requirement to implement SOAP service ? why not REST ? Don't need to use SOAP services unnecessarily. Currently what I'm doing is, Created a Stub component to access the soap service and call that Stub from a Servlet inside *authentication.endpoint* component. AJAX request is sent to an endpoint where it's mapped to a Servlet. Servlet initiates the call to the Stub. This means you are having your authenticator specific logic in authenticationendpoint which should not be the case. Any comments about this approach ? Is there a better way of doing this ? You should be able to just hit the regular /commonauth servlet using ajax and handle it in the authenticator like any other login response handling flow. It is no different I guess except the response from the authenticator will be a 200 OK instead of usual 302 Redirect. -- Lasitha Wattaladeniya Software Engineer WSO2, Inc. | http://wso2.com lean. enterprise. middleware Mobile : +94719397528 Blog : techreadme.blogspot.com -- Thanks Regards, *Johann Dilantha Nallathamby* Associate Technical Lead Product Lead of WSO2 Identity Server Integration Technologies Team WSO2, Inc. lean.enterprise.middleware Mobile - *+9476950* Blog - *http://nallaa.wordpress.com http://nallaa.wordpress.com* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev