WebServicesRouter Web module configuration

+

Search Tips   |   Advanced Search

WebSphere Commerce Developer workspace contains a project named WebServicesRouter. This project is intended to define all the Web services that your WebSphere Commerce 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. If you want to change the port of the Web services, refer to the Mapping virtual hosts for Web modules in the WAS 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 information center. Search for the information about creating Web services with the IBM WebSphere run-time environment.

File Description
*.wsdl Defines the component service and all the operations it offers. 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 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 JAX-RPC mapping required by the WAS 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 Used by the WAS 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 interface...

com.ibm.commerce.webservices.OpenWebServicePortType

However, for every new service defined, a new WSDL-to-JAX-RPC mapping must be added to this file.

web.xml 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 WebSphere Web service extension file used to specify security settings for Web services. Contains bindings between service names and either the port types or servlet names.
ibm-webservices-bnd.xmi 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

Understanding the WebSphere Commerce Web service framework

Related tasks

Configure WebSphere Commerce Developer for Web service development

Tutorial: Defining an inbound Web service

Tutorial: Defining a User Registration Web Service