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

Similar Messages

  • Problem accessing webservice from abstract portal component

    Hi,
       I have created a webservice from a portal service.  So i have created one more portal application to accessing that web service.  In that, i have done the following:
    -> Portal Service from Wsdl file - Client Side
    -> I have entered the Wsdl file name as, the location of the WebService
    -> I have selected the methods what i want to use in my application
    -> Finally i have given my ServiceName, Alias and Package as well.
    -> I have created one application object (Abstract Portal Component) to access the Web Service.
    -> Inside that AbstractPortalComponent, i have written the coding to access the methods.
    -> I have created one system with System Alias, i used this Alias name in my portalapp.xml
    While running it shows the error as,
                        <b>com.sapportals.portal.prt.service.ServiceException: Service not found: com.sap.portal.prt.soap.Alias</b>
    Help me in this, Thanks in Advance.,
    With Regards,
    Venkatesh.K.

    Hi venkatesh I ahve similar problem please could you share with us how did you sort out this error?
    Sreekanth

  • Urgent Please help me... How to access BAPIs from abstract portal component

    I am developing an application in Abstract Portal Component (in
    PDK).
    In that application I can able to acess BAPIs from my Componets
    using the code like
    inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input();
    outputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Output();
    popSearchBapi = new DropBox_PortType();
    colorList = new Tjj12Type_List();
    inputPopSearchBapi.setIm_Agencyid("0010000001");
    try {
    jcoClient.connect();
    outputPopSearchBapi =
    popSearchBapi.zad_Bapi_Pop_Search_Form(inputPopSearchBapi);
    colorList = outputPopSearchBapi.get_as_listIt_Color();
    request.getComponentContext().putValue("color",colorList.iterat
    or());
    jcoClient.disconnect();
    But I am not able to Access the data that is comming from the
    BAPI in my JSP Page. Pleeeeeeease help me. If you want any
    clarification about my problem then ask for further
    clarifications

    Hi,
      You can refer this link, to connecting the BAPI from Abstract Portal Component <a href="http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html">JCo Tutorial1</a>
    <a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">JCo Tutorial2</a>
    With Regards,
    Venkatesh. K
    /* Points are Welcome */

  • Cannot access Portal Service from Web dynpro DC

    Hi all,
    I cannot access the portal service from my web dynpro dc.
    1. I created a Portal Service (say xxxservice) in a DC (say the DC name is testservice and the vendor is xx.com)
    2. Created a public part under the testservice DC and added my classes to it.
    3. Built and deployed the testservice DC.
    Now,
    4. I created a web dynpro DC.
    5. In the used DC section added the public part of the testservice DC and also the epbc.prtapi._api.jar for build time and runtime with strong qualifier.
    6. In the web dynpro "Sharing Reference", I added PORTAL:xx.com/testservice
    7. In the component controller, I am calling a method from the Portal Service.
    8. Built the web dynpro DC and deployed it.
    9. But at the run time it gives, NoClassDefFoundError on the xxxservice.
    I looked at many forum threads and tried everything. For eg: changed the Sharing Reference to PORTAL:sap.com/testservice but nothing works.
    Please do suggest me if I am missing something
    Thanks

    Hi Laxmi,
    I am sure something wrong at Portal Service DC creation. On webdynpro part you done fine .. by putting PORTAL:sap.com/testservice
    Check the below steps:
    1. Create DC Portal Applicaiton Stand alone (SDA)
    2. Add portal Service for the newly created portal service dc
    3. build and activate
    4. by default you should be get public part by name API which is compilation dependency
    5. here you dont need to do anything else
    6. on webdynpro just add the used dc to this API public part of portal service dc
    7. add PORTAL:sap.com/testservice  sharing reference
    If u go by this you shouldnt get any error..
    Now, u are saying something like ur own classes .. i think u are trying to put u r own classes to service.. but remeber portal service is to have only IYourService class and YourService class.. other classes should be made to be jar.. and add that jar to External library DC and create PPs compile & Assemble and add that DC to current service dc.
    Hope it is clear.. if not pls let me know..
    Thanks,
    Raags

  • 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

  • Calling a web service from a portal application / SOAP Action

    Hallo,
    Ich möchte aus einer Portal Applikation auf einen Web Service zugreifen.
    Dafür habe ich mit dem Wizard "Portal Service from Wsdl file - Client side"
    eine Portal Service erzeugt, auf den ich dann zugreife.
    Leider wird dabei ein Fehler ausgegeben (Stacktrace-Ausschnitt s.u.).
    Ich habe ein Posting zu dem Fehler hier im SDN gefunden, leider hatte dort niemand eine Antwort. Vielleicht hat inzwischen jemand eine Idee?
    Das Feld soapaction ist in der soapconfig.xml leer angegeben (soapaction="").
    Es ändert aber nichts an der Fehlermeldung, wenn ich dort etwas eintrage.
    Ein weiterer Gedanke ist, dass die soapaction, die wenn ich es richtig verstehe eine URL auf die web service methode enthalten soll, im Grunde dynamisch sein sollte, da der Web Service lokal in dem Portal läuft, auf dem die Applikation gerade deployed ist. Auf den Web Service wird mit WebDynPro erfolgreich zugegriffen (dynamisch). Meine Vermutung ist, dass hier das Problem liegt und es entweder mit diesem Wizard nicht möglich ist oder ein Bug vorliegt.
    Also ist die Frage: Wie erzeuge ich dasselbe für eine Portal-Applikation?
    Ich hoffe, dass mir jemand mit einer Antwort oder Hinweisen wo man weiterforschen kann, weiterhelfen kann.
    Freundliche Grüße,
    Daniel Dehnhard
    Stacktrace:
    Component finished with error: (com.sapportals.portal.prt.service.soap.exception.PRTFaultEnvelopeVersion)
    java.lang.IllegalArgumentException: The SOAP Action "" include in the soap request not corresponding to the Portal service method.
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPBodyElement.processParams(PRTSOAPBodyElement.java:253)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPBodyElement.init(PRTSOAPBodyElement.java:190)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPBodyElement.(PRTSOAPBodyElement.java:56)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPBody.init(PRTSOAPBody.java:94)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPBody.(PRTSOAPBody.java:36)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPEnvelope.init(PRTSOAPEnvelope.java:113)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPEnvelope.(PRTSOAPEnvelope.java:54)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPMessage.processSOAPMessage(PRTSOAPMessage.java:58)
    at com.sapportals.portal.prt.service.soap.element.PRTSOAPMessage.(PRTSOAPMessage.java:40)
    at com.sapportals.portal.prt.service.soap.SOAPService.call(SOAPService.java:180)
    at com.sapportals.portal.prt.service.soap.PRTSOAPCall.invokeMethod(PRTSOAPCall.java:209)
    at de.enviam.ep.egk.km.webservicewrapper.Z_EP_EM_EGK_CustomerGroupToCRMData.getCustomerGroup2CrmDataByGPNr(Z_EP_EM_EGK_CustomerGroupToCRMData.java:218)
    at de.enviam.ep.egk.km.imp.EPImpSchedulerTask.resolveGroupId(EPImpSchedulerTask.java:764)

    Hi,
      I am accessing a web service from a Portal Component through a Portal Web Service. First i created a web service, then a portal web service which is made to access the wsdl file of the web service. Now i access the Portal Web Service from a Portal Component. Now i am getting an error as,
    Exceptionjava.lang.IllegalArgumentException: The SOAP Action "" include in the soap request not corresponding to the Portal service method.
    The code which i wrote in component is below
    String text = "word";
    FuncHelloResponse res=new FuncHelloResponse();
    FuncHello fn= new FuncHello() ;          
    fn.setName(text);
    res= (  (INewPortal) PortalRuntime.getRuntimeResources().getService(INewPortal.KEY)).FuncHello(fn);
    response.write(res.getResponse());
    Can any one solve this problem?

  • 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

  • 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

  • POrtal application object - Abstract Portal Component, Location dropdown.

    Hi
    I am creating a Portal application project in NWDS.
    Inside this project I am creating a POrtal application object -> Abstract Portal Component.
    Now, there is a dialigue box which appears, prompting for object name and package.
    In the same dialogue box there is an additional dropdown box for Location.
    It has two values "api" and "core".
    What does these mean.
    Thanks

    The location of the new Java class file determines whether other applications can reference the classes. Generally, the choice is only meaningful when defining services and the interfaces to make available to those applications the reference the service.
    You can specify one of the following:
    ■      Core (default): Places the file in the src.core project directory, and makes it private.
    ■      API: Places the file in the src.api, and makes it public.
    Regards,
    Khushboo

  • I cannot access my service provider's portal

    Hello, People.
    I am new in the community and this is my first question posted. Please help me.
    I am a first time user of the iPhone and have been using it for less than a month and have been facing immense issues most of which I have been able to solve.
    The remaining problem is accessing my service provider's portal. By portal I mean checking my balance, credit recharge, bundle and other service subscriptions. Accessing all this needs the use of *XXX# (*102#, *104*XXX...#, *149*99#, etc). Whenever I make such dials, instead of taking me to their respective service portal, the phone calls straight that renders the number non-exitent. It is as if i am making a straight call while trying to access the portal. But the *#06# portal dial works that shows the IMEI.
    I took it to the shop where I bought the product and they told me that it is an apple update (i have the latest iOS 7.1) that caused this. But I personally have not heard of such an issue even from my friends who use the same product. My telecom service providers are claiming it is a problem on Apple's side. Everyside is pushing the ball to each other and the only place that I am left with is to ask my fellow users if you can help me with this.
    I hope to get to the bottom of this.
    Thanks and regards,
    Peter.

    Call Tmobile and make sure they have your new PIN and IMEI of the new device in their system and provision your account correctly with the BIS data plan for this new device.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • 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

  • 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

  • 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

  • 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

  • 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

  • Unlimited log-on attempts to users in OIM 9.1.0.2

    Hi All, How can I give unlimited log-on attempts to users in OIM 9.1.0.2 ? I cannot find any such tab in Admin>>Password policy tab. Please share. Thanks, Manohar

  • Accounting document not posted into FI

    Hi  all, I am facing one issue, After Invoice creation accounting document generated and posted into FI, The same Invoice when cancelling accounting document generated but not posted into FI , I check IN billing docuement types  All dont' have Postin

  • Media Player works in FF, but not in IE.  WHY?

    I have placed video file on my home page, and the file works fine with firefox but not in internet explorer. I am not sure why, or how to fix the problem. Also, when I insert the media. I am inserting a plug-in and not dragging a media player object.

  • Premiere cs6 crashing with Quicktime

    I've recently started having problems with video disappearing in Premiere. Usually happens when I have other cs6 applications open, like after sending a sequence to Audition, or using AE dynamic link. The program monitor displays a black screen, the

  • If my computer crashes can I use a backup disk to recover it

    If my computer crashes can I use a backup disk to recover it This question was solved. View Solution.