Start Portal Service from EJB

hi developers,
I want to start a portal service from an ejb which runs on my portal server (this ejb is called from a r/3 system).
The portal service than has to do set km file authorizations.
Has anyone an idea how I can do this and which portal service is the best for this?
Thanx a lot
Christoph

Hi,
Take a look at this similar post: /thread/412823 [original link is broken]
BRgds,
Simon

Similar Messages

  • Problem while starting Portal Service from service configuration

    While starting Portal service i am getting following error message:
    "Server xxxxx:Error in the listener class com.sap.ip.portal.admin.portalanywhere.QueryHandler during the process of handleTopic"
    Please help me to reolve this error
    Edited by: Pande Sagar on Jul 15, 2010 11:46 AM
    Edited by: Pande Sagar on Jul 15, 2010 11:49 AM

    Following is the PortalApp.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <application alias="sample">
      <application-config>
        <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice,com.sap.portal.ivs.internalconnector"/>
      </application-config>
      <components/>
      <services>
        <service name="sample">
          <service-config>
            <property name="className" value="sample"/>
          </service-config>
          <service-profile>
            <property name="test" value="na"/>
          </service-profile>
        </service>
      </services>
    </application>
    sample.java file
    package samp;
      import com.sapportals.portal.prt.service.IServiceConfiguration;
    import com.sapportals.portal.prt.service.IServiceContext;
      public abstract class sample implements Isample{
      private IServiceContext mm_serviceContext;
         public void init(IServiceContext serviceContext)
         mm_serviceContext = serviceContext;
         public void afterInit()
      public void configure(IServiceConfiguration configuration)
         public void destroy()
      public void release()
    public IServiceContext getContext()
          return mm_serviceContext;
          public String getKey()
          return KEY;
    Isample Interface
    package samp;
    import com.sapportals.portal.prt.service.IService;
    public interface Isample extends IService
         public static final String KEY = "MySample.sample";
         public String hi();
    Edited by: Pande Sagar on Jul 19, 2010 2:04 PM
    Its getting deployed properly but from system administration >> system configuration >> service configuration >> from application >> administrate service >> List of services >> HERE ITS GIVING AN ERROR >> Error in the listener class com.sap.ip.portal.admin.portalanywhere.QueryHandler during the process of handleTopic
    Edited by: Pande Sagar on Jul 19, 2010 2:06 PM

  • Retrieve Portal Service from EJB

    Hi All,
    I am trying to use a custom Portal Service from an EJB application. I assume that I have to do the  JNDI lookup for the service since I can not use the usual "PortalRuntime" to get the service instance.
    Looking at the JNDI browser in the Visual Admin, I can't seem to find it. I have seen some code snippets on SDN for UWLService  where lookup is done via "/broker/services/XXXX.KEY"
    Any insight?
    Thanks,

    Hi,
    Take a look at this similar post: /thread/412823 [original link is broken]
    BRgds,
    Simon

  • Is there a possibility to implement a Portal Services by EJB Bean?

    Let suppose we have a Portal Service class ITestPortalService and EJB called TestEJB
    Can we do this in this way or any other way?
    public class TestBean implements javax.ejb.SessionBean, TestPortalService

    Question: Is there a possibility to implement a Portal Services by EJB Bean?
    I don't think you can do this directly as the portal service is maintained and called from the irj (portal) application, while the EJB beans are called directly from the web application server (as far as I know).
    The only think you could do is to have the Portal Service be  a bridge, which basically only calls the EJB and returns the results.

  • Web service from ejb

    Hi All,
    I am new to java web services.
    I made web services from ejb with netbeans.
    I like only some people to have access to this services with user and pass stored in database.
    In other words I need authentication and authorization.
    How can I do this?
    Regards

    Well it depends also on application server you are using.
    It depends also on web service stack you are using.
    For example here is the hint for glassfish (Metro):
    http://java.sun.com/javaee/5/docs/tutorial/doc/bncbe.html#bncbn
    Miro.

  • Calling portal service from web service

    Hello,
    I'm trying to call portal service from web service. Is this possible? I'm getting an error.
    For example, code:
    IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
    .. is generating exception:
    java.lang.LinkageError: Class com/sapportals/portal/prt/runtime/IPortalRuntimeResources violates loader constraints
    Do anybody knows what's wrong?
    Best regards,
    Josef Motl

    Hi Josef,
    Is the IJCOClientService located on the producer side or on the consumer side?
    Amit

  • How to call a  portal service from a servlet

    Hello all.
    I have a functioning portal service that I would like to call from a servlet.
    When I try to do so, I get a ClassCastException when I do this (on line two):
    IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
    IDocumentPersistence docPer = (IDocumentPersistence) runtimeResources.getService(IDocumentPersistence.KEY);
    However if I do the following I can get a generic IService and use reflection to invoke the method (in the IDocumentPersistence interface) that I want to invoke:
    IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
    com.sapportals.portal.prt.service.IService aService = (com.sapportals.portal.prt.service.IService) runtimeResources.getService(IDocumentPersistence.KEY);
    There must be a better way to use portal services (hopefully like scenario one above) in servlets. In web dynpro you can use portal services and cast them to the correct type. What am I missing?

    Hi Kim,
    how did you integrate the references to your Portal Service Interface into your web application?
    You should do this using the references in your application-j2ee-engine.xml, did you do this? It might be a problem with the classloader otherwise.
    The way you are calling portal services does work normally, however it is not the recommended way as it is documented in the SAP documentation.
    Please check the SAP documentation on how to access a portal service from a j2ee app:
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Best regards,
    Stefan Brauneis

  • Calling a Portal Service from within a Web Dynpro DC

    Hello,
    I am trying to call a Portal Service from within a Web Dynpro development component without sucess.
    Can anyone give me some hints on the necessary steps in order to accomplish this task?
    Thanks
    Diz

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • Accessing portal service from abstract portal component

    Hi
    I have created a portal service where it contains getdata() and putdata(String) methods.
    I have created a abstract portal component and trying to access the portal service from this component.
    In portalapp.xml file of the portal component i have created the sharing reference and i have given the service name.
    When i run the component it says service not found.
    Please let me know if i have missed some things
    Thanks and Regards
    NagaKishore

    Hi Prakash
    Sorry for the latereply.
    find below the code for the interface
    package com.sap.global;
    import com.sapportals.portal.prt.service.IService;
    public interface IGlobalContext extends IService
        public static final String KEY = "IGlobalContext.GlobalContext";
        public void putData(String strUserID,String strSessionID);
        public String getData();
    portalapp.xml file of the portal service.
    <application>
      <application-config/>
      <components/>
      <services>
        <service name="GlobalContext">
          <service-config>
            <property name="className" value="com.sap.global.GlobalContext"/>
            <property name="startup" value="true"/>
          </service-config>
          <service-profile>
            <property name="Test" value="true"/>
          </service-profile>
        </service>
      </services>
    </application>
    I am doing the following steps to access the portal service in the abstract portal component.
    1. Add the portal service to the java build path of the abstract portal component.
    2. do content method has the following code.
    String userid ="",sessionid="";
              response.write("Welcome");
              try
              IUserContext uc= request.getUser();
              userid = uc.getLogonUid();
              sessionid = request.getServletRequest().getSession().toString();
              response.write("Iview "+userid);
              IGlobalContext uid = (IGlobalContext)PortalRuntime.getRuntimeResources().getService(IGlobalContext.KEY);
              uid.putData(userid,sessionid);
              response.write(" Response from Service " + uid.getData());
             }catch (Exception e)
                  response.write(e.toString());
    3. portalapp.xml of abstract portal component
    <application>
      <application-config>
        <property name="SharingReference" value="GlobalContext"/>
      </application-config>
      <components>
        <component name="LandingPageComponent">
          <component-config>
            <property name="ClassName" value="com.satyam.landing.LandingPage"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    I am getting the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Could not find portal application GlobalContext.
    Exception id: 11:53_08/04/05_0095_1641450
    See the details for the exception ID in the log file
    Thanks in advance
    Regards
    NagaKishore

  • Unable to start obiee services from "Services"

    I am not able to start obiee services from services.msc on my local. (Windows XP)
    I get the following error while trying to start Oracle BI Java Host:
    The Oracle BI Java Host service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.
    Error while starting Oracle BI Presentation Service:
    Windows could not start the Oracle BI Presentation Service on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code -1.
    Error Description from System Event Log:
    The Oracle BI Presentation Server service terminated with service-specific error 4294967295 (0xFFFFFFFF).
    Error while starting Oracle BI Server:
    Could not start the Oracle BI Server service on Local Computer.
    Error 1067: The process terminated unexpectedly.
    Can somebody please help me with this.
    Thanks,
    Swetha

    Hi,
    Regarding the Java Service have you installed the Java JDK (can be found here ) in a directory that contains no spaces?
    Installing it in Program Files will cause issues so perhaps reinstall it into a location like C:/Java/jdk1.6/
    After installing it to the new location you will need to update the instanceconfig.xml file (mine is located C:\OracleBIData\web\config\instanceconfig.xml).
    Change the location of the Java Home between these tags to the root of your newly installed Java sdk. eg <JavaHome>C:/Java/jdk1.6</JavaHome>
    Try launching the service again.
    Let me know if this works or doesn't,
    J
    Edited by: J Kremer on 05-Apr-2011 00:18

  • Accessing custom Portal service from a java application

    We have a custom portal service that connects to BW using xmla. How do you access this portal service from a java application. Not from web dynpro, jsp or servlet but from the java code.
    Can we use the INITIAL_CONTEXT_FACTORY to get access to the portal service.
    Thank You
    D.K

    Now I tried the following:
    I've added the prtapi.jar and the service's jar to the additional-lib folder and added the appropriate entries to library.txt and reference.txt.
    Now I can obtain now the PortalRuntime, but this is not initialized.
    Has anybody a solution for this problem? Help would be high appreciated!
    Regards,
    Matthias

  • Cannot Start Workflow Service from Service Manager

    Hello Professionals,
    I have a problem with starting Workflow service from Service manager,
    I have configured all the settings and connection to database was successful.
    However, after closing the settings window and try to start the workflow service, i got "Cannot start Service; configuration is not correct or cannot connect to database"
    What may cause this issue?
    Thanks and Best Regards,

    Hi,
    Please check SAP note:
    2019304 - Workflow server connection stops if many workflow
    instances with script tasks run simultaneously
    Thanks & Regards,
    Nagarajan

  • Call portal service from page or iview

    Hello All,
    I have an portal applction(PAR) which is returning a value suppose 'X'.
    Now my requirement is to call this portal service from page.
    How may i do this?
    Regards.
    Punit
    Edited by: Punit Singh on Feb 25, 2011 9:30 PM

    Hi
    You can call the IPortalService API as in this [thread|how to call a portal service;
    Regards
    johann

  • I can't start OLAP Service from OEM 9.0.2

    I don't know how start Olap Service from OEM 9.0.2. Please tell me how to do this! May be somebody will send me letter. [email protected]

    Yes.
    First, get an app called MPEG Streamclip, which is free. (google MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In iMovie, select the clip you need. Then, right-click/Reveal in Finder.
    Drag this clip into MPEG Streamclip
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then drag this photo into iPhoto.
    Here is a video I made that steps through this...
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Consume Portal Service from J2EE web application

    hi, i am a newbie to portal content development. My team have developed a J2EE web application to be run on the portal. Is it possible to consume a Portal Service from J2EE web application? If possible, deeply appreciate if you could provide some guidelines. Kindly advise. Thanks.

    Hi Theodore Yu,
    You need to expose your portal service as a webservice to consume it in a j2ee web application.
    For exposing a portal service to webservice check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/43/cb213e578c0262e10000000a11466f/frameset.htm
    Thanks,
    Padmaja
    Edited by: Padmaja Pedapudi on May 20, 2008 2:03 PM

Maybe you are looking for