WAS v8.5 > Script 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 dmgr console or property files to manage URL fragments. Before we can query the URL fragments, first set the URL fragments using either the dmgr console or the applyConfigProperties command. After you initially set the URL fragments using the dmgr console or property files, we can now modify the web services endpoint URL fragment using property files or the dmgr console.

To learn about using the dmgr 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.

v8.0 and later supports using property files to manage endpoint URL fragments for web services accessed through HTTP, SOAP and JMS, or directly as enterprise beans.

We can specify a portion of the endpoint URL to use in each web service module. The portion specified 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 JAX-WS and (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.

  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 the web services endpoint URL fragments, the system extracts the properties files and the result contains a section for endpoint URL fragments, as the following example displays:

    #
    # CWSAD0103I: URLPrefixMap Section: module=TestApp.jar
    #
    ResourceType=Application
    ImplementingResourceType=Application
    ResourceId=Cell=!{cellName}:Deployment=!{applicationName}
    ExtensionId=ApplicationWebServicesExtension
    #
    
    #
    #Properties
    http=http://myhostname:80
    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 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 the deleteConfigProperties command. 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 used to perform a delete of the http 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
    http=http://myhostname:80
    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.


Subtopics


Related


Configure endpoint URL information for HTTP bindings
Configure endpoint URL information for JMS bindings
Configure endpoint URL information to directly access enterprise beans


Reference:

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