Your code refers to XML documents such as WSDL or XML Schema using remote addresses, but you want your code to automatically and transparently substitute a saved local copy of the remote resource. Or, you have defined a placeholder location for a WSDL, and you want to substitute a real value at runtime.
Use an XML catalog.
An XML Catalog consists of one or more files that define a logical structure that maps a set of XML entities. XML catalogs cover two basic scenarios: mapping an external entity’s public or system identifier to a URI, and mapping one URI reference to another one.
XML catalogs are useful for a few reasons:
XML catalogs allow your application to continue working even if you are disconnected from the network that defines the remote resource. If you’re using your laptop in a disconnected location and you are developing a web service that uses schemas that are back in the office, you can use an XML catalog to substitute those remote schemas for local copies. You can then continue to develop without having to change code throughout your application that points to those remote resources.
XML catalogs are also important for performance reasons. Your application can use catalogs to avoid making expensive remote calls to WSDL documents.
When moving code through development, QA, staging, and production, you may find it useful to employ XML catalogs in resolving ...