Develop > Presentation layer > Customize IBM Sales Center > WebSphere Commerce integration


Add a new Business Object Document reply message

This section explains how to add a new BOD reply message.

Create a new response builder

To create a new reply message, first create a new response builder and then define the mapping as explained in this topic.

To create a new business document response builder, create a class that implements the com.ibm.commerce.telesales.messaging.bodreply.ITelesalesResponseBuilder

interface. After that, add an entry to the custom registry to register the new response builder created.

To add a new Business Object Document reply message:


Procedure

  1. Add an entry to the custom registry to register the new response builder.

    To do this, create a new registry file, that will override the existing TelesalesRegistry.xml file in the <install-dir>\xml\messaging directory at server side. The new file should be called TelesalesRegistry-ext.xml and placed in the same directory.

  2. Enter the following text in the new file TelesalesRegistry-ext.xml:

    <WCTBodResponseBuilderRegistry> 
    <Noun name="Noun_Name">  
    <Verb name="Vern_Name">   
    <ClassName>Class_Name</ClassName>  
    </Verb> 
    </Noun>
    </WCTBodResponseBuilderRegistry>
    

    For example:

    <Noun name="Customer"> 
    <Verb name="Create">  
    <ClassName>sample.ExtdCreateCustomer</ClassName> 
    </Verb>
    </Noun>
    

  3. Now find the wc-server.xml file under <install-dir>\xml\config and modify it such that the extended file also gets loaded along with the existing entries in the TelesalesRegistry.xml. The modified entry would look like this:

    <property 
       baseRegistryFileName="TelesalesRegistry.xml"
       baseRegistryFilePath="messaging"
       customRegistryFileName="
    TelesalesRegistry-ext.xml"
       customRegistryFilePath="
    messaging"
       display="false" 
       enableBaseRegistryOverride="
    true" />
    

    These entries can be found in the following component tag of wc-server.xml file: com.ibm.commerce.telesales.configuration.TelesalesRegistryComponentConfiguration Restart the WebSphere Commerce Test Server so that the server reflects the change to the wc-server.xml file.


Results

Guidelines for adding a new request/response class or extending the existing one

  1. First, search for the similar verb-noun combination of the request/response class in API details (Mainly these verbs: get, create, sync, cancel and process).

  2. If the required class is available, then extend it as explained in the information center.

  3. If you cannot find the related class, create a new one and register it as explained in the information center.


Related concepts

WebSphere Commerce integration


Related tasks

Map a new Business Object Document message to a new command

Map a modified Business Object Document message to a new or existing command

Modify an existing Business Object Document reply message

Replace an existing Business Object Document reply message

Related reference

IBM Sales Center Business Object Document response builders available by default


Related information

Business Object Documents long description


+

Search Tips   |   Advanced Search