Skip to Content
avatar image
Former Member

Web Service Client in WebDynPro and SAP Logon Ticket

Hello,

I have a web service enabled EJB application running on WAS 6.40 SP9 and a WebDynPro client application using this web service (imported as a web service model). Both are running on the same app server.

The problem is that I want to secure the web service and need user credentials to access some backend functions, therefore I think the best way is to authenticate against the web service using SAP Logon ticket created when the user authenticates on the webdynpro logon screen.

By no means I have been able to make it work, so far all I can do is set the web service for HTTP basic authentication and pass a fixed user id and password from webdynpro. This is not what I need.

Documentation is very limited about using SAP Logon ticket with web services and did not find any example to realize this from WebDynPro.

SSO Ticket generation works perfectly between SAP Portal and WebDynPro. Just can't pass it over to web service.

I tried almost any combination of authentication settings both on the web service side and in the imported model in webdynpro client application.

Can anybody give some guidelines on how to achieve this and / or where to look for how to's?

Thanks in advance!

Regards,

Vitaliano

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 07, 2005 at 05:06 AM

    Hi,

    a lot of information available on Web services on the Web Service Homepage on the SAP Developer Network (SDN): https://www.sdn.sap.com/sdn/developerareas/webservices.sdn?node=linkDnode6-1.

    Particularly useful might be

    1) the recordings of last year's TechEd workshops (contain overview sections as well as demos): https://www.sdn.sap.com/sdn/events.sdn?page=teched04_sessions.htm. Choose "ABAP Development" (resp. "Java Development") --> "Intermediate Courses" --> "Utilizing Web Services with ABAP (resp. Java) and SAP Web Application Server"

    2) the e-learning section: https://www.sdn.sap.com/sdn/developerareas/webservices.sdn?page=el_ws.htm

    http://help.sap.com/sapdocu/netweaver/webas/630/helpdata/EN/ab/c955e2e2d24a888127f211f2d5043f/content.htm>

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using sap logon tickets for sso to microsoft-based web applications.pdf

    Hope this helps

    Regards,

    RK

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Nils,

      I was hoping this issue to be just my misunderstanding on SSO usage from webdynpro but it seems this is a webdynpro issue. This scenario not being addressed probably because not supported yet?

      By the way I can access web services with no authentication or basic authentication with userid/password. By no means I have been able to pass user credentials with SSO ticket.

      I have (deployable) webservices wrapping EJB session beans that work perfectly with SSO ticket when called by other means but when importing the web service model into WDP it builds it's own local proxy classes and does not seem to handle SSO.

      I could access the deployable web service via JNDI by my own but in this way I have to manage the complete model by myself and write a lot of code...

      Still waiting SAP gurus.

      If you find a workaround let me know 😊

      Regards !

      Vitaliano

  • avatar image
    Former Member
    Apr 18, 2005 at 11:15 AM

    Dear Vitaliano,

    Did you find any way to access the web service from dynpro using single sign on.

    can you tell me how you were able to access the web service using SAP Logon ticket using different means i.e. other then dynpro.

    i would like to know how to pass SAP Logon ticket to web service (i.e. via HTTP header on any other mean)

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      With SP10 and later the Web Dynpro Web Service Model lets you use an HTTP destination from the J2EE destination service for configuring authentication and URL.

      How it works:

      1) At design time, you specify the name of the destination adding a line of code in you WD application:

      Request_QuickCarRentalServiceViDocument_viewActiveBookings modObj
                        = wdContext.currentActiveBookingsElement().modelObject();
               <b>modObj._setHTTPDestinationName("CarRental");</b>
               modObj.execute();

      2) In the Visual Administrator, go to the "Destination" service and create a "HTTP" destination "CarRental" (or whatever you have in your code)

      If you want to use SAP Logon Tickets, configure "Authentication: SAP Logon Tickets".

      You may also specify the URL to be used in the destination. The behaviour is the following:

      URL field empty: use URL specified in the IDE

      URL field set: use URL of the destination

      It is also described as part of an UME tutorial. See http://help.sap.com/saphelp_nw04/helpdata/en/d1/8d4c4005a99523e10000000a1550b0/frameset.htm

      <b>NOTE</b>: This solution only works when you are using <i>SAP Developer Studio SP10</i> and <i>NW04 Stack 10</i>.

      Best Regards,

      Martijn de Boer

  • avatar image
    Former Member
    May 04, 2005 at 11:46 AM

    Hi Martin,

    I did the same thing as u have suggested for calling webservice from webdynpro using Logon ticket.

    But i am getting following error :

    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.

    Can u please resolve it?

    Thanks in Advance,

    Bhavik

    Add comment
    10|10000 characters needed characters exceeded