Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

XML Code testing ok in SOAPUI but fails flow test

(0) ShareShare
ReportReport
Posted on by

I have the XML code shown below in a flow sending a request to a SOAP API. When passing the date in the format below the flow works and returns the required XML response. I need to make the dates dynamic e.g. today + 365 days. I have tried replacing the fromDate and toDate code with the following, this works in SOAPUI and returns the required XML however in PowerAutomate it returns a an error as below. Can anyone give me any guidance as to how to fix this or some alternatives for request a date using a relative date?

 

Amended Date XML

 

<fromDate xsi:type="xsd:string">${=def now = new Date();now.format("yyyy-mm-dd")}</fromDate>

<toDate xsi:type="xsd:string">${=def now = new Date()+365;now.format("yyyy-mm-dd")}</toDate>

 

 

Original Working Code (API Key Hidden)

 

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uri="uri:FlexForce">
 <soapenv:Header/>
 <soapenv:Body>
 <uri:wsdlGetSchedulesV3 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <apiKey xsi:type="xsd:string">****-****-****-****</apiKey>
 <GetSchedulesV3 xsi:type="flex:GetSchedulesV3" xmlns:flex="https://api.quinyx.com/soap/FlexForce">
 <!--You may enter the following 16 items in any order-->
 <!--Optional:-->
 <section xsi:type="xsd:string"></section>
 <!--Optional:-->
 <badgeNo xsi:type="xsd:string"></badgeNo>
 <!--Optional:-->
 <employeeId xsi:type="xsd:int"></employeeId>
 <fromDate xsi:type="xsd:string">2022-02-01</fromDate>
 <!--Optional:-->
 <fromTime xsi:type="xsd:string"></fromTime>
 <toDate xsi:type="xsd:string">2022-03-01</toDate>
 <!--Optional:-->
 <toTime xsi:type="xsd:string"></toTime>
 <!--Optional:-->
 <scheduledShifts xsi:type="xsd:boolean">False</scheduledShifts>
 <!--Optional:-->
 <absenceShifts xsi:type="xsd:boolean">True</absenceShifts>
 <!--Optional:-->
 <modifiedAfter xsi:type="xsd:string"></modifiedAfter>
 <!--Optional:-->
 <modifiedBefore xsi:type="xsd:string"></modifiedBefore>
 <!--Optional:-->
 <includeCosts xsi:type="xsd:boolean">False</includeCosts>
 <!--Optional:-->
 <useFixedSchedule xsi:type="xsd:boolean">False</useFixedSchedule>
 <!--Optional:-->
 <includeNOI xsi:type="xsd:boolean">False</includeNOI>
 <!--Optional:-->
 <includeTags xsi:type="xsd:boolean">False</includeTags>
 <!--Optional:-->
 <includeExtScheduleId xsi:type="xsd:boolean">False</includeExtScheduleId>
 </GetSchedulesV3>
 </uri:wsdlGetSchedulesV3>
 </soapenv:Body>

 

 

Response Error

 

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.quinyx.com/soap/FlexForce"><SOAP-ENV:Body><ns1:wsdlGetSchedulesV3Response xmlns:ns1="uri:FlexForce"><return xsi:type="tns:SchedulesV3Response"><schedules xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:ScheduleV3[0]"></schedules><validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]"><item xsi:type="xsd:string">Invalid fromDate: ${=def now = new Date();now.format(&quot;yyyy-mm-dd&quot;)}</item><item xsi:type="xsd:string">Invalid toDate: ${=def now = new Date();now.format(&quot;yyyy-mm-dd&quot;)}</item></validationErrors></return></ns1:wsdlGetSchedulesV3Response></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

 

 

 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics