Class MexUtil


  • public class MexUtil
    extends Object
    • Constructor Detail

      • MexUtil

        public MexUtil()
    • 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()
      • 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. 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​(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: