Forum Discussion

GabrielM's avatar
GabrielM
Visitor
3 years ago

Date period

Hi everyone,

 

In to the end code, you can see this: (<exp:fechaVentas>?</exp:fechaVentas>). Here is my doubt.

 

I have to connect to a SOAP web service, one of the schemas is sales of a period, and I have doubts about how to apply the language to query a range or period of dates.

I copy the code so you can see it.

 

   <soapenv:Header/>

   <soapenv:Body>

      <exp:Ventas>

         <exp:dATA_VENTAS>

            e

            <!--1 or more repetitions:-->

            <exp1:Ventas>

               <exp1:Codigo_Material>?</exp1:Codigo_Material>

               <exp1:Fecha_Factura>?</exp1:Fecha_Factura>

               <exp1:Codigo_Cliente>?</exp1:Codigo_Cliente>

               <exp1:Numero_Documento>?</exp1:Numero_Documento>

               <exp1:Tipo_Documento>?</exp1:Tipo_Documento>

               <exp1:Numero_Pedido>?</exp1:Numero_Pedido>

               <exp1:Cantidad_Facturada_Kg_L>?</exp1:Cantidad_Facturada_Kg_L>

               <exp1:Monto_Factura>?</exp1:Monto_Factura>

               <exp1:Costo_Factura>?</exp1:Costo_Factura>

               <exp1:Monto_Comision>?</exp1:Monto_Comision>

               <exp1:Monto_Descuento>?</exp1:Monto_Descuento>

               <exp1:Monto_Margen>?</exp1:Monto_Margen>

               <exp1:Margen_Porcentual>?</exp1:Margen_Porcentual>

               <exp1:Codigo_Vendedor>?</exp1:Codigo_Vendedor>

               <exp1:Codigo_Sucursal>?</exp1:Codigo_Sucursal>

            </exp1:Ventas>

            gero

         </exp:dATA_VENTAS>

        <exp:fechaVentas>?</exp:fechaVentas>

      </exp:Ventas>

   </soapenv:Body>

</soapenv:Envelope>

 

How could I write a code to query a period of dates?

        <exp:fechaVentas>?</exp:fechaVentas>

 

 

Thanks! 

Regards,

 

Gabriel Gilli

1 Reply

  • richie's avatar
    richie
    Community Hero
    Hey GabrielM,

    If i understand correctly you can either use a xml content match assertion or you could use a script assertion (groovy script).

    Can you confirm the date values youd expect in the result?

    Cheers,

    Rich