Can message validation policy populate default values to the request as per the XSD/WSDL?

Hi,

I have a wsdl with default attribute for some of the elements.

For example,

<xsd:element default="-1" form="unqualified" maxOccurs="1" minOccurs="1" name="ID" nillable="false" type="xsd:long"/>

Currently, when the incoming request has empty element such as <ID/>, the message validation fails. However, I want the default value defined for this element & few other to be autopopulated in the request instead of failing at this point.

Appreciate your answers or suggestions to the above scenerio, thanks.

0 1 111
1 REPLY 1

No, there is no capability in the validation policy to insert default values.

However, you would be able to do this with an XSLT.

You would use the XSLT before the MessageValidation, I suppose.