Class ServiceName
- java.lang.Object
-
- org.apache.axis2.addressing.metadata.ServiceName
-
public class ServiceName extends Object
-
-
Constructor Summary
Constructors Constructor Description ServiceName()
ServiceName(QName name)
ServiceName(QName name, String endpointName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromOM(OMElement omElement)
Convenience method to extract metadata from the ServiceName element.String
getEndpointName()
Method getPortNameQName
getName()
Method getNamestatic boolean
isServiceNameElement(OMElement omElement)
Static method to test whether anOMElement
is recognized as a ServiceName element.void
setEndpointName(String endpointName)
Method setPortNamevoid
setName(QName name)
Method setNameOMElement
toOM(OMFactory factory, QName qname)
Convenience method to convert objects of this type to anOMElement
so that it can be added to anEndpointReference
-
-
-
Method Detail
-
getName
public QName getName()
Method getName
-
getEndpointName
public String getEndpointName()
Method getPortName
-
setName
public void setName(QName name)
Method setName- Parameters:
name
-
-
setEndpointName
public void setEndpointName(String endpointName)
Method setPortName- Parameters:
endpointName
-
-
toOM
public OMElement toOM(OMFactory factory, QName qname) throws AxisFault
Convenience method to convert objects of this type to anOMElement
so that it can be added to anEndpointReference
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.
- Parameters:
factory
-OMFactory
to use when generatingOMElement
sqname
- theQName
that carries the namespace of the metadata element.- Returns:
- an OMElement that can be added to the metadata of an EndpointReference.
- Throws:
AxisFault
-
fromOM
public void fromOM(OMElement omElement) throws AxisFault
Convenience method to extract metadata from the ServiceName element.<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>
- Parameters:
omElement
- theOMElement
that holds the metadata.- Throws:
AxisFault
-
isServiceNameElement
public static boolean isServiceNameElement(OMElement omElement)
Static method to test whether anOMElement
is recognized as a ServiceName element. If this method returnstrue
thenfromOM(OMElement)
is guaranteed not to fail.- Parameters:
omElement
- theOMElement
to test.- Returns:
true
if the element is a ServiceName element,false
otherwise.
-
-