Package org.apache.cxf.message
Class MessageUtils
java.lang.Object
org.apache.cxf.message.MessageUtils
Holder for utility methods relating to messages.
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleangetContextualBoolean(Message m, String key) static booleangetContextualBoolean(Message m, String key, boolean defaultValue) static intgetContextualInteger(Message m, String key, int defaultValue) static Collection<Integer>getContextualIntegers(Message m, String key, Collection<Integer> defaultValue) static ObjectgetContextualProperty(Message m, String propPreferred, String propDefault) static StringgetContextualString(Message m, String key, String defaultValue) getContextualStrings(Message m, String key, Set<String> defaultValue) static FaultModegetFaultMode(Message message) Determine the fault mode for the underlying (fault) message (for use on server side only).static intgetReponseCodeFromMessage(Message message) Gets the response code from the message and tries to deduct one if it is not set yet.static booleanhasNoResponseContent(Message message) Determines if the current message has no response content.static booleanReturns true if the underlying content format is a W3C DOM or a SAAJ message.static booleanisEmptyPartialResponse(Message message) Determines if the current message is an empty partial response, which is a partial response with an empty content.static booleanDetermine if message is fault.static booleanChecks if the message is oneway or notstatic booleanisOutbound(Message message) Determine if message is outbound.static booleanisPartialResponse(Message message) Determine if the current message is a partial response.static booleanisRequestor(Message message) Determine if current messaging role is that of requestor.static booleanDeprecated.replaced by {@link #PropertyUtils#isTrue(Object)}
- 
Method Details- 
isOutboundDetermine if message is outbound.- Parameters:
- message- the current Message
- Returns:
- true if the message direction is outbound
 
- 
isFaultDetermine if message is fault.- Parameters:
- message- the current Message
- Returns:
- true if the message is a fault
 
- 
getFaultModeDetermine the fault mode for the underlying (fault) message (for use on server side only).- Parameters:
- message- the fault message
- Returns:
- the FaultMode
 
- 
isRequestorDetermine if current messaging role is that of requestor.- Parameters:
- message- the current Message
- Returns:
- true if the current messaging role is that of requestor
 
- 
isPartialResponseDetermine if the current message is a partial response.- Parameters:
- message- the current message
- Returns:
- true if the current messags is a partial response
 
- 
isEmptyPartialResponseDetermines if the current message is an empty partial response, which is a partial response with an empty content.- Parameters:
- message- the current message
- Returns:
- true if the current messags is a partial empty response
 
- 
isTrueDeprecated.replaced by {@link #PropertyUtils#isTrue(Object)}Returns true if a value is either the String "true" (regardless of case) or Boolean.TRUE.- Parameters:
- value-
- Returns:
- true if value is either the String "true" or Boolean.TRUE
 
- 
getContextualBoolean
- 
getContextualBoolean
- 
getContextualIntegerspublic static Collection<Integer> getContextualIntegers(Message m, String key, Collection<Integer> defaultValue) 
- 
getContextualInteger
- 
getContextualStrings
- 
getContextualString
- 
getContextualProperty
- 
isDOMPresentReturns true if the underlying content format is a W3C DOM or a SAAJ message.
- 
getTargetMethod
- 
getReponseCodeFromMessageGets the response code from the message and tries to deduct one if it is not set yet.- Parameters:
- message- message to get response code from
- Returns:
- response code (or deducted value assuming success)
 
- 
hasNoResponseContentDetermines if the current message has no response content. The message has no response content if either: - the request is oneway and the current message is no partial response or an empty partial response. - the request is not oneway but the current message is an empty partial response.- Parameters:
- message-
- Returns:
 
- 
isOneWayChecks if the message is oneway or not- Parameters:
- message- the message under consideration
- Returns:
- true if the message has been marked as oneway
 
 
-