Accessing Portal Service from web dynpro : NoClassDefFoundError

Hello Experts,
I tried to develop a portal service (EquiService) and a web dynpro application (wdequset) which accesses the portal service. I put my web dynpro in an IView to show it in the portal. The service is running but when I try to open the IView I always get an error. I debugged my web dynpro application and found out that I didn’t get a reference to the service (portalEquiService is always null). See the following code and have a look to my comments.
public void wdDoInit()
    //@@begin wdDoInit()
    String key = IEquiService.KEY;
     * Here I get the right key. That’s OK so far.
//    IEquiService portalEquiService = (IEquiService)PortalRuntime.getRuntimeResources().getService(key);
     * When I use this line to get an instance of the service, I get the following error:
     * java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
     * The package "com.sapportals.portal.prt.runtime.*" is imported
     IEquiService portalEquiService = (IEquiService) WDPortalUtils.getServiceReference(key);
      * I found this in the "How to Access a Portal Service Within a WebDynpro Java Application" document.
      * When I use this line, I get the following error:
      * java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
      * The package "com.company.service.equi.IEquiService" is also imported.
    wdContext.currentContextElement().setEquinummer(portalEquiService.getEquiData().getEquiNr());
    //@@end
When I have a look to the service in the portal I see that the service is running and the following additional lines under “Dependents”:
service: psequinr|EquiService
SAPJ2EE::company.com/wdequset
So the service seems to know my web dynpro application (after debugging for the first time).
Detailed error information 1 (when I try to get the reference by PortalRuntime.getRuntimeResources().getService(key) ):
java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
     at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:107)
     at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
     at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
     at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
     at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
     at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
     at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
     at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
     at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
     at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
     at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
     at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
     at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
     at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
     at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
     at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Detailed error information 2 (when I tryto get reference by WDPortalUtils.getServiceReference(key) ):
java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
     at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:123)
     at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
     at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
     at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
     at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
     at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
     at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
     at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
     at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
     at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
     at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
     at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
     at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
     at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
     at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
     at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
     at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
     at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
     at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Hope that anybody knows what could be wrong here.
Thanks a lot.
Rene

The prtapi.jar is set in the classpath:
<classpathentry kind="lib" path="C:/Programme/SAP/JDT/eclipse/plugins/com.sap.tc.ap/comp/SAP_JTECHS/DCs/sap.com/epbc.prtapi._api/_comp/gen/default/public/default/lib/java/prtapi.jar"/>
and when I look in the portal (System Administration -> Support -> Portal Runtime -> Application Console), select my service and press the "show" Button, I see that the service has a dependency to my web dynpro application.
service: psequinr|EquiService
SAPJ2EE::company.com/wdequset
So I think that the sharing reference of the web Dynpro should be ok. Or not?

