- Mayank Gupta, Computer Scientist @ Adobe
Steps to add a custom service in Correspondence Management solution are as follows:
- The implementation for this user story involves code changes and rebuilt. So, one is required to setup the development environment via steps mentioned @ Setting up development environment.
- Add your sample custom service interface and implementation class in the CorrespondenceManagementSolutionTemplate/Services project for example @ com.adobe.icc package in the source code. See the sample @ http://blogs.adobe.com/LiveCycleHelp/files/2012/06/SampleCustomService1.zip.
- Now define your service as a spring bean. For this, add the following entry in your CorrespondenceManagementSolutionTemplate\Services\resources\META-INF\spring\cm\adobe-cm-spring-config.xml file:
<bean id=”sampleCustomService” class=”com.adobe.icc.SampleCustomServiceImpl” /> - Now expose your spring bean as a osgi-service. For this, add the following entry in your CorrespondenceManagementSolutionTemplate\Services\resources\META-INF\spring\osgi-context.xml file:
<bp:service interface=”com.adobe.icc.SampleCustomService” ref=”sampleCustomService” >
<bp:service-properties><entry key=”connectors.httpinvoker” value=”true” />
<entry key=”connectors.httpinvoker.alias” value=”/sampleCustomService” />
<entry key=”connectors.remoting” value=”true” />
<entry key=”connectors.remoting.id” value=”sampleCustomService” />
</bp:service-properties>
</bp:service> - Rebuild and redeploy the Solution template to view the changes. For information on rebuilding and redeploying, see Building and deploying the Solution Template.
DIGITAL JUICE
No comments:
Post a Comment
Thank's!