Defining retrieval services for a custom Management Center object
If you want to display and manage a custom a Management Center object in Management Center, you must define a retrieval service to retrieve and display the object information. To define a retrieval service, create JSP fragments to retrieve the object information and transform the information into an XML-formatted representation that is expected by Management Center.
About this task
get
and find
URL requests for retrieving the object information.
After you create the mediation JSP fragments, you must define the Spring framework configuration to identify the controller JSP that invokes the search expression for retriving the object information. You must also define the Spring framework configuration to identify the serialization JSP fragments that mediate the transformation of the retrieved information into the XML-format that is expected by Management Center.
- For controller JSP files, open the Enterprise Explorer view and expand Find*.jsp. . Review files that are named
- For serialization JSP fragments, expand *.jsp. . Review files that are named
Procedure
- Open IBM WebSphere Commerce Developer.
-
In the Enterprise Explorer view, expand mycompany is the name of your
company and component is the name of the object component.
If the mycompany and
component directories do not exist, create the
directories.
, where For example, if your custom object is an extension of the catalog component, your directory structure can be.
-
Within the component directory, create a controller
JSP page to retrieve the object information. Use existing controller JSP files as templates to help
you create your file.
- Within your file, include the element
<jsp:directive:include file="" />
to identify the serialization JSP fragment to use to transform the the object into the expected XML representation. - The name of your controller JSP file should match the usage of the file. For instance, if the file defines a request to get warranty information for a product, the file name can be GetProductChildren-Warranty.jsp.
- Within your file, include the element
- In the component directory, create a folder with the name serialize.
- Within the new serialize directory, create a JSP fragment file that is named SerializeObject.jspf, where Object is the name of your custom Management Center object.
- Within your new serialization JSP fragment, define the code to transform the data for the object into an XML formated response. Use existing serialization JSP fragments as templates to help you create your file.
- Expand .
-
Open the spring-extension.xml file for editing and add
<bean>
element definitions to register your new JSP files. - Restart the WebSphere Commerce Test Server and test your changes.