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 Java Message Service (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 console or property files to configure and manage URL fragments. Before we can query the URL fragments, first set the URL fragments using either the console or the applyConfigProperties command. After you initially set the URL fragments using the console or property files, we can now modify the web services endpoint URL fragment using property files or the console.
To learn about using the 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.
Version 8.0 and later supports using property files to manage endpoint URL fragments for web services accessed through HTTP, SOAP and Java Message Service (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, we 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.
- 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 we 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
- Create a new instance of the property file.
If we 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 ]')
- 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'])
- Delete the property file.
When a deleteConfigProperties command is invoked, the command deletes all of the properties specified within the properties file. If we 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 that we can use 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
- Properties for web services endpoint URL fragments using property files
We can use properties files to work with web services endpoint URL fragments.
Related tasks
Configure endpoint URL information for HTTP bindings Configure endpoint URL information for JMS bindings Configure endpoint URL information to directly access enterprise beans
Properties for web services endpoint URL fragments using property files Provide HTTP endpoint URL information Provide JMS and EJB endpoint URL information