Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files


Work with web services endpoint URL fragment property files

We can use property files to manage or change endpoint URL fragments for web services accessed through HTTP, SOAP and JMS, or directly as enterprise beans. URL fragments are used to form complete web services endpoint addresses included in published Web Services Description Language (WSDL) files.

Endpoint URL fragments are optional metadata for web services applications. We can use either the admin console or property files to configure and manage URL fragments. Before you can query the URL fragments, first set the URL fragments using either the admin console or applyConfigProperties. After you initially set the URL fragments using the admin console or property files, you can now modify the web services endpoint URL fragment using property files or the admin console.

To learn about using the admin console to set the URL fragments, see the information about configuring endpoint URL information for HTTP bindings or configuring endpoint URL information for JMS bindings.

New feature: Version 8.0 supports using property files to manage endpoint URL fragments for web services accessed through HTTP, SOAP and JMS, or directly as enterprise beans.New feature:

We can specify a portion of the endpoint URL to use in each web service module. The portion that you specify is used to create the actual endpoint URL when publishing a WSDL file. In a published WSDL file, the URL defining the target endpoint address is found in the location attribute of the port soap:address element. This page applies for both Java API for JAX-WS and Java API for XML-based RPC (JAX-RPC) web services.

The web service endpoint URL fragment properties are extensions to the application properties file. When using the extractConfigProperties command to get a properties file for an application, you also get the endpoint URL fragments along with other application properties. Use the applyConfigProperties, validateConfigProperties, and deleteConfigProperties commands; as described in the procedure, to update, validate and delete endpoint URL fragments in a web services application.


Procedure

  1. Extract the property file.

    For example, to extract the properties for the application, sampleApplication, use the extractConfigProperties command.

    AdminTask.extractConfigProperties(['-propertiesFileName', 'myProperties.props', '-configData',
    'Deployment=sampleApplication' ])
    

    If you previously configured your web services endpoint URL fragments, the system extracts the properties files and the result contains a section for endpoint URL fragments...

    #
    # CWSAD0103I: URLPrefixMap Section: module=TestApp.jar
    #
    ResourceType=Application ImplementingResourceType=Application ResourceId=Cell=!{cellName}:Deployment=!{applicationName}
    ExtensionId=ApplicationWebServicesExtension
    #
    
    #
    #Properties
    module=TestApp.jar
    

  2. Create a new instance of the property file.

    If you modify existing URL fragment properties or create new properties, use the following command to apply URL fragment properties. This command creates or updates the corresponding metadata file in the specified application. In this example, the optional -reportFileName parameter is used to specify to produce a report from the command.

    AdminTask.applyConfigProperties('[-propertiesFileName myProperties.props -reportFileName report.txt ]')
    
  3. Validate the property file.

    The validateConfigProperties command validates the property names and values in the properties file. If all the names and values are valid, the command result is true. Otherwise, the command returns a false value; for example:

    AdminTask.validateConfigProperties(['-propertiesFileName', 'myProperties.props', '-reportFileName',
    'report.txt'])
    
  4. Delete the property file.

    When a deleteConfigProperties command is invoked, the command deletes all of the properties that are specified within the properties file. If you are starting with a previously extracted properties file, remove all sections within the properties file, except for the sections to apply deleteConfigProperties. For example, to delete a URL Prefix Map, remove all sections from the extracted properties file except the URLPrefix map section and possibly the environment variables section, if you are using variables.

    The deleteConfigProperties command deletes the properties specified in the properties file; for example:

    AdminTask.deleteConfigProperties(['-propertiesFileName', 'myProperties.props', '-reportFileName',  'report.txt'])
    

    The following myProperties.txt file is an example of a properties file that you can use to perform a delete of the //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ URL Prefix map for the TestApp.jar module:

    #
    # CWSAD0103I: URLPrefixMap Section: module=TestApp.jar
    #
    ResourceType=Application ImplementingResourceType=Application ResourceId=Cell=!{cellName}:Deployment=!{applicationName}
    ExtensionId=ApplicationWebServicesExtension
    #
    
    #
    #Properties
    module=TestApp.jar
    
    #
    #
    EnvironmentVariablesSection
    #
    #
    #Environment Variables
    applicationName=TestApp
    cellName=XYZNode01Cell
    serverName=server1
    nodeName=XYZNode01
    


Results

We can use web services property files to query, configure, and manage the web service endpoint URL fragment for different protocols.
Configure endpoint URL information for HTTP bindings
Configure endpoint URL information for JMS bindings
Configure endpoint URL information to directly access enterprise beans


Related


Properties for web services endpoint URL fragments using property files
Provide HTTP endpoint URL information
Provide JMS and EJB endpoint URL information

+

Search Tips   |   Advanced Search