Wednesday, 24 February 2016

IBM WCS tables used while creating new content as URL Asset

ATCHTGT -- ATTACHMENT TARGET
ATCHTGT (ATCHTGT_ID, STOREENT_ID, MEMBER_ID, IDENTIFIER, ATTACHUSG_ID, FIELD1, FIELD2, FIELD3, FIELD4, OPTCOUNTER)

ATCHAST -- This table holds the asset content url if is it url asset etc.
ATCHAST (ATCHAST_ID, STOREENT_ID, ATCHTGT_ID, ATCHASTPATH, DIRECTORYPATH, MIMETYPE, MIMETYPEENCODING, TIMECREATED, TIMEUPDATED, IMAGE1, IMAGE2, OPTCOUNTER)

COLLATERAL -- This table holds the content name and other info
COLLATERAL (COLLATERAL_ID, STOREENT_ID, COLLTYPE_ID, NAME, URL, FIELD1, FIELD2, OPTCOUNTER, BEHAVIOR)

COLLDESC -- other language dependent data for content
COLLDESC (COLLATERAL_ID, LANGUAGE_ID, LOCATION, MARKETINGTEXT, FIELD1, FIELD2, OPTCOUNTER, LONGMKTGTEXT)

ATCHREL -- This table holds the attachment relation between a business object and an attachment target; OBJECT_ID is same as COLLATERAL_ID
ATCHREL (ATCHREL_ID, OBJECT_ID, ATCHOBJTYP_ID, ATCHTGT_ID, ATCHRLUS_ID, LASTUPDATE, SEQUENCE, BIGINTOBJECT_ID, OPTCOUNTER)

List of IBM WCS tables related with e-marketing activity and asset content

atchast          
atchastlg              
atchrel                    
atchtgt                  
atchtgtdsc            
collateral              
colldesc                
dmactivity            
dmelement              
dmelementnvp        
dmemspotdef      
dmtriglstn              
folderitem

Tuesday, 16 February 2016

Solr Search Index setup for new languages in WCS v7

1.     Add the new supported language in the STORELANG database table for Extended Site Catalog Asset Store (storeId=10051).

2.    Perform the following steps for the following files:
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/locale
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/locale
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CataloGroup/conf/locale
2.1.   Create a folder for your locale. For example, nl_NL indicates a Dutch language locale for Netherlands.
2.2.  Create the necessary files for your new locale directory.
a.    If language is already included in the existing locale files, copy the files from the original locale directory. For example, fr_FR, to the new directory, fr_NL.
b.    If language is not included in the existing locale files, use the file names and structure from another locale as a sample for its supported structure and organization for example en_GB.
2.3.  Optional: If there are any stop words for the language, create a file, stopwords.txt under the new directory for the schema.xml file. Save your changes and close the file.
2.4.  Copy the schema.xml file under new locale directory created in above step 2.2  file from Search project in SVN repository trunk
CatalogEntry Path: Search/solr/home/MC_10001/en_GB/CatalogEntry/conf/schema.xml
CatalogGroup Path:
Search/solr/home/MC_10001/en_GB /CatalogGroup/conf/schema.xml

3.    Update the following files for customizations if any for a specific project. Latest customized copy of these files can be found in the solrhome (WC_installdir/instances/instance_name/search/solr/home) for each core (e.g.
Search/solr/home/MC_10001/en_GB/CatalogEntry/conf/ wc-data-config.xml)
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/database/db2/wc-data-config.xml
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/ database/db2/wc-data-config.xml
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CataloGroup/conf/ database/db2/wc-data-config.xml

           
4.    Update the following files for customizations if any for a specific project.
Directory: WC_installdir/components/foundation/samples/dataimport/catalog/db2
Files:   wc-dataimport-preprocess-attribute.xml
wc-dataimport-preprocess-fullbuild.xml
wc-dataimport-preprocess-unstructured-content.xml
Latest customized copy of these files can be found in the solr pre-processConfig directory WC_installdir/instances/instance_name/search/ pre-processConfig)
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/database/db2/wc-data-config.xml
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/ database/db2/wc-data-config.xml
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CataloGroup/conf/ database/db2/wc-data-config.xml

           
5.    Run the setupSearchIndex utility asper the process provided in HCL commerce documentation
For Local Dev environments need to run below script:
C:\WCDE_ENT70\components\foundation\subcomponents\search\bin>
setupSearchIndex.bat  -masterCatalogId 10001 –setupWebContent false
This script will also update database tables SRCHCONFEXT and SRCHCONF
6.    solr.xml config file will be updated with new locale cores once setupSearchIndex utility executes successfully.
File Location: solrhome (WC_installdir/instances/instance_name/search/solr/home)/MC_10001/solr.xml
7.    wc-search.xml config file will be updated with new locale cores once setupSearchIndex utility executes successfully.
File Location: WC/xml/config/ com.ibm.commerce.catalog-ext/wc-search.xml


