Q
Problem solve Get help with specific problems with your technologies, process and projects.

Validating a soap:Body

Can the contents of a soap:Body be validated? Assume a schema imported into the WSDL. Also assume document-literal style.
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.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close