Similar Messages

  • 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

  • Access Portal Services within Web Dynpro

    Hi,
    I created a portal service and would like that some values of the same have to be set by a Web Dynpro application, but i have a problem to access this
    service. Always that a i try to get a reference of this service the object isn't instantiated and i get a null instantiated.
    What i`m trying to do is the broadcast message described in [/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1 |/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1]with a variation that need of some
    more Attributes and that the same will be pass by the Web Dynpro, like the broadcast message i`ll just use the alert concept and don't the publication.
    Follow below the describe of executed actions.
    1 - I did all the process as the [Weblog|/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1].
    2 - I generated the Jar and insert the same in a DC.
    3 - I generated the Web Dynpro application, in the used DCs and added the DC with the Jar, and i inserted the reference in a Sharing References. 
    4 - Did the deploy and insert the Web Dynpro in a Portal Iview.
    But always that i execute, i can't capture the reference of the service.
    Note: The reference in Sharing References was executed for several diferents forms of test, like for exemple:
    PORTAL:<vendor>/com.teste.broadcast
    PORTAL:com.teste.broadcast
    PORTAL:<vendor>/com.teste.broadcast.alertreceiver
    PORTAL:com.teste.broadcast.alertreceiver
    But always adding one at a time.
    Until put the saller like sap.com i already try.
    The creation of the service as described in the weblog can be accessed for a Web Dynpro? What the problem to access the Service??
    The codes follow Bellow.
    portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.runtime.system.notification"/>
        <property name="ServicesReference" value="com.teste.broadcast"/>
      </application-config>
      <services>
        <service name="alertreceiver">
          <service-config>
            <property name="className" value="com.teste.broadcast.alertreceiver"/>
          </service-config>
        </service>
      </services>
    </application>
         BroadcastAppView.java
    import com.sap.security.api.IUser;
    import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
    import com.sap.tc.webdynpro.clientserver.portal.sf.WDPortalServiceType;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    import com.sapportals.portal.prt.service.notification.INotificationService;
    import com.sapportals.portal.prt.service.notification.NotificationStringBufferPool;
    import com.sapportals.portal.prt.service.notification.StreamData;
    import com.sapportals.portal.prt.service.notification.TopicData;
    import com.sapportals.portal.prt.service.notification.TopicDataContainer;
    import com.teste.broadcast.Ialertreceiver;
    public void onActionSendMessage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMessage(ServerEvent)
            IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
            INotificationService notService = null;
            try {
                    notService =    (INotificationService)
                            WDPortalUtils.getServiceReference("com.teste.broadcast");
                    //notService =  (INotificationService)
                    //      WDPortalUtils.getServiceReference("com.teste.broadcast.alertreceiver");
                    //notService =  (INotificationService)
                    //      WDPortalUtils.getServiceReference(IAlertreceiver.KEY);
            } catch (Exception ex) {
                    msgManager.reportWarning("2-" + ex.getMessage());
            TopicDataContainer container = new TopicDataContainer(TOPIC_NAME);
            StreamData  messageStream = new StreamData(new ByteArrayInputStream(textMessage.getBytes()));
            TopicData durationdata =
                    new TopicData(TopicDataContainer.STRING, "60");
            TopicData userdata =
                    new TopicData(TopicDataContainer.STRING, user.getUniqueName());
            container.addTopicData("message", messageStream);
            container.addTopicData("duration", durationdata);
            container.addTopicData("user", userdata);
            container.addTopicData("group", "GROUP_ACCESS");
            //notService.publish(TOPIC_NAME, container);
            msgManager.reportWarning("-" + notService);
        //@@end
       * The following code section can be used for any Java code that is
       * not to be visible to other controllers/views or that contains constructs
       * currently not supported directly by Web Dynpro (such as inner classes or
       * member variables etc.). </p>
       * Note: The content of this section is in no way managed/controlled
       * by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      private final static String SERVICE_NOTIFICATION = "com.sap.portal.runtime.system.notification.notification";
      private final static String TOPIC_NAME = "USTBroadCastAlerts";
      //@@end
    Thank.
    Luciano Feletti Aponte

    Hi Luciano,
    Take a look at for your answer:
    /thread/833576
    Regards,
    Rogério

  • Access Application Services from Web Dynpro DC

    Hi Experts,
    We created a CAF DC which has an application service called ClientAppService, with a method findClientsById. We also created another DC, a Web Dynpro DC, which makes use of the model generated by the CAF DC. We have programmatic access to the application service through
    ClientAppServiceProxy.findClientsById()
    , but when running the DC which makes this call we receive the following error:
    com.sap.caf.rt.exception.CAFBaseRuntimeException: Query with name findClientsById does not exist
    We've managed to call Application Services before, but that was when the Web Dynpro was in the same DC as the CAF services. Any ideas on how to fix this?
    Thanks,
    JP

    Hi Smith,
    One of the possible reasons of this error is may be your CAF project is not properly deployed in the Server in which you have deployed your WebDynpro project. So during the execution of the WebDynpro project while it tries to invoke this findby from the Application Service of your CAF project it fails to find a match. May be by mistake you have deployed your CAF Application Service first and added the findBy method later. So if your properly deploy your total CAF project in the same server in which you have deployed your WebDynpro project it may resolve your problem.
    Thanks and Regards
    Avijit

  • 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

  • CE 7.1 - How to call CAF services from Web Dynpro

    Hi,
    whats the suggested way to call caf services from web dynpro?
    Of course I can use the Web Service model. But can I call caf directly?
    I read something about caf web dynpro model, but I cannot find it in nwds 7.1. On some older tutorial it was in context menu of caf project, but it seems to be removed.
    best regards
    tom

    Hi ,
    The standard way is to use the web service model.
    You have to expose the the services as web service and then you can use the wsdl url in the Adaptive web service model option.
    The above option will be available when you click the Model in the webdynpro application and the click create new model.
    Hope it helps you.
    Regards,
    Srinivasan Subbiah

  • CAF DB Update for CAF Entity Service from Web Dynpro

    Hi all,
    I have created an entity service in CAF called “Contacts’ which contains the following attributes.
    phoneNo
    cellNo
    emailID.
    Another entity service called "Person" is created. This contains the following attributes.
    personId
    personName
    personAddr
    contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
    That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
    Within the context of component controller of  Web Dynpro the structure is like
    APerson
         |_ personId
         |_ personName
         |_ personAddr
         |_ contactsRef       
                    |_ phoneNo (Under contactsRef)
                    |_ cellNo (Under contactsRef)
                    |_ emailID (Under contactsRef)
    So I have written the following code within web dynpro custom method.
    APerson person = PersonServiceProxy.create();
    java.util.List ls = new ArrayList();
    for(int i=0; i<4;i++)
    AContacts contact = ContactsServiceProxy.create();
    contact.setCellNo("9092130156");
    contact.setEmailID("[email protected]");
    contact.setPhoneNo("432258");
    contact.getAspect().sendChanges();
    ls.add(contact);
    person.setRelatedModelObjects("contactsRef",ls);
    person.setPersonID("9999");
    person.setPersonName("xyz");
    person.setPersonAddr("ABC, KOL");
    wdContext.nodeAPerson().bind(person);
    person.getAspect().sendChanges();
    CAFServiceFactory.getServiceFacade(idendityDefinition.class);
    After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
    Could anybody help me how can I solve my problem?
    Thanks & Regards
    Chandan
    Message was edited by:
            Chandan Jash

    Hi Chandan,
    Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
      I am not sure the code is actually adding the contact model object to person.
    Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
    award points if  info is helpful
    Regards,
    Anish

  • Authorization error calling a XI web service from Web Dynpro

    Hi all,
    I'm trying to communicate to XI from a Web Dynpro application but I get an Unauthorization error (401).
    I've generated a WSDL in XI and import it to web dynpro as a new Model. But when a I call the web service, the exception "Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized." appears.
    I don't know how to pass the right user and password from Web Dynpro, I've tried the web service from SOAP client tools and it works fine.
    I'll apreciate any help.
    Regards,
    Diego.

    Hola mi  nombre es Luis,
    Creyendo que eres español te escribo en tal idioma.
    He visto que a ti también te devolvía un error de autentificación 401, y que lo subsanaste, pero a mi con la solución que te dieron no me vale, ya que implemento el código que te ofrecieron para arreglarlo y ahora me da un fallo de "Server Error" poniendo en usuario y password, los correspondientes a XI.
    +Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay req=new Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay();
    wdContext.nodeRequest_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay().bind(req);
    req._setUser("username");
    req._setPassword("password");+
    No sé si es que ese usuario y contraseña son otros distintos.
    Si pudieras ayudarme, te lo agradecería.
    Un saludo, Luis

  • 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

  • Accessing UWL API from Web Dynpro Java

    Hi experts,
    I need to retrieve the data from UWL into Web Dynpro java, I have gone through many blogs and solutions but since I am new to portal I am unable to a get hang of it. Can anyone provide me step by step solution including codes for my problem?
    Thanks & Regards,
    Amit Sinha.
    P.S. Points will rewarded.

    Hi Amit,
    just gothrough this below link... here they given the coding also.....
    Accessing UWL-API out of Web Dynpro Java
    it may be helpful to you.... pls comeback if you are struck any where......
    Regards,
    Srinivas.

  • Navigate from Web Dynpro app to portal page

    Dear All,
    I've created a number of Web Dynpro applications which I run from various portal pages. From one of the Web Dynpro's I navigate to a different portal page using the WDPortalNavigation.navigateAbsolute method. This works fine, but I'm left with one problem:
    I'd like to pass parameters from the Web Dynpro which navigates to the portal page to the Web Dynpro applications which run on that specific page. I've appended the parameters to the URL I'm navigating to (eg ROLES://<pcd location>?<param=xxx>) and in the Web Dynpro's I've added a parameter to the Default interface plug. This doesn't seem to work. As an alternative I've added the statement WDWebContextAdapter.getWebContextAdapter().getRequestParameter("param") to the doInit() method of the view, but this also doesn't work.
    Either I'm doing something wrong, or what I want to accomplish is not possible. Does anybody know of a way to access parameters passed to a portal page from Web Dynpro applications contained on that page?
    Thanks,
    Arnoud

    I hope you are passing parameters between two WebDynpro applications.
    Please go through the example available for passing interaction between two webdynpro components.
    Please check the following link
    Alternative method for navigating to another page ?
    or the following link
    Re: Can we pass parameters in querystring of the webdynpro application?

  • Sending paramters from Web dynpro to web services

    Hi,
    I need to send extra objects or paramters to my web service from web dynpro which are not part of user inputs. How can i achieve it? Iam new to web dynpro. pls help me with sample code.
    Thanks a lot in advance

    hello Sujesh,
    in webdynpro we import a webservice model. it contains all the necessary input parameters and u can pass value through it. i think u cannot pass extra objects or parameter other than these input parameters.
    can u make ur requirement much more clear.
    regards,
    Piyush.

  • How to accessing portal services

    Hi All
             I am saravanan. i have doubts. Can u plz solve my doubts?.
    1). How to Accessing Portal Services from a Webdynpro application?.
    2). Portal Eventing with Webdynpro and other Applications?.
    3). single signon from Webdynpro applications?.
         These are my doubts. Could u plz solve my problem.
    If u have any material or PPT or PDF files kindly send my mail.
    This is my mail id : [email protected]
    Thanking You
    Saravanan

    Hi Swathi
    I'm trying to do exactly the same, i have a webdynpro application and i'm trying to access KM libraries to get the full list of metadata properties. But i'm getting and error while trying to get the service on the following code:
    Property propertyAux = null;
    IResourceFactory resFactory = ResourceFactory.getInstance();
    IRepositoryServiceFactory serFactory = resFactory.getServiceFactory();
    IPropertyConfigurationService propConfigService = (IPropertyConfigurationService) serFactory.getService("PropertyConfigurationService");
    IMetaNameListIterator i = propConfigService.getMetaModel().nameIterator();
         while (i.hasNext()) {
         IMetaName metaname = i.next();
         if ( metaname.getDocumentPatterns()!= null){
         propertyData.setId(metaname.getName());
         propertyData.setName(metaname.getLabel(locale));
         propertyData.setNamespace(metaname.getNamespace());
         propertyData.setDescription(metaname.getDescription(locale));
         propertyList.add(propertyData);
    The error on the trace is this one:
    System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Plain###Configuration Framework error: unable to create an IConfigClientContext instance from an EP5 userInitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.#
    System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Plain###InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.
    Could you please give me a hand on this one?
    Thanks in advance

  • Need info on Accessing portal services within a Web Dynpro application

    Hi,
    I need information on Accessing portal services within a Web Dynpro application.I want to explore this topic.Can anyone give useful links?
    Thanks in advance.
    Rajani N

    Hi
    how to reference  a portal service with web dyn pro ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/how%20to/how%20to%20access%20a%20portal%20service%20within%20a%20web%20dynpro%20java%20application.pdf
    http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/portal/WDPortalUtils.html
    Best Regards
    Jakub Krecicki

  • 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

Maybe you are looking for