Skip to Content

In an effort to create any extension in WCEM it is first necessary to extend the WCEM application.  This blog will walk you through the necessary steps to achieve this.  It is written with the assumption that all NWDI and NWDS configurations are complete and that a Software Component HMWECPLAYGRND exists.  

Create the new WCEM Main Enterprise Application

We will start out by right clicking on the HMWECPLAYGRND software component and choose New -> Development Component.   From the list we will select Enterprise Application, which can be found under Java EE.  Select next and make the following selections shown in the screenshot:

/wp-content/uploads/2012/05/1_107190.png

When complete click the Finish button and select No on the Confirm Perspective Switch dialog.  We will now perform some necessary configuration steps to complete our new development component.

Within the Component Browser of the Development Infrastructure perspective expand the SAP-WEC software component.   Select “wec/comm/main/leanapp” from the list and right click then choose Sync / Create Project -> Create Project.  On the Create DC Projects dialog click Ok and then select Yes on the Confirm Perspective Switch dialog, which should open the Java EE perspective. 

Within the Project Explorer tab of Java EE perspective, you should now see [track name[#]] wec/comm/main/leanapp.  Within [track name[#]] wec/comm/main/leanapp -> META-INF, select the file application.xml and sap.application.global.properties and choose copy.  Copy these two files to [track name[#]] test/comm/main/leanapp/mysite -> META-INF.

Switch to the Development Infrastructure Perspective by choosing the menu Window -> Open Perspective -> Other – > Development Infrastructure and select your development component test/comm/main/leanapp/mysite.  In the Component Properties tab select the Dependencies tab.  Click the add button and in the “Type text to filter” text box type “wec/comm/main”.  Select wec/comm/main/leanapp and click Finish. 

/wp-content/uploads/2012/05/2_107191.png

Switch to the Java EE Perspective by choosing the menu Window -> Open Perspective -> Other – > Java EE.  In the Package Explorer navigate to [track name[#]] test/comm/main/leanapp/mysite -> META-INF.  Open the application.xml file and choose Ok if a dialog appears confirming to make the file writable.  Within the file change the value of the context-root from “main” to “mysite” or your desired site name and save the file.  The site name will become the URL used to access your extended wcem application, i.e.  http://server:port/mysite

Open the application-j2ee-engine.xml file by right clicking on it and choosing Open With -> Text Editor and add the following within the application-j2ee-engine node, as shown in the screenshot:

<reference reference-type=”hard” prepend=”true”><reference-target provider-name=”sap.com” target-type=”library”>wec~frw~tc~jsf~lib</reference-target></reference>    

/wp-content/uploads/2012/05/3_107276.png

Save the file ignoring the error in regards to the prepend attribute.

Create the New WCEM Main Web Application

Switch to the Development Infrastructure Perspective by choosing the menu Window -> Open Perspective -> Other – > Development Infrastructure.  Right click on the HMWECPLAYGRND software component and choose New -> Development Component.  From the list select Web Module, which can be found under Java EE.  Select Next and make the following selections shown in the screenshot:

/wp-content/uploads/2012/05/4_107277.png

When complete click the Finish button and select No on the Confirm Perspective Switch dialog.  We will now perform some necessary configuration steps to complete our new development component.

In the Component Properties tab select the Dependencies tab.  Click the add button and in the “Type text to filter” text box type “wec/frw/tc” and select wec/frw/tc/core/includes and wec/frw/tc/postbuild which both exist under the SAP-WEC-FRW software component.  Click Finish and OK when complete.

/wp-content/uploads/2012/05/5_107278.png

In the Component Browser expand the SAP-WEC software component and select “wec/comm/main/leanwebapp” from the list and right click and choose Sync / Create Project -> Create Project.  Select the button Yes on the Confirm Perspective Switch dialog.  In the Java EE perspective under the Project Explorer tab on the left you should now see [track name[#]] wec/comm/main/leanwebapp.  Expand the [track name[#]] wec/comm/main/leanwebapp -> WebContent and copy the index.html file.  Paste this file in [track name [#]] test/comm/main/leanwebapp/mysite -> WebContent. 

Now expand the [track name [#]] wec/comm/main/leanwebapp -> WebContent -> WEB-INF and copy the web.xml file.  Paste this file in [track name [#]] test/comm/main/leanwebapp/mysite -> WebContent ->WEB-INF choosing Yes to overwrite it. 

In the Project Explorer navigate to [track name [#]] test/comm/main/leanapp/mysite -> META-INF.  Open the application.xml file and change the value of the web-uri to “test.sap.com~test~comm~main~leanwebapp~mysite.war” as shown in the screenshot below and save the file.

/wp-content/uploads/2012/05/6_107279.png

Complete the WCEM Main Enterprise Application Configuration

Switch to the Development Infrastructure Perspective by choosing the menu Window -> Open Perspective -> Other – > Development Infrastructure.  Select your developement component test/comm/main/leanapp/mysite and in the Component Properties tab select the Dependencies tab.  Click the add button and in the “Type text to filter” text box type “test/comm/main/leanwebapp/mysite” and select the returned entry as shown in the screenshot and click Finish.

/wp-content/uploads/2012/05/7_107280.png

Deploy the Application

Within the Development Infrastructure perspective, right click on the test/comm/main/leanapp/mysite application and choose Development Component -> Deploy.  On the Deploy DCs dialog select the Deselect All button, making sure that only your Development Component is selected, and then finally click the OK button.

The new deploy site should be accessible using the following link:

http:// server:port/mysite

Create the New WCEM Web Channel Builder Enterprise Application

Switch to the Development Infrastructure Perspective by choosing the menu Window -> Open Perspective -> Other – > Development Infrastructure.  Right click on the HMWECPLAYGRND software component and choose New -> Development Component.  From the list select Enterprise Application which can be found under Java EE, select next and make the following selections shown in the following screenshot:

/wp-content/uploads/2012/05/8_107281.png

Click the Finish button and select No on the Confirm Perspective Switch dialog.  We will now perform some necessary configuration steps to complete our new development component.

In the Component Browser expand the SAP-WEC software component, select “wec/comm/wcb/leanapp” from the list and right click and choose Sync / Create Project -> Create Project.  Click OK on the Create DC Projects dialog.  Select Yes on the Confirm Perspective Switch dialog.  In the Java EE perspective under the Project Explorer tab on the left you should now see [track name[#]] wec/comm/wcb/leanapp.  Navigate to [track name[#]] wec/comm/wcb/leanapp -> META-INF and select application.xml and sap.application.global.properties and choose copy.  Copy these two files to [track name[#]] test/comm/wcb/leanapp/mywcb -> META-INF

Switch back to the Development Infrastructure Perspective by choosing the menu Window -> Open Perspective -> Other – > Development Infrastructure.  Select your development component test/comm/wcb/leanapp/mywcb and within the Component Properties tab select the Dependencies tab.  Click the add button and in the “Type text to filter” text box type “wec/comm/wcb/leanapp” and check the returned entry.  Now type “test/comm/main/leanapp/mysite” in the filter and select the returned entry.  Now type “wec/frw/mc/wcb/wapp” in the filter and select the returned entry.  Click Finish when complete.  This Dependencies list should now appear as:

/wp-content/uploads/2012/05/9_107282.png

Switch to the Java EE Perspective by choosing the menu Window -> Open Perspective -> Other – > Java EE and within the Package Explorer navigate to [track name[#]] test/comm/wcb/leanapp/mywcb -> META-INF.  Open the application.xml file and save it.  Choose Ok if a dialog appears confirming to make the file writable.  Within the file change the value of the context-root from “wcb” to “mywcb” and save the file.

Open the application-j2ee-engine.xml file by right clicking on it and choosing Open With -> Text Editor and add the following within the application-j2ee-engine node  as shown in the screenshot:

<reference reference-type=”hard” prepend=”true”><reference-target provider-name=”sap.com” target-type=”library”>wec~frw~tc~jsf~lib</reference-target></reference>

/wp-content/uploads/2012/05/10_107283.png

Save the file ignoring the error in regards to the prepend attribute.

Deploy the Application

Within the Development Infrastructure perspective, right click on the test/comm/wcb/leanapp/mywcb application and choose Development Component -> Deploy.  On the Deploy DCs dialog select the Deselect All button, making sure that only your Development Component is selected, and then finally click the OK button.

The new deploy site should be accessible using the following link:

http://server:port/mywcb

You are now ready to start creating extensions within your own site.

In addition to this blog please check the WCEM WIKI as the central info hub for all WCEM related information. Also read the SAP Expert Blogs to get first hand information and guidance about SAP Web Channel Experience Management.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Ingo Woesner

    Hi Jamie,

    your technical blogs about WCEM are very valuable.

    May I encourage you to add a new blog about adapting the UI to customer specific needs (e.g. how to apply a corporate identity to the WCEM).

    Could you please also describe the tools required or recommended to do this?

    Also it will be intersting to read if SAP specific knowledge is required to adapt the UI.

    Thank you very much,

    Ingo

    (0) 
  2. Adriano Puleo

    hi,

    thank you very much for your blog.

    I am trying to follow your steps but when i try to put under the dependencies the “wec/comm/main” i can’t find anything…

    can you please help me figure out why?

    Thank you and regards

    Adriano

    (0) 

Leave a Reply