throws WSIException
{
try
{
if (validator.isOneWayResponse(entryContext))
throw new AssertionNotApplicableException();
// Getting a message document
Document doc = entryContext.getMessageEntryDocument();
Element soapOperation = null;
// If there is a Fault entry or no body entries,
// the assertion is not applicable
if (validator.isFault(doc)
|| (soapOperation = validator.getSoapBodyChild(doc)) == null)
throw new AssertionNotApplicableException();
// Creating a qualified name of potential SOAP operation
QName operationQName = new QName(
soapOperation.getNamespaceURI(), soapOperation.getLocalName());
// Retrieving all the RPC binding operations from wsdl:binding
BindingOperation[] rpcBindingOperations =
validator.getMatchingBindingOps(
WSIConstants.ATTRVAL_SOAP_BIND_STYLE_RPC,
validator.analyzerContext.getCandidateInfo().getBindings());
// Retrieving binding operation by given operation name
BindingOperation bindingOperation = validator.getOperationMatch(
entryContext.getEntry().getEntryType(),
operationQName,
rpcBindingOperations);
// If there is no matched operation, the assertion is not applicable
if (bindingOperation == null)
throw new AssertionNotApplicableException();
// Finding operation message parts and extensibility elems
// in the binding depending on message type
List operationMessageParts = null;
List extElems = null;
if (entryContext.getMessageEntry().getType().equals(
MessageEntry.TYPE_REQUEST))
{
operationMessageParts = bindingOperation.getOperation()
.getInput().getMessage().getOrderedParts(null);
if (bindingOperation.getBindingInput() != null)
extElems =
bindingOperation.getBindingInput().getExtensibilityElements();
}
else
{
operationMessageParts = bindingOperation.getOperation()
.getOutput().getMessage().getOrderedParts(null);
if (bindingOperation.getBindingOutput() != null)
extElems =
bindingOperation.getBindingOutput().getExtensibilityElements();
}
// If the message is not literal, the assertion is not applicable
if (!validator.isLiteral(extElems))
throw new AssertionNotApplicableException();
/* Basic Profile Version 1.1 (http://www.ws-i.org/Profiles/Basic/2003-12/BasicProfile-1.1.htm)
* says that the order of the elements in the soap:body of an ENVELOPE MUST be
* the same as that of the wsdl:parts in the wsdl:message that describes it.