+

Search Tips   |   Advanced Search

Add service references to the wps.war web application

The WSRP service clients and service references are defined in the web.xml deployment descriptor of the wps.war web application. That web application that is contained in the portal enterprise application archive wps.ear. To add service references, you modify the web.xml deployment descriptor. The following excerpt from file web.xml shows the definition of the default WSRP service references:

You can define extra service references by adding one or more service-ref elements. The following list shows the subelements that a new service-ref element must define:

The following code sample shows how we can add two new service references to the web.xml file. Note the position of the new service-ref elements immediately after the default service references:

The example defines two new service references: service/wsrp/AlternativeWSRPService_v2 and service/wsrp/WSRPService_v2_Second_Alternative. After you updated the portal application, we can configure the new service references in a WebSphere Application Server administrative client. After you restart the portal, the WSRP Consumer can find the service references. When you create or edit a Producer definition, we can assign the new service references to Producer ports. For the WSRP Consumer to find the service references, we must name the service reference name according to the following syntax:

As the administrator of the Consumer portal, we can assign a service reference to a Producer port of a Producer definition. Use the service-ref-id as the identifier for selecting that service reference. If a service reference name of a new service reference does not contain the prefix service/wsrp/, the WSRP Consumer cannot find the service reference. When we assign a service reference to a Producer port, the Web Services Configuration portlet shows the list of all defined service references. The list shows only the service reference IDs of the service reference without the common prefix service/wsrp.

Parent topic: Create and deploying custom service references