web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / XML Code testing ok in...
Power Automate
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>

 

 

 

 

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard