Package com.sun.xml.ws.transport.http
Class DeploymentDescriptorParser<A>
- java.lang.Object
-
- com.sun.xml.ws.transport.http.DeploymentDescriptorParser<A>
-
public class DeploymentDescriptorParser<A> extends Object
Parsessun-jaxws.xmlintoWSEndpoint.
Sincesun-jaxws.xmlcaptures more information than whatWSEndpointrepresents (in particular URL pattern and name), this class takes a parameterization 'A' so that the user of this parser can choose to create another type that wrapsWSEndpoint.
HttpAdapterand its derived type is used for this often, but it can be anything.- Author:
- WS Development Team, Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDeploymentDescriptorParser.AdapterFactory<A>Creates a new "Adapter".
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_BINDINGstatic StringATTR_DATABINDINGstatic StringATTR_ENABLE_MTOMstatic StringATTR_FILEstatic StringATTR_IMPLEMENTATIONstatic StringATTR_MTOM_THRESHOLD_VALUEstatic StringATTR_NAMEstatic StringATTR_PORTstatic StringATTR_RESOURCEstatic StringATTR_SERVICEstatic StringATTR_URL_PATTERNstatic StringATTR_VERSIONstatic StringATTR_WSDLstatic List<String>ATTRVALUE_SUPPORTED_VERSIONSstatic StringJAXWS_WSDL_DD_DIRstatic StringNS_RUNTIMEstatic QNameQNAME_ENDPOINTstatic QNameQNAME_ENDPOINTSstatic QNameQNAME_EXT_METADA
-
Constructor Summary
Constructors Constructor Description DeploymentDescriptorParser(ClassLoader cl, ResourceLoader loader, Container container, DeploymentDescriptorParser.AdapterFactory<A> adapterFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExternalMetadataFeatureconfigureExternalMetadataReader(XMLStreamReader reader)protected static voidfail(String key, XMLStreamReader reader)protected static voidfailWithFullName(String key, XMLStreamReader reader)protected static voidfailWithLocalName(String key, XMLStreamReader reader)protected static voidfailWithLocalName(String key, XMLStreamReader reader, String arg)protected StringgetAttribute(Attributes attrs, String name)static StringgetBindingIdForToken(String lexical)JSR-109 defines short-form tokens for standard binding Ids.protected StringgetMandatoryAttribute(XMLStreamReader reader, Attributes attrs, String name)protected StringgetMandatoryNonEmptyAttribute(XMLStreamReader reader, Attributes attributes, String name)protected StringgetNonEmptyAttribute(XMLStreamReader reader, Attributes attrs, String name)protected QNamegetQNameAttribute(Attributes attrs, String name)protected ClassloadClass(String name)List<A>parse(File f)Parses thesun-jaxws.xmlfile and configures a set ofHttpAdapters.List<A>parse(String systemId, InputStream is)Parses thesun-jaxws.xmlfile and configures a set ofHttpAdapters.protected booleansetHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName)Parses the handler and role information and sets it on theWSBinding.
-
-
-
Field Detail
-
NS_RUNTIME
public static final String NS_RUNTIME
- See Also:
- Constant Field Values
-
JAXWS_WSDL_DD_DIR
public static final String JAXWS_WSDL_DD_DIR
- See Also:
- Constant Field Values
-
QNAME_ENDPOINTS
public static final QName QNAME_ENDPOINTS
-
QNAME_ENDPOINT
public static final QName QNAME_ENDPOINT
-
QNAME_EXT_METADA
public static final QName QNAME_EXT_METADA
-
ATTR_FILE
public static final String ATTR_FILE
- See Also:
- Constant Field Values
-
ATTR_RESOURCE
public static final String ATTR_RESOURCE
- See Also:
- Constant Field Values
-
ATTR_VERSION
public static final String ATTR_VERSION
- See Also:
- Constant Field Values
-
ATTR_NAME
public static final String ATTR_NAME
- See Also:
- Constant Field Values
-
ATTR_IMPLEMENTATION
public static final String ATTR_IMPLEMENTATION
- See Also:
- Constant Field Values
-
ATTR_WSDL
public static final String ATTR_WSDL
- See Also:
- Constant Field Values
-
ATTR_SERVICE
public static final String ATTR_SERVICE
- See Also:
- Constant Field Values
-
ATTR_PORT
public static final String ATTR_PORT
- See Also:
- Constant Field Values
-
ATTR_URL_PATTERN
public static final String ATTR_URL_PATTERN
- See Also:
- Constant Field Values
-
ATTR_ENABLE_MTOM
public static final String ATTR_ENABLE_MTOM
- See Also:
- Constant Field Values
-
ATTR_MTOM_THRESHOLD_VALUE
public static final String ATTR_MTOM_THRESHOLD_VALUE
- See Also:
- Constant Field Values
-
ATTR_BINDING
public static final String ATTR_BINDING
- See Also:
- Constant Field Values
-
ATTR_DATABINDING
public static final String ATTR_DATABINDING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeploymentDescriptorParser
public DeploymentDescriptorParser(ClassLoader cl, ResourceLoader loader, Container container, DeploymentDescriptorParser.AdapterFactory<A> adapterFactory) throws MalformedURLException
- Parameters:
cl- Used to load service implementations.loader- Used to locate resources, in particular WSDL.container- OptionalContainerthatWSEndpoints receive.adapterFactory- CreatesHttpAdapter(or its derived class.)- Throws:
MalformedURLException
-
-
Method Detail
-
parse
@NotNull public List<A> parse(String systemId, InputStream is)
Parses thesun-jaxws.xmlfile and configures a set ofHttpAdapters.
-
parse
@NotNull public List<A> parse(File f) throws IOException
Parses thesun-jaxws.xmlfile and configures a set ofHttpAdapters.- Throws:
IOException
-
getBindingIdForToken
@NotNull public static String getBindingIdForToken(@NotNull String lexical)
JSR-109 defines short-form tokens for standard binding Ids. These are used only in DD. So stand alone deployment descirptor should also honor these tokens. This method converts the tokens to API's standard binding ids- Parameters:
lexical- binding attribute value from DD. Always not null- Returns:
- returns corresponding API's binding ID or the same lexical
-
getAttribute
protected String getAttribute(Attributes attrs, String name)
-
getQNameAttribute
protected QName getQNameAttribute(Attributes attrs, String name)
-
getNonEmptyAttribute
protected String getNonEmptyAttribute(XMLStreamReader reader, Attributes attrs, String name)
-
getMandatoryAttribute
protected String getMandatoryAttribute(XMLStreamReader reader, Attributes attrs, String name)
-
getMandatoryNonEmptyAttribute
protected String getMandatoryNonEmptyAttribute(XMLStreamReader reader, Attributes attributes, String name)
-
setHandlersAndRoles
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName)
Parses the handler and role information and sets it on theWSBinding.- Returns:
- true if <handler-chains> element present in DD false otherwise.
-
configureExternalMetadataReader
protected ExternalMetadataFeature configureExternalMetadataReader(XMLStreamReader reader)
-
fail
protected static void fail(String key, XMLStreamReader reader)
-
failWithFullName
protected static void failWithFullName(String key, XMLStreamReader reader)
-
failWithLocalName
protected static void failWithLocalName(String key, XMLStreamReader reader)
-
failWithLocalName
protected static void failWithLocalName(String key, XMLStreamReader reader, String arg)
-
-