Package org.apache.axis2.transport.base
Class BaseUtils
java.lang.Object
org.apache.axis2.transport.base.BaseUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.axiom.soap.SOAPEnvelopegetEnvelope(InputStream in, String namespace) Create a SOAP envelope using SOAP 1.1 or 1.2 depending on the namespacegetEPRProperties(String url) Extract the properties from an endpoint reference.static MessageFormattergetMessageFormatter(MessageContext msgContext) Get the MessageFormatter for the given message.static org.apache.axiom.om.OMOutputFormatgetOMOutputFormat(MessageContext msgContext) Get the OMOutput format for the given messagestatic QNamegetQNameFromString(Object obj) Return a QName from the String passed in of the form {ns}elementprotected static voidprotected static voidhandleException(String s, Exception e) static booleanUtility method to check if a string is null or emptystatic booleanisUsingTransport(AxisService service, String transportName) static PropertiesloadProperties(String filePath) Loads the properties from a given property file pathstatic voidmarkServiceAsFaulty(String serviceName, String msg, AxisConfiguration axisCfg) Marks the given service as faulty with the given comment
-
Constructor Details
-
BaseUtils
public BaseUtils()
-
-
Method Details
-
getQNameFromString
Return a QName from the String passed in of the form {ns}element- Parameters:
obj- a QName or a String containing a QName in {ns}element form- Returns:
- a corresponding QName object
-
markServiceAsFaulty
Marks the given service as faulty with the given comment- Parameters:
serviceName- service namemsg- comment for being faultyaxisCfg- configuration context
-
getEnvelope
public static org.apache.axiom.soap.SOAPEnvelope getEnvelope(InputStream in, String namespace) throws XMLStreamException Create a SOAP envelope using SOAP 1.1 or 1.2 depending on the namespace- Parameters:
in- InputStream for the payloadnamespace- the SOAP namespace- Returns:
- the SOAP envelope for the correct version
- Throws:
XMLStreamException- on error
-
getOMOutputFormat
Get the OMOutput format for the given message- Parameters:
msgContext- the axis message context- Returns:
- the OMOutput format to be used
-
getMessageFormatter
Get the MessageFormatter for the given message.- Parameters:
msgContext- the axis message context- Returns:
- the MessageFormatter to be used
-
handleException
-
handleException
-
isBlank
Utility method to check if a string is null or empty- Parameters:
str- the string to check- Returns:
- true if the string is null or empty
-
isUsingTransport
-
getEPRProperties
Extract the properties from an endpoint reference.- Parameters:
url- an endpoint reference- Returns:
- the extracted properties
-
loadProperties
Loads the properties from a given property file path- Parameters:
filePath- Path of the property file- Returns:
- Properties loaded from given file
-