Administer > Manage WebSphere Commerce features > WebSphere Commerce integration with WebSphere Portal > Maintain the WebSphere Commerce portlet application


Add a new WebSphere Commerce component service to MVCPortlet

After creating a new WebSphere Commerce component service, register the client library and its runtime objects to the MVCPortlet application for the new component service to be available for use in the MVCPortlets.

When updating an existing WebSphere Commerce component service in the MVCPortlet application, be aware of the following components inside of the MVCPortlet application:

  1. Runtime libraries

    • Client library JAR

    • Data object JAR

  2. Deployment descriptor

    • Component service WSDL

    • Service handler

  3. Component service configuration


Before you begin

Ensure that you have completed the following tasks when upgrading the Foundation runtime libraries in the MVCPortlet application:


Procedure

  1. Determine which WebSphere Commerce component service to add to the MVCPortlet application. For example: MyCatalog.

  2. Import the component service client library:

    1. Right-click the MVCPortlet/WebContent/WEB-INF/lib directory in the Project Explorer.

    2. Select Import > General > File System.

    3. Click Next.

    4. Click Browse and navigate to the wc.modules/workspace/WC directory of the WebSphere Commerce installation.

    5. Select the component service client library JAR files. For example: MyCatalog-Client.jar, MyCatalogData-Objects.jar.

    6. Click Finish.

    7. Click Yes to overwrite the existing version of the JAR file in the workspace.

  3. Configure the component service client library:

    1. Expand the MVCPortlet project to MVCPortlet/Java Resources: src/config.

    2. Right-click the directory with the component name, for example, com.mycompany.commerce.mycatalog, and select Import > General > File System.

    3. Click Next.

    4. Click Browse and navigate to the xml/config/component_name directory of the WebSphere Commerce installation, where component_name is the name of the component service. For example: com.ibm.commerce.catalog.

    5. Select the component service SDO.properties client configuration file.

    6. Click Finish.

    7. Click Yes to overwrite the existing version of the file in the workspace.

  4. Configure the get-data JSTL tag library:

    1. Expand the MVCPortlet project to MVCPortlet/WebContent/WEB-INF/config.

    2. Right-click the directory with the component name, for example, com.mycompany.commerce.mycatalog, and select Import > General > File System.

    3. Click Next.

    4. Click Browse and navigate to the Stores/WebContent/WEB-INF/config/component_name directory within the workspace, where component_name is the name of the component service. For example: com.ibm.commerce.catalog.

    5. Select the get-data-config.xml configuration files.

    6. Click Finish.

    7. Click Yes to overwrite the existing version of the file in the workspace.

  5. Enable the component service in the MVCPortlet application:

    1. Import the component service WSDL:

      1. Right-click MVCPortlet/WebContent/WEB-INF/wsdl.

      2. Select Import > General > File System.

      3. Click Next.

      4. Click Browse and navigate to the wc.modules/workspace/WebServicesRouter/WebContent/component-services/wsdl directory of the WebSphere Commerce installation.

      5. Select a component service WSDL file. For example: CatalogServices.wsdl.

      6. Click Finish.

      7. Click Yes to overwrite the existing version of the file in the workspace.

      8. If you are using the TCP monitor to forward the service request to the WebSphere Commerce server, update the SOAP address binding at the end of this WSDL file by replacing http://localhost/ with http://localhost:81/. Port 81 is the port number that the TCP monitor will listen on the localhost.

    2. Generate the JAX-RPC Web service:

      1. Right-click the newly imported WSDL file, for example, CatalogServices.wsdl, in the MVCPortlet/WebContent/WEB-INF/wsdl directory.

      2. Select Web Services.

      3. Select Generate Client and click Finish.

      4. Accept all warnings related to Automatic File Overwriting.

    3. Associate the JAX-RPC Web service handler to the component service:

      1. Open the WAR deployment descriptor, MVCPortlet/WebContent/WEB-INF/web.xml.

      2. Select the WS Handler tab.

      3. In the Service references list, select the newly imported component service reference, for example, service/MyCatalogServices.

      4. Click Add.

      5. Enter the following information:

        Display name

        For example, MyCatalog Handler.

        Handler name

        For example, MyCatalog Handler.

        Handler class

        com.ibm.commerce.foundation.internal.client.services.invocation.impl.JAXRPCWebServiceProxyHandlerImpl

  6. Configure additional deployment settings in the WebSphere Portal runtime environment:

    After you have installed the MVCPortlet application to the WebSphere Portal runtime environment, in addition to the typical configuration that do for the basic component services, also define the Web service endpoint URL for the newly added component service using the WebSphere Application Server administration console:

    1. Log on to the WebSphere Application Server administrative console using the WebSphere Portal secure user.

    2. Click Applications > Enterprise Applications.

    3. Select the enterprise application that was used for deploying the MVCPortlet application.

    4. Select Web Modules.

    5. Select the MVCPortlet.war file and click Web services client bindings.

    6. For each Web service, click Edit link in the Port Information column.

    7. Change the Overridden EndPoint URL for the new component service.

      For example:

      • http://hostname:8007/webapp/wcs/component/mycatalog/services/MyCatalogServices


+

Search Tips   |   Advanced Search