Session from Portal Service

Hi,
how can I get the HTTP session from within a portal service?
- Frank

You can't. You have to pass the request variable from another component to portal service and then grab http session from it.

Similar Messages

  • Calling a abstract portal component from portal service

    Hi
    Can i access a abstract portal component from portal service?
    My requirement is i have a method called getsessionID in portal service. My portal service is enabled as a webservice. Who ever consumes my webservice they will call this method.
    This method in portal service should call a method in abstract portal component to return the session id of the user.
    is this possible.
    Thanks in advance
    Kishore

    Hi Kishore,
           This is impossible. The AbstractPortalComponent is a servlet and it can only be executed via URL. It is easy to execute the component via url but you have to pass the logon information. Also it will run under a user context that you have specified(while passing the logon information) when calling the url. I think you ought to consider a different approach.
            Prakash Singh

  • Need to access R3 using IConnectorServiceGateway from portal service.

    Hi everyone,
    I need to access R3 using IConnectorServiceGateway from portal service but unable to access so as I don't get the IPortalComponentRequest. Can anyone help me out on how should i do the connection ?
    Please let me know as soon as possible.
    Thanks
    Ritu

    Hello.
    I think this should work
        * Méthode renvoyant une connexion au backend SAP/R3 via un pool de
        * connexion.
        * @param userLocale  - la locale de l'utilisateur
        * @param user        - utilisateur pour lequel il faut une connection
        * @param systemAlias - système pour se connecter
        * @return une connexion au backend SAP/R3.
        * @throws ConnectionPoolException
        *             levée en cas d'erreur.
       public IConnection getConnection(
             Locale userLocale,
             IUserContext user,
             String systemAlias) throws ConnectionPoolException {
          ConnectionProperties prop = null;
          IConnection connection = null;
          IConnectorGatewayService cgService = null;
          try {
             // Connector Gateway Service.
             cgService = (IConnectorGatewayService) PortalRuntime
                   .getRuntimeResources().getService(IConnectorService.KEY);
             if (cgService == null) {
                throw new ConnectionPoolException(
                      "Error in get Connector Gateway Service...");
             IPortalComponentRequest aRequest;
             if (systemAlias == null) {
                throw new ConnectionPoolException(
                      "System alias 'systemAlias' name is null...");
             // Demande la connexion au service :
             prop = new ConnectionProperties(userLocale, user);
             connection = cgService.getConnection(systemAlias, prop);
          } catch (Exception ex) {
             throw new ConnectionPoolException(ex);
    regards
    Guillaume PATRY

  • Where to find  Portal WebService from Portal Service

    Hello,
    I've managed to create a portal service. i would now like to use it as a web service.
    I've found document describing the process, however when try to create a portal object I'm proposed with the choice for portal service, Portal Componant and KM Componant , but not the needed "Web Service from portal Service" .
    Does anyone know what you have to get/add/activate to have this option ?
    i'm on NWDS version 7.0.14
    regards
    Guillaume PATRY

    Hi Guillame,
    To expose your Portal Service as a Web Service, follow the steps :
    1). Select the project containing the Portal Service you wish to expose as a web service.Generate Portal Web Service with PDK Wizard by choosing Portal Web Service From Portal Service.
    2). Select the interface by clicking the browse button.You can only expose the interface that are defined in your Portal Service Project.
    3). Select the method you want to expose to the web service.WSDL files will be generated.
    4). The portalapp.xml will be automatically updated with the WSDL entries.
    5). Deploy the Portal Service on Portal.
    6). View the Web Service on Portal in the following path :
    System Administration --> Support --> Portal Runtime --> SOAP Admin --> Web Services
    7). The generated WSDL can be viewed with the URL :
    http://<server>/irj/servlet/prt/soap/com.sap.portal.prt.soap.<servicename>.
    Hope this does solves your problem.
    Do award points if found helpful.
    Thanks & Regards
    Gourav.

  • Portal Webservice from Portal Service

    Hello community...
    I'm trying to build a Portal Webservice from a Portal Service, but the wizard doesn't appear in my Portal Application Object. There are only Portal Components, Portal Services and a RF Component Wizard. Are there any options configuring the NWDS to show the other wizards like the "Portal Webservice from Portal Service" one or do I have an old version of the nwds (7.0.14)?

    Hi Ozzie,
    in newer NWDS versions this wizard doesn't exist any more.
    [http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm] describes how to create a web service from a portal service.
    I personally didn't create a web service by this description however. I just created a normal Java class and created a Web Service out of this class (using EAR deployment).

  • Calling BAPI from Portal Service

    Hi all,
    I have created a KM custom property renderer, what includes a Portal Service.
    Now, I would like to call a BAPI from the renderer component using JCO.
    Does anybody how or whether that works?
    Or does anybody have a sample code how to call a BAPI using JCO from a portal service?
    Thanks
    ISmail

    Hi,
    This is possible.
    Please see the following documentation:
    [http://help.sap.com/saphelp_nwpi711/helpdata/en/48/634503d4e9501ae10000000a42189b/frameset.htm|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/634503d4e9501ae10000000a42189b/frameset.htm]
    Regards,
    Zohar

  • Webservice from Portal Service - Import Param of WebService Method Error

    Hello,
    I have developed a portal service and after that I created a portal web service from that portal service... If I use a String variable for the import parameter of my webservice method everything works fine! But if I us a custom class for the im port parameter of the method I get an soap error when I call the webservice!
    Error:
    Service: MyService
    URL: Endpoint
    http://myportal/irj/servlet/prt/soap/com.sap.portal.prt.soap.MyServicec?style=rpc_enc
    Method: add1to1
    Exception: System.Web.Services.Protocols.SoapException
    Message: com.company.ImportClass
    The WSDL was generated Correctly:
         <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://namespace.com" elementFormDefault="qualified">
              <complexType name="ImportClass">
                   <sequence>
                        <element name="Import1" nillable="true" type="xsd:string"/>
                        <element name="Import2" nillable="true" type="xsd:string"/>
                   </sequence>
              </complexType>
         </schema>
    Thanks for your help!
    Johannes
    Edited by: Johannes Freitag on Jun 24, 2009 2:54 PM

    Hi Ozzie,
    in newer NWDS versions this wizard doesn't exist any more.
    [http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/1f/4554426dd13555e10000000a1550b0/frameset.htm] describes how to create a web service from a portal service.
    I personally didn't create a web service by this description however. I just created a normal Java class and created a Web Service out of this class (using EAR deployment).

  • Read Iview component profile from Portal Service

    Is there any way this can be done?

    We have a situation where we need to define  application parameters that is to be accessed across different iviews and a portal service. These application parameters can be   modified by content administrators if it's at an iview level. We are trying to see if this can be done without  the use of system landscapes which is available only to System administrators.

  • Calling Webdynpro from a Portal service

    Hi,
    I am new to EP. I have a task where i have to write a Portal service which has to call a prewritten Webdynpro. Can someone guide me as to how I can call WebDynpros from Portal services.
    Thanks,
    Sudhir

    Hi Sudhir,
    That makes no sense. Portal Services are "faceless components", i.e. they have no user interface. WD is just all about UI. How should that kind of integration work / make sense?!?!
    Hope it helps nevertheless
    Detlev

  • Making portal services as web services

    hi,
          i have created a portal service. i want to publish this as web service . anyone know how to do this ...
    padma

    hi padma,
             in your project folder follow the path new->other->portal application -> portal application object ->
    portal web services -> portal web services from portal services and select ur portal service.
    to view ur wsdl file go to System administration->support->portal runtime -> soap admin -> web services
    Regards,
    jeyasingh Samuel

  • How to call a "iView" in Portal Service

    Hi,
    I want to call a "iView" from portal service.
    Can somebody suggest me how to call? I am not aware of the method for doing so.
    Any sample code will be helpful.
    Thanks in advance.
    Manish

    Hello Manish,
    as far as I know, it's not possible to call an iView from a portal service. The intention of a portal service is to provide general functionality that may be used by several iViews. So, you can call a service from an iView, but not the other way round.
    Have a look at the documentation, I hope this clarifies things a little bit: http://help.sap.com/saphelp_erp2005vp/helpdata/en/df/e6b74253ffda11e10000000a155106/frameset.htm
    Kind regards, Lars

  • How to expose/convert my Portal Service as/to a Web Service??

    Hi Experts,
    How can i expose my Portal Service as a Web Service??
    What configuration i need to do for that???
    Please reply.
    Help will be rewarded and Appreciated.

    hi
    In NWDS go to
    New ->other -> portal application -> portal application object ->
    portal web services -> portal web services from portal services and select ur portal service.
    Generate portal web service with PDK wizard by choosing  Portal web service from portal service
    Select the interfaces by clicking the browser button.
    select the methods to be exposed to web service.
    Now WSDL files are generated for portal services.
    You can view the WSDL by going to
    System administration->support->portal runtime -> soap admin -> web services
    Regards,
    Ganesh N

  • Portal service and Portal webservice

    Hi Experts,
    Could you please provide the document/blog to create Portal service and to create webservice from Portal webservice?
    Regards
    Sara

    Sara,
    These URL's are giving you step by step instruction with Screen shots and Tutorials to Create Portal Service as well as Creating Webservice from Portal Service.
    You are getting error message  because of the Restriction of your Internet Explorer settings.Try to use some other Browser to open the URLs.
    Meantime I shall find the way to get rid of this exception and update you.
    Update:
    1.Copy and Paste the given URL in Browser and try to open it.
    2.Change Internet Explorer security settings:
    Go to tools->Internet Options->Security->Internet->Custom level->Medium
    /Intranet ->Custome level to Medium-Low.
    This document will be very helpful to you for Webservice access in EP.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b07992b3-b5af-2a10-9886-affcbeccc4c9
    Regards,
    Karthick Eswaran
    Edited by: Karthick Eswaran on May 21, 2008 10:34 AM

  • Convert portal service to web service option in NWDS

    Hi all,
    I am using SAP NetWeaver Developer Studio (Version: 7.0.14), in this I couldn't find option to convert portal service to web service.
    Please help me out, how to convert portal service to web service through NWDS or any other way to do it.
    Helpful answer will appreciate.
    Thanks,
    Regards,
    Kathiresan R

    Hi
    In NWDS go to New ->other -> portal application -> portal application object -> portal web services -> portal web services from portal services and select ur portal service.
    Generate portal web service with PDK wizard by choosing Portal web service from portal service
    Select the interfaces by clicking the browser button.
    select the methods to be exposed to web service.
    Now WSDL files are generated for portal services.
    You can view the WSDL by going to
    System administration->support->portal runtime -> soap admin -> web services.
    Hope this works for you. Please excuse any small mistakes if I have made.
    Regards,
    Shitij

  • How to call session EJB from EP service in EP 7.0?

    Hi,
    I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
    I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
    Can anyone please help me?
    Regards,
    Tomas

    Hi Satya ,
              please go though following blog for used DC concept.
    Componentization of Webdynpro Application in CE7.1
    In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller

Maybe you are looking for

  • Not able to run app on iphone

    I have all the profiles set up and i am also able to run one application but not the other one. In the next one I set profile under build tab. Is there any other settings need to be made ?

  • How to change colors settings -- newbie to mac

    I was messing around with the settings and selected to polarize the image so that it looks like a photo negative. I feel like a moron so far in using the mac and i cant find how to switch it back to normal. Any help is appreciated.

  • "File path not found" when opening an Encore DVD project made 2 years ago

    Configuration: XP SP3, Encore DVD CS3 coming from Creative Suite. 2Gb RAM, fast-enough-CPU, large-enough-harddisk (~70Gb space). The project, as I remember, should has been made with Encore DVD 2.0 2 years ago. The project file is placed on the C:\ w

  • How safe is the Adobe Download Assistant

    I am very wary of installing software that I don't think I need. If I wish to download a trial of Elements 12 I have to also install Adobe Download Assistant? Does this software do anything other than just let me download the trial; I do not want to

  • HT5766 problems with download

    Im trying to install a newer version of itunes onto my computer, Ive tried 10.6.3 and 11.0.3 and it keeps giving me and error code 2749 I think ad will not finish the downloa