Package org.apache.axis2.mex.util
Class MexUtil
java.lang.Object
org.apache.axis2.mex.util.MexUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OutputForm[]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 MetadatafromEPR(EndpointReference epr) static MetadatafromOM(org.apache.axiom.om.OMElement omElement) API to map mex:Metadata element to a Metadata object representation.static MetadataAPI to map mex:Metadata element to a Metadata object representation.static org.apache.axiom.om.impl.OMNamespaceImplgetAddressingNameSpace(org.apache.axiom.om.OMElement toAddress) Answers WS-Addressing namespacestatic org.apache.axiom.soap.SOAPFactorygetSOAPFactory(int SOAPVersion) Answers SOAPFactory corresponding to specified SOAP Versionstatic org.apache.axiom.soap.SOAPFactorygetSOAPFactory(String soapNameSpaceURI) Answer SOAPFactory corresponding to specified SOAP namespace URIstatic intgetSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope) Answer SOAPVersion for specified envelopestatic booleanisMexDisabled(Parameter serviceConfigMEXParm) Check if metadata exchange has been disabled for a service.
-
Constructor Details
-
MexUtil
public MexUtil()
-
-
Method Details
-
getSOAPVersion
Answer SOAPVersion for specified envelope- Parameters:
envelope- SOAP Envelope- Returns:
- version of SOAP
- Throws:
MexException
-
getSOAPFactory
public static org.apache.axiom.soap.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 org.apache.axiom.soap.SOAPFactory getSOAPFactory(int SOAPVersion) Answers SOAPFactory corresponding to specified SOAP Version- Parameters:
SOAPVersion- SOAP version- Returns:
- SOAPFactory
-
allSupportedOutputForms
-
fromEPR
- Throws:
MexException
-
getAddressingNameSpace
public static org.apache.axiom.om.impl.OMNamespaceImpl getAddressingNameSpace(org.apache.axiom.om.OMElement toAddress) throws MexException Answers WS-Addressing namespace- Parameters:
toAddress- To Address element- Returns:
- OMNamespaceImpl WS-Addressing namespace
- Throws:
AxisFaultMexException
-
fromOM
API to map mex:Metadata element to a Metadata object representation. Data validation will be performed on omElement content. SeeMetadatafor 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(org.apache.axiom.om.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. SeeMetadatafor 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
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:
-