Neither Commons Validator nor Struts knows how to process XML requests like that out of the box. Assuming Struts 1, the answer is that you will have to write your own logic to populate the form bean from the XML request, after which validation can be performed the same as you would with a regular request.

L.

Ghaznavi, Syed wrote:
It's a question regarding commons validator api, wherein i am trying to
validate an input request form (xml-request) which contains a collection
of
items...like

<OrdersInputRequest>
  <Order>
     <OrderId>222</OderId>
     <OrderDate>04/04/2004</OrderDate>
  </Order>
   <Order>
     <OrderId>223</OderId>
     <OrderDate>04/04/2004</OrderDate>
   </Order>
</OrderInputRequest>

What would be the valid format for the commons-validator form to
validate
this input request? Since there can be any number of Orders
(java.util.ArrayList) in the request and all the items have the same
validation.
I looked at the examples on the project but couldn't find any
solution...

*     <formset>
       <form name="OrdersRequestValidationForm">
          <field property="OrderId" type="Integer" depends="required">
</field>
          <field property="OrderDate" type="String" depends="required">
</field>
       </form>
    </formset> *

Any assistance on this is appreciated..

Thanks!

--Syed Ghaznavi


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to