IBM Support

Changing the namespace in WebSphere Lombardi Edition (WLE) and IBM Business Process Manager (BPM) services exposed as web services.

Question & Answer


Question

How do you change the default namespace in the INBOUND web services? That is, the namespace in the WSDL generated for product services that you have exposed as web services.

Answer

Note: The information that is contained in this document has been moved to dW Answers at this location. The new format will allow you to ask questions of the community to better understand the information. This technote will be archived in 60 days. Please bookmark the new location.

By default, the product uses use the host name for the target namespace of the exposed web service. This document describes how to change the base namespace in the product INBOUND web services without changing the base URL.

You can change this default by using the following setting from the 99local.xml file:

 <webservices merge="mergeChildren">
            <base-url>
http://host:port/teamworks/webservices</base-url>

This setting still changes with each environment so, for example, if you are using a Microsoft .NET client to call the web service in the product, then you will need to recompile your code in each environment. The namespace changes for each of your product environments (that is Development, Test, Production).

To make the web service namespace consistent across all of your product environments, you can set an additional parameter in the product configuration files.

Here is a snippet from the 99Local.xml file:

     <webservices merge="mergeChildren">
           <!-- Specifies the base URL to be used during generation of the WSDL. If Teamworks is             running behind a firewall and a proxy server is used to access it then you have to specify here the location on the proxy server. -->
           <base-url>
http://myhost.domain.com:9006/teamworks/webservices</base-url>
           <!-- for bug 18857, setting custom namespace independently from base-url.
           By default, base-url is used instead of namespace.
           For example, for web-service 'WebService_bug18857'
           in these case we will have following namespaces:
             
http://www.lombardi.com/teamworks/webservices/WebService_bug18857.tws, http://localhost:7001/teamworks/webservices/WebService_bug18857.tws.
           By default, base-namespace is commented for compatibility with old code.
           -->
           <!--
           <base-namespace>
http://www.lombardi.com</base-namespace>
           -->
           <override-default-settings webservice-name="TeamWorksQueryServices">
               <schema-namespace>

http://lombardisoftware.com/webservices/TeamWorksQueryServices

</schema-namespace>
           </override-default-settings>
       </webservices>


To force a specific namespace you should be able to uncomment the <base-namespace> element that is highlighted in the previously listed code and set the desired value for your namespace. This change overrides the value that is used in the <base-url> config value. When you change this setting, the product regenerates the WSDL for the product web services when you restart process server.

As a best practice, you should make this change in your 100Custom.xml file rather than directly in the 99Local.xml file. See the Teamworks Config File Overview and Explanation document for detailed information about adding this kind of setting to the 100Custom.xml file.

[{"Product":{"code":"SSFPRP","label":"WebSphere Lombardi Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web Service","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.2;7.1;7.0.1;6.2.2;6.2.1;6.2;6.1;6.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSFTDH","label":"IBM Business Process Manager Standard"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web Services","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0.1;8.0;7.5.1;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

452

Product Synonym

WLE;BPM

Document Information

Modified date:
15 June 2018

UID

swg21439872