Defining the authoring services such as create, save, and
delete for the Management Center object to the WebSphere Commerce
OAGIS service consists of first defining the URL parameter mapping
to the Noun in the BOD request, then configuring the Struts action
to indicate the Verb and additional processing information.
About this task
To map a Management Center object to a business object
document request:
Procedure
- Open
WebSphere Commerce Developer.
- Navigate to the LOBTools web application project.
- In the WebContent/WEB-INF/config/serviceModuleName directory,
(where serviceModuleName is the name of the service
module, such as com.ibm.commerce.catalog) create
a XML file that will define the mapping between elements of the Noun
to properties of the Management Center object.
It is recommended
to use the name of the tool as part of the file name. For example,
if the Management Center object is used for the catalog tool, name
the file mycompany-catalog-clientobjects.xml
where catalog
represents
the catalog tool and mycompany
indicates this file
is provided by your organization.
- In the
Noun
element, add the Noun to
the list of Nouns. If this Noun has any parts that can be modified,
indicate those elements under the Noun and specify the part attribute
as true. If the Noun has a UserData
field that should
be mapped to the Management Center object, the property name should
begin with x_
and proceeding is a location pointer
of the UserData field in the Noun that property represents.
- In the
URL
element, add the mapping
of the Management Center object to the Noun. For each property of
the Management Center object, specify the XPath location of the Noun
that property represents.
- In the
ValidationErrorMapping
element,
specify the resource bundle that will be used to override the error
messages returned by the server. A mapping of validation reason codes
can be mapped to properties of the each Management Center object.
- Open the struts-extension.xml file and add the new
XML file to the list of files specified in the config property of
the
BusinessObjectDocumentPlugin
. - In the same file, create new
BusinessObjectDocument
Struts
actions for each authoring service supported by the Management Center
object. These Struts actions will define the verb and additional
information required to invoke the Business Object Document
service.
- If the Management Center object represents the Noun, the Create
and Delete services correspond to the Process business object document
request with an action code of Create or Delete.
- If the Management Center object represents a part of the Noun,
the Create and Delete services correspond to the Change business object
document request with an action code of Add or Delete.
- Update services will always correspond to the Change business
object document with an action code of Change.
- Save the
struts-extension.xml
file.
- Restart the WebSphere Commerce Server and test your changes.
- Deploy
your changes to your production environment.