1. Component Plugin Configuration in struts-config-order-services.xml
<plug-in className="com.ibm.commerce.struts.ComponentPlugIn">
<set-property property="componentId" value="order"/>
<set-property property="clientFacadeClassName" value="com.ibm.commerce.order.facade.client.OrderFacadeClient"/>
</plug-in>
2. Struts Action Mapping Configuration:
<action parameter="order.addOrderItem" path="/OrderChangeServiceItemAdd" type="com.ibm.commerce.struts.ComponentServiceAction">
<set-property property="authenticate" value="0:0"/>
<set-property property="https" value="0:1"/>
</action>
3. ComponetServiceAction.java class invokeService(ActionMapping mapping,HttpServletRequest request) method has following code which calls the appropriate method on component client facade
{
RequestHandle handle = (RequestHandle)request.getAttribute("EC_requestHandle");
Map responseMap = ComponentPlugIn.invokeComponentService(handle, inMap, mapping.getParameter());
}
No comments:
Post a Comment