Package org.apache.axis2.mex.util
Class MexUtil
- java.lang.Object
-
- org.apache.axis2.mex.util.MexUtil
-
public class MexUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description MexUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OutputForm[]
allSupportedOutputForms()
static OutputForm[]
determineOutputForm(String dialect, Parameter axisConfigMEXParm, Parameter serviceConfigMEXParm)
Determine output forms for specified dialect based on "metadataexchange" configured in axis2.xml and services.xml.static Metadata
fromEPR(EndpointReference epr)
static Metadata
fromOM(OMElement omElement)
API to map mex:Metadata element to a Metadata object representation.static Metadata
fromOM(OMElement omElement, String mexNamespaceValue)
API to map mex:Metadata element to a Metadata object representation.static OMNamespace
getAddressingNameSpace(OMElement toAddress)
Answers WS-Addressing namespacestatic SOAPFactory
getSOAPFactory(int SOAPVersion)
Answers SOAPFactory corresponding to specified SOAP Versionstatic SOAPFactory
getSOAPFactory(String soapNameSpaceURI)
Answer SOAPFactory corresponding to specified SOAP namespace URIstatic int
getSOAPVersion(SOAPEnvelope envelope)
Answer SOAPVersion for specified envelopestatic boolean
isMexDisabled(Parameter serviceConfigMEXParm)
Check if metadata exchange has been disabled for a service.
-
-
-
Method Detail
-
getSOAPVersion
public static int getSOAPVersion(SOAPEnvelope envelope) throws MexException
Answer SOAPVersion for specified envelope- Parameters:
envelope
- SOAP Envelope- Returns:
- version of SOAP
- Throws:
MexException
-
getSOAPFactory
public static SOAPFactory getSOAPFactory(String soapNameSpaceURI) throws MexException
Answer SOAPFactory corresponding to specified SOAP namespace URI- Parameters:
soapNameSpaceURI
- soap namespace uri- Returns:
- Throws:
MexException
-
getSOAPFactory
public static SOAPFactory getSOAPFactory(int SOAPVersion)
Answers SOAPFactory corresponding to specified SOAP Version- Parameters:
SOAPVersion
- SOAP version- Returns:
- SOAPFactory
-
allSupportedOutputForms
public static OutputForm[] allSupportedOutputForms()
-
fromEPR
public static Metadata fromEPR(EndpointReference epr) throws MexException
- Throws:
MexException
-
getAddressingNameSpace
public static OMNamespace getAddressingNameSpace(OMElement toAddress) throws MexException
Answers WS-Addressing namespace- Parameters:
toAddress
- To Address element- Returns:
- OMNamespaceImpl WS-Addressing namespace
- Throws:
AxisFault
MexException
-
fromOM
public static Metadata fromOM(OMElement omElement) throws MexException
API to map mex:Metadata element to a Metadata object representation. Data validation will be performed on omElement content. SeeMetadata
for APIs to access metadata section.- Parameters:
omElement
- an element such as endpoint reference type that contains mex:Metadata or an mex:Metadata element- Returns:
- Metadata object representation of mex:Metadata element passed.
- Throws:
MexException
- if invalid mex:Metadata element content is detected
-
fromOM
public static Metadata fromOM(OMElement omElement, String mexNamespaceValue) throws MexException
API to map mex:Metadata element to a Metadata object representation. Data validation will be performed on omElement content. SeeMetadata
for APIs to access metadata section.- Parameters:
omElement
- an element such as endpoint reference type that contains mex:Metadata or an mex:Metadata elementmexNamespaceValue
- the namespace of the WS-MEX spec to comply with.- Returns:
- Metadata object representation of mex:Metadata element passed.
- Throws:
MexException
- if invalid mex:Metadata element content is detected
-
isMexDisabled
public static boolean isMexDisabled(Parameter serviceConfigMEXParm)
Check if metadata exchange has been disabled for a service.- Parameters:
serviceConfigMEXParm
- metadataexchange configured in services.xml- Returns:
-
determineOutputForm
public static OutputForm[] determineOutputForm(String dialect, Parameter axisConfigMEXParm, Parameter serviceConfigMEXParm)
Determine output forms for specified dialect based on "metadataexchange" configured in axis2.xml and services.xml. The order of precedence in determining output form configured: a. dialect specific at service level. b. service level i.e. without dialect attribute specified c. dialect specific at global level i,e, configured in axis2.xml d. service level i.e. without dialect attribute specified e. default output forms to all: inline, location, reference- Parameters:
dialect
-axisConfigMEXParm
- "metadataexchange" parameter configured in axis2.xmlserviceConfigMEXParm
- "metadataexchange" parameter configured in services.xml- Returns:
-
-