Class AS4Utils
- java.lang.Object
-
- org.wso2.carbon.mediation.connector.message.util.AS4Utils
-
public class AS4Utils extends Object
-
-
Constructor Summary
Constructors Constructor Description AS4Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.axiom.om.OMNode
getOMNode(Marshaller marshaller, Messaging messaging)
CreateOMNode
object fromMessaging
objectstatic boolean
isSendErrorAsResponse(PMode pmode)
Determine if the error need to be sent as response to the sending MSHstatic boolean
reportErrorToProducer(PMode pmode)
Determine if the error need to be notified to the producer endstatic void
validateMessaging(Messaging messaging, PModeRepository pmodeRepository)
Validate Messaging object to see whether it contains required fields
-
-
-
Method Detail
-
getOMNode
public static org.apache.axiom.om.OMNode getOMNode(Marshaller marshaller, Messaging messaging) throws IOException, XMLStreamException, PropertyException
CreateOMNode
object fromMessaging
object- Parameters:
marshaller
-Marshaller
instance forMessaging
classmessaging
-Messaging
object to be converted toOMNode
- Returns:
- OMNode object created from
Messaging
object - Throws:
IOException
XMLStreamException
PropertyException
-
validateMessaging
public static void validateMessaging(Messaging messaging, PModeRepository pmodeRepository) throws AS4Exception
Validate Messaging object to see whether it contains required fields- Parameters:
messaging
-Messaging
object- Throws:
AS4Exception
- with error message and error code for failed validation
-
reportErrorToProducer
public static boolean reportErrorToProducer(PMode pmode)
Determine if the error need to be notified to the producer end- Parameters:
pmode
-PMode
object- Returns:
- true if
true
-
-