org.apache.axis2.addressing.metadata
Class ServiceName

java.lang.Object
  extended by org.apache.axis2.addressing.metadata.ServiceName

public class ServiceName
extends java.lang.Object


Field Summary
static QName subQName
           
static QName wsamQName
           
static QName wsawQName
           
 
Constructor Summary
ServiceName()
           
ServiceName(QName name)
           
ServiceName(QName name, java.lang.String endpointName)
           
 
Method Summary
 void fromOM(org.apache.axiom.om.OMElement omElement)
          Convenience method to extract metadata from the ServiceName element.
 java.lang.String getEndpointName()
          Method getPortName
 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(java.lang.String endpointName)
          Method setPortName
 void setName(QName name)
          Method setName
 org.apache.axiom.om.OMElement toOM(org.apache.axiom.om.OMFactory factory, QName qname)
          Convenience method to convert objects of this type to an OMElement so that it can be added to an EndpointReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subQName

public static final QName subQName

wsamQName

public static final QName wsamQName

wsawQName

public static final QName wsawQName
Constructor Detail

ServiceName

public ServiceName()

ServiceName

public ServiceName(QName name)
Parameters:
name -

ServiceName

public ServiceName(QName name,
                   java.lang.String endpointName)
Parameters:
name -
endpointName -
Method Detail

getName

public QName getName()
Method getName


getEndpointName

public java.lang.String getEndpointName()
Method getPortName


setName

public void setName(QName name)
Method setName

Parameters:
name -

setEndpointName

public void setEndpointName(java.lang.String endpointName)
Method setPortName

Parameters:
endpointName -

toOM

public org.apache.axiom.om.OMElement toOM(org.apache.axiom.om.OMFactory factory,
                                          QName qname)
                                   throws AxisFault
Convenience method to convert objects of this type to an 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.

Parameters:
factory - OMFactory to use when generating OMElements
qname - the QName 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(org.apache.axiom.om.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 - the OMElement that holds the metadata.
Throws:
AxisFault

isServiceNameElement

public static boolean isServiceNameElement(org.apache.axiom.om.OMElement omElement)
Static method to test whether an OMElement is recognized as a ServiceName element. If this method returns true then fromOM(OMElement) is guaranteed not to fail.

Parameters:
omElement - the OMElement to test.
Returns:
true if the element is a ServiceName element, false otherwise.


Copyright © 2007 Apache Web Services Project. All Rights Reserved.