1. Open Component Wizard from {domain_home}/ucm/cs/bin/ComponentWizard
2. Click on Add button will show up new popup window.
a. Name the component "HelloWorld"
b.Click Ok.
3. Click on Add on Resource Window
a. Select Service & Click Next.
4. Give the service name "Hello_World".
Class name - Give class path
Template- MSG_PAGE
5. Click on ADD button
6. Click Ok.
7. Click On Finish.
8. Open Jdeveloper/ Eclipse framework Create Java class name "Custom Service"
package project1;
import intradoc.common.ServiceException;
import intradoc.common.SystemUtils;
import intradoc.data.DataException;
import intradoc.server.Service;
public class CustomService extends Service {
public void helloworld_sayHello()throws DataException,ServiceException{
SystemUtils.info("inside Method");
m_binder.putLocal("StatusMessage", "Hello World Sample ");
String statusmessage=m_binder.getLocal("StatusMessage");
SystemUtils.info("statusmessage:"+statusmessage);
}
}
a. Create folder structure at your custom component location & put java and Class file to appropriate location:
/ucm/cs/custom/HelloWorld/src/project1/CustomService.java
/ucm/cs/custom/HelloWorld/classes/project1/CustomService.c lass
9. Add class Path to {Custom_Component_Home}/HelloWorld.hda
10. Open Component Wizard Click on "Enable" by selectin "HelloWorld" component.
11. Restart the content server.
Now hit the URL:http://localhost:16200/cs/idcplg?IdcService=HELLO_WORLD
2. Click on Add button will show up new popup window.
a. Name the component "HelloWorld"
b.Click Ok.
3. Click on Add on Resource Window
a. Select Service & Click Next.
4. Give the service name "Hello_World".
Class name - Give class path
Template- MSG_PAGE
5. Click on ADD button
6. Click Ok.
7. Click On Finish.
8. Open Jdeveloper/ Eclipse framework Create Java class name "Custom Service"
package project1;
import intradoc.common.ServiceException;
import intradoc.common.SystemUtils;
import intradoc.data.DataException;
import intradoc.server.Service;
public class CustomService extends Service {
public void helloworld_sayHello()throws DataException,ServiceException{
SystemUtils.info("inside Method");
m_binder.putLocal("StatusMessage", "Hello World Sample ");
String statusmessage=m_binder.getLocal("StatusMessage");
SystemUtils.info("statusmessage:"+statusmessage);
}
}
a. Create folder structure at your custom component location & put java and Class file to appropriate location:
9. Add class Path to {Custom_Component_Home}/HelloWorld.hda
10. Open Component Wizard Click on "Enable" by selectin "HelloWorld" component.
11. Restart the content server.
Now hit the URL:http://localhost:16200/cs/idcplg?IdcService=HELLO_WORLD
how to add a custom search template in oracle ucm 11g.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
Deleteplease give more desc of error..
DeletePlease refer "http://docs.oracle.com/cd/E21043_01/doc.1111/e10792/c03_security001.htm"
This may help.
This comment has been removed by the author.
DeleteThis comment has been removed by the author.
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
DeleteGetting a blank page with the html:
ReplyDeleteNo service defined for HELLO_WORLD.
StatusCode=-1
check custom service component is build correctly....
Deletehttp://docs.oracle.com/cd/E17904_01/doc.1111/e11011/c04_customizing_services.htm#i1084897
Check the logs for detail information...
Thanks for getting back to me so soon.
ReplyDeleteI rebuilt and now get the following error:
Unable to execute service HELLO_WORLD and function helloworld_sayHello.
The error was caused by an internally generated issue. The error has been logged.
Log reads:
Event generated by user 'sysadmin' at host 'localhost:16200'. Unable to execute service HELLO_WORLD and function helloworld_sayHello.
The service method 'helloworld_sayHello' is not defined. [ Details ]
An error has occurred. The stack trace below shows more information.
!csUserEventMessage,sysadmin,localhost:16200!$!csServiceDataException,HELLO_WORLD,helloworld_sayHello!$!csMethodNotDefined,helloworld_sayHello
intradoc.common.ServiceException:
.....
Caused by: intradoc.data.DataException: !csMethodNotDefined,helloworld_sayHello
at intradoc.server.Service.doCodeEx(Service.java:631)
at intradoc.server.Service.doCode(Service.java:575)
at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
at intradoc.server.Service.doAction(Service.java:547)
at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
at intradoc.server.Service.doActions(Service.java:543)
... 43 more
Working well with standard service "setLocalValues" so there is something in the compiling of the new service which I am building in JDeveloper.
ReplyDeleteOk....cool,
DeleteThanks for update... :)
Any clue as to what could be causing the following error?
ReplyDelete!csUserEventMessage,sysadmin,localhost:16200!$!csServiceDataException,HELLO_WORLD,helloworld_sayHello!$!csMethodNotDefined,helloworld_sayHello
intradoc.common.ServiceException: !csServiceDataException,HELLO_WORLD,helloworld_sayHello!$
*ScriptStack HELLO_WORLD
3:helloworld_sayHello,**no captured values**
Where would I get the packages :
ReplyDeleteimport intradoc.common.ServiceException;
import intradoc.common.SystemUtils;
import intradoc.data.DataException;
import intradoc.server.Service;
Thanks,
Yogita