Validating a soap:Body
Yes. As long as you are using literal encoding (either document/literal or rpc/literal) you can validate the contents of the soap:Body. When using document/literal, the child element of the soap:Body is always defined by a schema, and you can validate the structure and composition of that element. It's a bit more difficult when using rpc/literal. In this case the SOAP engine generates the child element of the soap:Body. This generated child element, which has the same name as the service operation, is a wrapper for the RPC parameter elements. Because this wrapper element is generated at runtime, you do not have a schema that defines this element. You do have a schema for each parameter element within the generated wrapper element; therefore you can validate each individual parameter element. You need to write some logic to verify that the wrapper element is valid and that the parameter elements are in the right sequence.
Dig Deeper on Topics Archive
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our Application Architecture experts
Start the conversation
0 comments