IBM Support

Unexpected schema validation error received using Validate action to validate SOAP body

Troubleshooting


Problem

When sending a request to a DataPower service that is defined with the XML or Non-XML request type, an unexpected schema validation error may occur when using the Validate action with SOAP Validation set to body,

Symptom

The following errors are found in the DataPower log:

    09:27:54        multistep       error   7716225 request x.xx.xxx.xx    
    0x80c00009      mpgw (MyService_MPG): request
    MyService_Policy_Request_Rule_0 #6 validate: 'PIPE schema
    local:///MyService_MPG/mySchema.xsd dpvar_1' failed:http://ipaddr:port/: cvc-wildcard 2: unrecognized element

    {http://www.w3.org/2003/05/soap-envelope}Envelope


    09:27:54        multistep       error   7716225 request x.xx.xxx.xx    
    0x01d30003      mpgw (MyService_MPG): Schema Validation Error
    09:27:54        schema  error   7716225 request x.xx.xxx.xx     0x80c00010    
    mpgw (MyService_MPG): Execution of
    'local:///MyService_MPG/mySchema.xsd' aborted:http://ipaddr:port/: cvc-wildcard 2: unrecognized element

    {http://www.w3.org/2003/05/soap-envelope}Envelope

Cause

The validate for "SOAP body" only works for the SOAP request type directly.

Diagnosing The Problem

This issue may occur when both of the following are true:

  • The request type of the service is XML or Non-XML.
  • The request rule contains a Validate action that does "SOAP body" validation.

Resolving The Problem

To resolve this issue, extract the soap:Body content by adding an "Extract Using XPath" action before the Validate action.

Define the "Extract Using XPath" action with:

  • Input context PIPE
  • Output context PIPE
  • XPath expression: "/*/*[local-name()='Body']/*"

[{"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"5.0.0;4.0.2;4.0.1;4.0;3.8.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 June 2021

UID

swg21621478