Package com.sun.xml.ws.mex.client
Class MetadataClient
- java.lang.Object
-
- com.sun.xml.ws.mex.client.MetadataClient
-
public class MetadataClient extends Object
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 Constructor Description MetadataClient()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PortInfo>getServiceInformation(Metadata data)Used to retrieve the service and port names and port addresses from metadata.MetadataretrieveMetadata(MetadataReference reference)Currently only supports Get requests (not Get Metadata), so we only need the reference's address.MetadataretrieveMetadata(String address)Method used to load the metadata from the endpoint.
-
-
-
Method Detail
-
retrieveMetadata
public Metadata retrieveMetadata(@NotNull String address)
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:
ServiceDescriptorImpl
-
retrieveMetadata
public Metadata retrieveMetadata(@NotNull MetadataReference reference)
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:
retrieveMetadata(String)
-
-