com.ibm.ws.sibx.smobo.util
Class ServiceMessageObjectValidationHelper
java.lang.Object
com.ibm.ws.sibx.smobo.util.ServiceMessageObjectValidationHelper
- public class ServiceMessageObjectValidationHelper
- extends java.lang.Object
ServiceMessageObjectValidationHelper implements some custom validation for
SMO, typically used by the mediation primitives to check that messages are
valid.
It performs two pieces of function; firstly, it tests whether the "body"
element of a provided SMO is of the correct type, and secondly, it checks
the entire object against any constraints.
To use, create a ServiceMessageObjectValidationHelper, providing a QName
identifying the namespace and local part of the body type. This can be a
lengthy operation, so you should create one of these and reuse it.
Then call validate() passing in the DataObject to validate. If the
DataObject is valid, the method will complete normally. If it is not valid,
it will fail with a SMONotValidException; the message of
which will be a human-readable description of the problem.
Method Summary |
void |
validate(commonj.sdo.DataObject dObj)
Tests whether the "body" element of a provided SMO is of the correct type,
and checks the entire object against any constraints. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
$sccsid
public static final java.lang.String $sccsid
- See Also:
- Constant Field Values
ServiceMessageObjectValidationHelper
public ServiceMessageObjectValidationHelper(javax.xml.namespace.QName qname)
- The supplied QName should identifiy the type of body.
- Parameters:
qname
-
validate
public void validate(commonj.sdo.DataObject dObj)
throws SMONotValidException
- Tests whether the "body" element of a provided SMO is of the correct type,
and checks the entire object against any constraints.
- Parameters:
dObj
- the SMO to test
- Throws:
SMONotValidException
- if validation fails. The Exception's Message
will be a human-readable, NLS'ed, description of the problem