8.    Once everything is done we need to run the solr pre-process and build-index scripts for new locales.

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

Wednesday, 6 November 2013

Virtual Host Changes for WebServicesRouter Project: Default Port is 8000 which is secure port



HTTPServer plugin-cfg.xml path on app server or httpserver based on environments:
C:\IBM\WAS\profiles\wc_instancename\config\cells\cell_name\nodes\WC_instancename_node\servers\webserver1

Change
1. First open the commerce deployment manager admin console and update the virtual host mapping for WebServicesRouter project from VH_instancename_Tools to VH_instancename.
2. Click on enterprise application link and then click on save configuration link on this page. Don’t check synchronize with node check box and click OK.
3. Now click on nodes under system administration link and then select the appropriate node and click synchronize
4. Check logs , this project should bound to new virtual host group VH_wc_instancename not VH_wc_instancename_Tools

<UriGroup Name="VH_wc_instancename_wc_instancename_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/webapp/wcs/stores/*"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/InitializationServlet/*"/>
<!-- added below uri so that webservicerouter project urls like /webapp/wcs/services/   can also be handled by virtual host group VH_wc_instancename-->
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/webapp/wcs/*"/>
</UriGroup>
<Route ServerCluster="wc_instancename_Cluster" UriGroup="VH_wc_instancename_wc_instancename_Cluster_URIs" VirtualHostGroup="VH_wc_instancename"/>







It can also be achieved through following way:

httpd.conf file path on sefags840:   C:\IBM\WCS\instances\wc_instancename\httpconf

<VirtualHost sefags840.secotools.net:8000>
SSLEnable
SSLClientAuth 0
ServerName sefags840.secotools.net
Alias /wcsstore "C:\IBM\WAS\profiles\wc_instancename\installedApps\WC_wc_instancename_cell\WC_wc_instancename.ear/Stores.war"
Alias /accelerator "C:\IBM\WAS\profiles\wc_instancename\installedApps\WC_wc_instancename_cell\WC_wc_instancename.ear/CommerceAccelerator.war/tools/common/accelerator.html"
Alias /wcs "C:\IBM\WAS\profiles\wc_instancename\installedApps\WC_wc_instancename_cell\WC_wc_instancename.ear/CommerceAccelerator.war"
Alias /wcwkspcadmin "C:\IBM\WAS\profiles\wc_instancename\installedApps\WC_wc_instancename_cell\WC_wc_instancename.ear/WorkspaceAdministration.war"
Alias /workspaceadmin "C:\IBM\WAS\profiles\wc_instancename\installedApps\WC_wc_instancename_cell\WC_wc_instancename.ear/WorkspaceAdministration.war/tools/workspaceadmin/wkspcadmin.html"
</VirtualHost>

Change
Comment out SSLEnable & SSLClientAuth 0 lines in above configuration like this 
#SSLEnable
#SSLClientAuth 0

Thursday, 31 October 2013

WCS Code to find storeId from user LogonId (Expecting that user has registereigd customer role from one store only)

MemberRoleAccessBean m = new MemberRoleAccessBean();
Enumeration mEnum = m.findByMemberIdRoleId(cmdContext.getUserId(),Integer.valueOf("-29"));
Enumeration sEnum = null;
if(mEnum.hasMoreElements()){
   m =(MemberRoleAccessBean)mEnum.nextElement();
   StoreEntityAccessBean stAb = new StoreEntityAccessBean();
   sEnum = stAb.findByMember(Long.valueOf(m.getOrgEntityId()));
   if (sEnum.hasMoreElements()){
   stAb =(StoreEntityAccessBean)sEnum.nextElement();
   storeId = stAb.getStoreEntityId();
}
}

Wednesday, 30 October 2013

WCS developer toolkit , WC.ear deployment files location

Error: SRVE0017W: A WebGroup/Virtual Host to handle localhost:443 has not been defined.

It could be the reason that WC application is not deployed to Websphere Test Server; we can see that in app server admin console enterprise application section if it is installed or not. This sometimes happens when we do add/remove wc project in toolkit.

In WCS developer toolkit , C:\IBM\WCToolkitEE60\wasprofile\config\cells\localhost\applications folder contains the WC.ear file which contains deployment files like deployment.xml, resources.cml and variables.xml

if in above file location applications folder is missing then copy it from backup toolkit.

C:\IBM\WCToolkitEE60\wasprofile\config\cells\localhost\nodes\localhost\serverindex.xml contains wc.ear deployment configuration for app server

serverindex.xml should look like this



<?xml version="1.0" encoding="UTF-8"?>

<serverindex:ServerIndex xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:serverindex="http://www.ibm.com/websphere/appserver/schemas/5.0/serverindex.xmi" xmi:id="ServerIndex_1" hostName="localhost">

<serverEntries xmi:id="ServerEntry_1224144829726" serverName="server1" serverType="APPLICATION_SERVER">

<deployedApplications>WC.ear/deployments/WC</deployedApplications>

<specialEndpoints xmi:id="NamedEndPoint_1224144829726" endPointName="BOOTSTRAP_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829726" host="localhost" port="2809"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829727" endPointName="SOAP_CONNECTOR_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829727" host="localhost" port="8880"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829728" endPointName="SAS_SSL_SERVERAUTH_LISTENER_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829728" host="localhost" port="9401"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829729" endPointName="CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829729" host="localhost" port="9403"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829730" endPointName="CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829730" host="localhost" port="9402"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829731" endPointName="WC_adminhost">

<endPoint xmi:id="EndPoint_1224144829731" host="*" port="9060"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829732" endPointName="WC_defaulthost">

<endPoint xmi:id="EndPoint_1224144829732" host="*" port="80"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829733" endPointName="DCS_UNICAST_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829733" host="*" port="9353"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829734" endPointName="WC_adminhost_secure">

<endPoint xmi:id="EndPoint_1224144829734" host="*" port="9043"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829735" endPointName="WC_defaulthost_secure">

<endPoint xmi:id="EndPoint_1224144829735" host="*" port="443"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829736" endPointName="SIB_ENDPOINT_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829736" host="*" port="7276"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829737" endPointName="SIB_ENDPOINT_SECURE_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829737" host="*" port="7286"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829738" endPointName="SIB_MQ_ENDPOINT_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829738" host="*" port="5558"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144829739" endPointName="SIB_MQ_ENDPOINT_SECURE_ADDRESS">

<endPoint xmi:id="EndPoint_1224144829739" host="*" port="5578"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144830117" endPointName="ORB_LISTENER_ADDRESS">

<endPoint xmi:id="EndPoint_1224144830117" host="localhost" port="9100"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144901755" endPointName="WC_PORT_1">

<endPoint xmi:id="EndPoint_1224144901755" host="*" port="8000"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144901817" endPointName="WC_PORT_2">

<endPoint xmi:id="EndPoint_1224144901817" host="*" port="8002"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144901880" endPointName="WC_PORT_3">

<endPoint xmi:id="EndPoint_1224144901880" host="*" port="8004"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144901927" endPointName="WC_PORT_4">

<endPoint xmi:id="EndPoint_1224144901927" host="*" port="8006"/>

</specialEndpoints>

<specialEndpoints xmi:id="NamedEndPoint_1224144901958" endPointName="WC_PORT_5">

<endPoint xmi:id="EndPoint_1224144901974" host="*" port="8007"/>

</specialEndpoints>

</serverEntries>

</serverindex:ServerIndex>

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 ...