on 06-05-2006 5:57 PM
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,
<u>Steps.</u>:
1.)Add jar files (portal services API) in Java Build Path
You need to include the prtapi.jar file as well.
of your WebDynpro project.
2.) Add portal applicatoin names (= par file names)
as Web Dynpro References.
Web Dynpro Reference > Sharing reference tab
portal:sap.com/<Portal Application name>
3.) Call portal services with WDPortalUtils class API.
IMyPortalService portalservice=(IMyPortalService)WDPortalUtils.getServiceRefrence(parname.servicename);
portalservice.metnod();
Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK,
I am going crazy with this one... here is what I have done:
1. Created a DC of type "Portal Application Standalone";
2. The wizard automatically creates the Public Parts;
3. Created a portal service;
4. Build & Deployed both OK;
Everything OK...
5. Created a DC of type Web Dynpro;
6. Added the Portal Application DC as a "Used DC";
7. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC";
8. Both were added with dependency type "Build Time";
9. IMySrv srv = (IMySrv)WDPortalUtils.getServiceReference(IMySrv.KEY);
10. Build & Deployed both OK;
When I run the Web Dynpro application I am not able to get a reference to the service. I get srv = null;
Any help would be much appreciated.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diz,
Check <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/2fffe990-0201-0010-aab0-e61c3250bcf3">integrating Web Dynpro in Portal (19)</a>
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.