org.apache.axis2.mex.util
Class MexUtil

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

public class MexUtil
extends java.lang.Object


Constructor Summary
MexUtil()
           
 
Method Summary
static OutputForm[] allSupportedOutputForms()
           
static OutputForm[] determineOutputForm(java.lang.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(org.apache.axiom.om.OMElement omElement)
          API to map mex:Metadata element to a Metadata object representation.
static Metadata fromOM(org.apache.axiom.om.OMElement omElement, java.lang.String mexNamespaceValue)
          API to map mex:Metadata element to a Metadata object representation.
static org.apache.axiom.om.impl.OMNamespaceImpl getAddressingNameSpace(org.apache.axiom.om.OMElement toAddress)
          Answers WS-Addressing namespace
static org.apache.axiom.soap.SOAPFactory getSOAPFactory(int SOAPVersion)
          Answers SOAPFactory corresponding to specified SOAP Version
static org.apache.axiom.soap.SOAPFactory getSOAPFactory(java.lang.String soapNameSpaceURI)
          Answer SOAPFactory corresponding to specified SOAP namespace URI
static int getSOAPVersion(org.apache.axiom.soap.SOAPEnvelope envelope)
          Answer SOAPVersion for specified envelope
static boolean isMexDisabled(Parameter serviceConfigMEXParm)
          Check if metadata exchange has been disabled for a service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MexUtil

public MexUtil()
Method Detail

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(java.lang.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,
                              java.lang.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(java.lang.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:


Copyright © 2007 Apache Web Services Project. All Rights Reserved.