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
Parses sun-jaxws.xml
into WSEndpoint
.
Since sun-jaxws.xml
captures more information than what WSEndpoint
represents (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 wraps WSEndpoint
.
HttpAdapter
and its derived type is used for this often,
but it can be anything.
Method Summary |
protected static void |
ensureNoContent(javax.xml.stream.XMLStreamReader reader)
|
protected static void |
fail(String key,
javax.xml.stream.XMLStreamReader reader)
|
protected static void |
failWithFullName(String key,
javax.xml.stream.XMLStreamReader reader)
|
protected static void |
failWithLocalName(String key,
javax.xml.stream.XMLStreamReader reader)
|
protected static void |
failWithLocalName(String key,
javax.xml.stream.XMLStreamReader reader,
String arg)
|
protected String |
getAttribute(Attributes attrs,
String name)
|
static String |
getBindingIdForToken(String lexical)
JSR-109 defines short-form tokens for standard binding Ids. |
protected String |
getMandatoryAttribute(javax.xml.stream.XMLStreamReader reader,
Attributes attrs,
String name)
|
protected String |
getMandatoryNonEmptyAttribute(javax.xml.stream.XMLStreamReader reader,
Attributes attributes,
String name)
|
protected String |
getNonEmptyAttribute(javax.xml.stream.XMLStreamReader reader,
Attributes attrs,
String name)
|
protected QName |
getQNameAttribute(Attributes attrs,
String name)
|
protected Class |
loadClass(String name)
|
List<A> |
parse(File f)
Parses the sun-jaxws.xml file and configures
a set of HttpAdapter s. |
List<A> |
parse(String systemId,
InputStream is)
Parses the sun-jaxws.xml file and configures
a set of HttpAdapter s. |
protected boolean |
setHandlersAndRoles(WSBinding binding,
javax.xml.stream.XMLStreamReader reader,
QName serviceName,
QName portName)
Parses the handler and role information and sets it
on the WSBinding . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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
ATTRVALUE_VERSION_1_0
public static final String ATTRVALUE_VERSION_1_0
- See Also:
- Constant Field Values
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
- Optional Container
that WSEndpoint
s receive.adapterFactory
- Creates HttpAdapter
(or its derived class.)
- Throws:
MalformedURLException
parse
@NotNull
public List<A> parse(String systemId,
InputStream is)
- Parses the
sun-jaxws.xml
file and configures
a set of HttpAdapter
s.
parse
@NotNull
public List<A> parse(File f)
throws IOException
- Parses the
sun-jaxws.xml
file and configures
a set of HttpAdapter
s.
- 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(javax.xml.stream.XMLStreamReader reader,
Attributes attrs,
String name)
getMandatoryAttribute
protected String getMandatoryAttribute(javax.xml.stream.XMLStreamReader reader,
Attributes attrs,
String name)
getMandatoryNonEmptyAttribute
protected String getMandatoryNonEmptyAttribute(javax.xml.stream.XMLStreamReader reader,
Attributes attributes,
String name)
setHandlersAndRoles
protected boolean setHandlersAndRoles(WSBinding binding,
javax.xml.stream.XMLStreamReader reader,
QName serviceName,
QName portName)
- Parses the handler and role information and sets it
on the
WSBinding
.
- Returns:
- true if element present in DD
false otherwise.
ensureNoContent
protected static void ensureNoContent(javax.xml.stream.XMLStreamReader reader)
fail
protected static void fail(String key,
javax.xml.stream.XMLStreamReader reader)
failWithFullName
protected static void failWithFullName(String key,
javax.xml.stream.XMLStreamReader reader)
failWithLocalName
protected static void failWithLocalName(String key,
javax.xml.stream.XMLStreamReader reader)
failWithLocalName
protected static void failWithLocalName(String key,
javax.xml.stream.XMLStreamReader reader,
String arg)
loadClass
protected Class loadClass(String name)