Class MexUtil

java.lang.Object
org.apache.axis2.mex.util.MexUtil

public class MexUtil extends Object
  • Constructor Details

    • MexUtil

      public MexUtil()
  • Method Details

    • getSOAPVersion

      public static int getSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope) throws MexException
      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

      public static OutputForm[] allSupportedOutputForms()
    • fromEPR

      public static Metadata fromEPR(EndpointReference epr) throws MexException
      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:
      AxisFault
      MexException
    • fromOM

      public static Metadata fromOM(org.apache.axiom.om.OMElement omElement) throws MexException
      API to map mex:Metadata element to a Metadata object representation. Data validation will be performed on omElement content. See Metadata 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(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. See Metadata for APIs to access metadata section.
      Parameters:
      omElement - an element such as endpoint reference type that contains mex:Metadata or an mex:Metadata element
      mexNamespaceValue - 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.xml
      serviceConfigMEXParm - "metadataexchange" parameter configured in services.xml
      Returns: