0

I've a script vugen which send a request to a server with fake data which is sent to another server with mock & receive a response. For a field, the date format is datetime, but they both needs a specific format for datetime

XML needs yyyy-mm-ddThh:mm:ss[.fffffffff] format and Vugen needs yyyy-mm-dd hh:mm:ss[.fffffffff]

<?xml version="1.0"?>
<ns:demandeSouscription xmlns:ns="http://url/psc/demandeSouscription/objet/v1">
    <infosDemande>
        <numDemande>1000000019</numDemande>
        <dateCreation>2016-11-22T14:23:14.586</dateCreation>
        <typeDemande>1CTRCT10</typeDemande>
        <situationUsage>MES_Standard</situationUsage>
        <statutGlobal>DEVERSEMENT_EN_COURS</statutGlobal>
        <energie>GAZ</energie>
    </infosDemande>
    <infosLogement>
        <numeroPDL>03082814487507</numeroPDL>
    </infosLogement>
    <infosTitulaire>
        <numeroBP>1010101010</numeroBP>
    </infosTitulaire>
</ns:demandeSouscription>

In my WSDL here the line for the date field which cause my problem :

<xsd:element minOccurs="0" name="dateCreation" type="xsd:dateTime"/>

To pass XML I used the format with T inside but I get this error : [frmkcommonate:rmatStringDateTmlGregorianCalendar] : java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]

Anyone have a solution to deal with both, xml & vugen ? Thanks

LynxWeb
  • 69
  • 1
  • 9
  • Which protocol are you using? – Buzzy May 23 '19 at 06:42
  • I'm using SOAP protocol – LynxWeb May 23 '19 at 08:06
  • In LR, an XML is parsed by XStream, which requires a datetime format of yyyy-mm-dd hh:mm:ss[.fffffffff]. If you want more info, please provide some more details, e.g. script or full log. – phillip May 24 '19 at 06:02
  • I forget to explain that this xml is in a fake data in database server which is used by running my script vugen. If I delete the "T" is datetime I get another error. I edit my post to add the wsdl for this date field. – LynxWeb May 24 '19 at 08:56
  • Create two parameters. One for date. One for time. – James Pulley May 24 '19 at 12:39
  • @JamesPulley read my post, I edited to explain that the XML is a field of a database which is the fake data I used for my test. This XML is not in my VuGen script. – LynxWeb May 27 '19 at 09:23
  • Well then it is not a VUGEN issue if it is from one platform to another. Speak to the middleware tier owner. – James Pulley May 27 '19 at 17:15
  • Nothing stops you from defining a custom date time format – James Pulley May 27 '19 at 17:18

0 Answers0