public class ServiceName extends Object
Modifier and Type | Field and Description |
---|---|
static javax.xml.namespace.QName |
subQName |
static javax.xml.namespace.QName |
wsamQName |
static javax.xml.namespace.QName |
wsawQName |
Constructor and Description |
---|
ServiceName() |
ServiceName(javax.xml.namespace.QName name) |
ServiceName(javax.xml.namespace.QName name,
String endpointName) |
Modifier and Type | Method and Description |
---|---|
void |
fromOM(org.apache.axiom.om.OMElement omElement)
Convenience method to extract metadata from the ServiceName element.
|
String |
getEndpointName()
Method getPortName
|
javax.xml.namespace.QName |
getName()
Method getName
|
static boolean |
isServiceNameElement(org.apache.axiom.om.OMElement omElement)
Static method to test whether an
OMElement is recognized
as a ServiceName element. |
void |
setEndpointName(String endpointName)
Method setPortName
|
void |
setName(javax.xml.namespace.QName name)
Method setName
|
org.apache.axiom.om.OMElement |
toOM(org.apache.axiom.om.OMFactory factory,
javax.xml.namespace.QName qname)
Convenience method to convert objects of this type to an
OMElement so that it
can be added to an EndpointReference |
public static final javax.xml.namespace.QName subQName
public static final javax.xml.namespace.QName wsamQName
public static final javax.xml.namespace.QName wsawQName
public ServiceName()
public ServiceName(javax.xml.namespace.QName name)
name
- public ServiceName(javax.xml.namespace.QName name, String endpointName)
name
- endpointName
- public javax.xml.namespace.QName getName()
public String getEndpointName()
public void setName(javax.xml.namespace.QName name)
name
- public void setEndpointName(String endpointName)
endpointName
- public org.apache.axiom.om.OMElement toOM(org.apache.axiom.om.OMFactory factory, javax.xml.namespace.QName qname) throws AxisFault
OMElement
so that it
can be added to an EndpointReference
Use:
OMElement omElement = serviceName.toOM(new QName("http://schemas.xmlsoap.org/ws/2004/08/addressing", "ServiceName", "wsa"));
or
OMElement omElement = serviceName.toOM(new QName("http://www.w3.org/2007/05/addressing/metadata", "ServiceName", "wsam"));
the difference being whether the EndpointReference is meant to represent a 2004/08 (Submission) or 2005/08 (Final) EndpointReference, respectively.
factory
- OMFactory
to use when generating OMElement
sqname
- the QName
that carries the namespace of the metadata element.AxisFault
public void fromOM(org.apache.axiom.om.OMElement omElement) throws AxisFault
<wsam:ServiceName xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" EndpointName="...">...</wsam:ServiceName>
or
<wsa:ServiceName xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" PortName="...">...</wsa:ServiceName>
omElement
- the OMElement
that holds the metadata.AxisFault
public static boolean isServiceNameElement(org.apache.axiom.om.OMElement omElement)
OMElement
is recognized
as a ServiceName element. If this method returns true
then
fromOM(OMElement)
is guaranteed not to fail.omElement
- the OMElement
to test.true
if the element is a ServiceName element,
false
otherwise.Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.