Package org.apache.axis2.addressing
Class EndpointReferenceHelper
- java.lang.Object
- 
- org.apache.axis2.addressing.EndpointReferenceHelper
 
- 
 public class EndpointReferenceHelper extends Object The methods in this class are used to processEndpointReferenceobjects according to the rules of the 2005/08 (Final) and 2004/08 (submission) WS-Addressing specifications.
- 
- 
Constructor SummaryConstructors Constructor Description EndpointReferenceHelper()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static EndpointReferencefromOM(OMElement eprOMElement)Populates an endpoint reference based on theOMElementthat is passed in.static StringfromOM(EndpointReference epr, OMElement eprOMElement)Populates an endpoint reference based on theOMElement.static voidfromOM(EndpointReference epr, OMElement eprOMElement, String addressingNamespace)Populates an endpoint reference based on theOMElementand WS-Addressing namespace that is passed in.static EndpointReferencefromString(String eprString)Populates an endpoint reference based on theStringthat is passed in.static InterfaceNamegetInterfaceNameMetadata(EndpointReference epr, String addressingNamespace)Retrieves the WS-Addressing EPR PortType, or InterfaceName, element from an EPR, as appropriate.static ServiceNamegetServiceNameMetadata(EndpointReference epr, String addressingNamespace)Retrieves the WS-Addressing EPR ServiceName element from an EPR.static WSDLLocationgetWSDLLocationMetadata(EndpointReference epr, String addressingNamespace)Retrieves the wsdli:wsdlLocation attribute from an EPR.static voidsetInterfaceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, InterfaceName interfaceName)Adds an instance ofInterfaceNameas metadata to the specified EPR.static voidsetServiceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, ServiceName serviceName)Adds an instance ofServiceNameas metadata to the specified EPR.static voidsetWSDLLocationMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, WSDLLocation wsdlLocation)Adds an instance ofWSDLLocationas metadata to the specified EPR.static OMElementtoOM(OMFactory factory, EndpointReference epr, QName qname, String addressingNamespace)Creates anOMElementbased on the properties of the endpoint reference.
 
- 
- 
- 
Method Detail- 
fromOMpublic static void fromOM(EndpointReference epr, OMElement eprOMElement, String addressingNamespace) throws AxisFault Populates an endpoint reference based on theOMElementand WS-Addressing namespace that is passed in.- Parameters:
- epr- an endpoint reference instance to hold the info.
- eprOMElement- an element of endpoint reference type
- addressingNamespace- the namespace of the WS-Addressing spec to comply with.
- Throws:
- AxisFault- if unable to locate an address element, or if the specified namespace is different to the actual namespace.
- See Also:
- fromOM(OMElement)
 
 - 
fromOMpublic static String fromOM(EndpointReference epr, OMElement eprOMElement) throws AxisFault Populates an endpoint reference based on theOMElement. Returns the WS-Addressing namespace of the endpoint reference.- Parameters:
- epr- an endpoint reference instance to hold the info. If the endpoint reference is null then just the WS-Addressing namespace is returned.
- eprOMElement- an element of endpoint reference type
- Returns:
- a string representing the WS-Addressing namespace of the endpoint reference.
- Throws:
- AxisFault- if unable to locate an address element.
 
 - 
fromStringpublic static EndpointReference fromString(String eprString) throws AxisFault Populates an endpoint reference based on theStringthat is passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace is in effect then any reference properties will be saved as reference parameters. Regardless of the addressing namespace in effect, any elements present in theStringthat are not recognised are saved as extensibility elements.- Parameters:
- eprString- string from the element of endpoint reference type
- Throws:
- AxisFault- if unable to locate an address element
 
 - 
fromOMpublic static EndpointReference fromOM(OMElement eprOMElement) throws AxisFault Populates an endpoint reference based on theOMElementthat is passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace is in effect then any reference properties will be saved as reference parameters. Regardless of the addressing namespace in effect, any elements present in theOMElementthat are not recognised are saved as extensibility elements.- Parameters:
- eprOMElement- an element of endpoint reference type
- Throws:
- AxisFault- if unable to locate an address element
 
 - 
toOMpublic static OMElement toOM(OMFactory factory, EndpointReference epr, QName qname, String addressingNamespace) throws AxisFault Creates anOMElementbased on the properties of the endpoint reference. The output may differ based on the addressing namespace that is in effect when this method is called. If the http://www.w3.org/2005/08/addressing namespace is in effect, and a metadata property has been defined for the endpoint reference, then there will be a metadata element to contain the property in the output. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace is in effect, however, then no metadata element will be included in the output, even if a metadata property element has been defined.- Parameters:
- factory-
- epr-
- qname-
- addressingNamespace-
- Returns:
- Throws:
- AxisFault
 
 - 
getServiceNameMetadatapublic static ServiceName getServiceNameMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault Retrieves the WS-Addressing EPR ServiceName element from an EPR.- Parameters:
- epr- the EPR to retrieve the element from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- Returns:
- an instance of ServiceName. The return value is nevernull.
- Throws:
- AxisFault
 
 - 
getInterfaceNameMetadatapublic static InterfaceName getInterfaceNameMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault Retrieves the WS-Addressing EPR PortType, or InterfaceName, element from an EPR, as appropriate.- Parameters:
- epr- the EPR to retrieve the element from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- Returns:
- an instance of InterfaceName. The return value is nevernull.
- Throws:
- AxisFault
 
 - 
getWSDLLocationMetadatapublic static WSDLLocation getWSDLLocationMetadata(EndpointReference epr, String addressingNamespace) throws AxisFault Retrieves the wsdli:wsdlLocation attribute from an EPR.- Parameters:
- epr- the EPR to retrieve the attribute from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- Returns:
- an instance of WSDLLocation. The return value is nevernull.
- Throws:
- AxisFault
 
 - 
setServiceNameMetadatapublic static void setServiceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, ServiceName serviceName) throws AxisFault Adds an instance ofServiceNameas metadata to the specified EPR. The metadata is mapped to a WS-Addressing EPR ServiceName element.- Parameters:
- factory- an- OMFactory
- epr- the EPR to retrieve the attribute from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- serviceName- an instance of- ServiceNamethat contains the metadata
- Throws:
- AxisFault
 
 - 
setInterfaceNameMetadatapublic static void setInterfaceNameMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, InterfaceName interfaceName) throws AxisFault Adds an instance ofInterfaceNameas metadata to the specified EPR. The metadata is mapped to a WS-Addressing EPR PortType or InterfaceName element.- Parameters:
- factory- an- OMFactory
- epr- the EPR to retrieve the attribute from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- interfaceName- an instance of- InterfaceNamethat contains the metadata
- Throws:
- AxisFault
 
 - 
setWSDLLocationMetadatapublic static void setWSDLLocationMetadata(OMFactory factory, EndpointReference epr, String addressingNamespace, WSDLLocation wsdlLocation) throws AxisFault Adds an instance ofWSDLLocationas metadata to the specified EPR. The metadata is mapped to a wsdli:wsdlLocation attribute.- Parameters:
- factory- an- OMFactory
- epr- the EPR to retrieve the attribute from
- addressingNamespace- the WS-Addressing namespace associated with the EPR.
- wsdlLocation- an instance of- WSDLLocationthat contains the metadata
- Throws:
- AxisFault
 
 
- 
 
-