Showing posts with label struts component service. Show all posts
Showing posts with label struts component service. Show all posts

Saturday, 29 March 2014

WCS Component Service strusts configuration and invocation Details

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());
}

How to customize java.util.logging.Logger class to write logs in separate file than System.out.log in Websphere commerce/ HCL commerce)

/** * This method updated the passed in java.util.logging.Logger object with * custom file handler to write logs data form that class ...