Develop > Persistence layer > WebSphere Commerce Web services with JSP pages > Configure WebSphere Commerce Developer for Web service development


WebServicesRouter Web module configuration

WebSphere Commerce Developer workspace contains a project named WebServicesRouter. This project is intended to define all the Web services that the WCS instance will provide; that is, it will contain all the WSDL, XML, and configuration files needed to define business logic that will be available as Web services. You should use this project to define new services, update existing services, and for any other Web service development tasks.


URI mapping

For security reasons, by default Web services are associated with the Tools Virtual Host (port 8000) on the WebSphere Commerce Server, as it is a secure port (SSL only). WebSphere Commerce Developer operates on all WebSphere Commerce enabled ports. Web services can contain sensitive data and there is significant risk in putting Web services on port 80 in a production environment. To change the port of the Web services, refer to the Mapping virtual hosts for Web modules in the WebSphere Application Server information center.

The WebServicesRouter Web module is mapped to the context root /webapp/wcs. The Web services runtime appends /services/ port type to get the complete URI. The port type is defined in the WSDL where the Web service is declared.


Project layout

The following figure demonstrates the directory layout of the WebServicesRouter project:


Configuration files

The following table shows the different configuration files used in developing Web services. You can find more information about them in the . Rational Application Developer v.6 Search for the information about creating Web services with the IBM WebSphere runtime environment.

File Description
*.wsdl This file defines the component service and all the operations it offers. This is the file that will be exposed to Web service clients as a definition of the services provided and the structure of the business object the service expects.
*.xsd This file declares the XML schema for an object used in a service operation. Changes to the object, such as addition of a new parameter, require changes to this file.
*_mapping.xml This is the JAX-RPC mapping required by the WebSphere Application Server Web service engine. This file defines the Java representations of all the objects and operations specified in the WSDL description. Because the WebSphere Commerce Web service framework defines a single generic endpoint, this file maps the objects and operations to SOAP elements and delegates the execution to the single generic endpoint.
webservices.xml This file is used by the WebSphere Application Server Web service engine to map WSDL files to the appropriate JAX-RPC mapping files. This file also specifies the endpoint for delegating to for performing the services. Under the WebSphere Commerce Web service framework, the endpoint is always the single generic endpoint represented by the com.ibm.commerce.webservices.OpenWebServicePortType interface. However, for every new service defined, a new WSDL-to-JAX-RPC mapping must be added to this file.
web.xml This file is necessary for accepting Web service requests over HTTP. This file declares the servlets to be used for accepting and delegating Web service requests. This file should not require updates.
ibm-webservices-ext.xmi This WebSphere Web service extension file is used to specify security settings for Web services. It contains bindings between service names and either the port types or servlet names.
ibm-webservices-bnd.xmi This file maps Web services to the transport listeners found in the WebServicesRouter project. For new services, new mappings are required.

The following is a summary of configuration changes associated with common Web service development tasks:


Related concepts

WebSphere Commerce Web services with JSP pages

Understand the WebSphere Commerce Web service framework


Related tasks

Configure WebSphere Commerce Developer for Web service development

Customize the Web service client invocation XML file

Enable JMS for Web services


Related information

Tutorial: Defining an inbound Web service

Tutorial: Defining a User Registration Web Service


+

Search Tips   |   Advanced Search