HI,
I've created a portal component and a portal service.
The following configuration was made in portalapp.xml for the service
<services>
<service name="FirstService">
<service-config>
<property name="className" value="com.myservice.FirstService"/>
<property name="startup" value="true"/>
</service-config>
</service>
</services>
But when i try to access the portal service from portal component i get the service not found exception
<b>Code in Portal Component</b>
IFirstService is=(IFirstService)request.getService(IFirstService.KEY);
response.write(is.helloService());
Do i need to explicitly start the service any where
Any suggestions are welcome
Thanks
Have you put a sharing reference to the service in your portal component ?
<property name="SharingReference" value="FirstService"/>
The startup parameter in the service config says that it should start on startup (you might need to restart the portal to activate it)
When looking at an existing portalapp.xml file, say for the knowledgemanagement application, it looks like the alias=".." and name=.." should go in the <application> tag of your service and not in the <service> tag
I am working on something similar, so I am testing different variations at the moment
D
Just to let you know that by putting the name="" and alias="" in the application part of the portalapp.xml I am now able to refer to the service from another component using the SharingReference="" in the other component, which refers to my service alias name.
This is for a KM global service that it works for
I hope this helps in anyway
D
Well, I have a similar, but worst problem.
I get the same exception. See the portalappxml:
As you see, the service is within the application, and still I am not able to get reference.
I have tried adding the service in SharingReference but to no avial. Worst, it stopped working altogether. This goes along with another posting of mine regarding an error "profile provisioning failed" which appears occasionaly when accessing components...
If anyone has an idea it would be GREAT!
Add a comment