Package com.sun.xml.ws.mex.client
Class MetadataClient
java.lang.Object
com.sun.xml.ws.mex.client.MetadataClient
Class used for retrieving metadata at runtime. The intended usage is:
MetadataClient mClient = new MetadataClient();
Metadata mData = mClient.retrieveMetadata(someAddress);
Utility methods will be added for common usages of the metadata. For instance, the service and port QNames from the endpoint can be retrieved from the metadata with:
Map<QName, List<PortInfo>> names = mClient.getServiceAndPortNames(mData);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsed to retrieve the service and port names and port addresses from metadata.retrieveMetadata(MetadataReference reference) Currently only supports Get requests (not Get Metadata), so we only need the reference's address.retrieveMetadata(String address) Method used to load the metadata from the endpoint.
-
Constructor Details
-
MetadataClient
public MetadataClient()Default constructor.
-
-
Method Details
-
retrieveMetadata
Method used to load the metadata from the endpoint. First soap 1.2 is used, then 1.1. If both attempts fail, the client will try again adding "/mex" to the address.If any wsdl or schema import elements are found with empty location attributes, these attributes are removed. In the case of data returned to JAX-WS through ServiceDescriptorImpl, these attributes are added back in with appropriate location information.
- Parameters:
address- The address used to query for Metadata- Returns:
- The metadata object, or null if no metadata could be obtained from the service
- See Also:
-
retrieveMetadata
Currently only supports Get requests (not Get Metadata), so we only need the reference's address. Any metadata about the request is ignored.- See Also:
-
getServiceInformation
Used to retrieve the service and port names and port addresses from metadata.- Returns:
- A list of PortInfo objects
- See Also:
-