<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~  Copyright (c) 2020, Entgra (pvt) Ltd. (http://entgra.io)
  ~
  ~  All Rights Reserved.
  ~
  ~  Unauthorized copying of this file, via any medium is strictly prohibited.
  ~  Proprietary and confidential.
  -->

<api context="/sync" name="sync-api" xmlns="http://ws.apache.org/ns/synapse">
    <resource faultSequence="fault" methods="GET" url-mapping="/time">
        <inSequence>
            <payloadFactory>
                <format>
                    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                        <soapenv:Body>
                            <text xmlns="http://ws.apache.org/commons/ns/payload">$1</text>
                        </soapenv:Body>
                    </soapenv:Envelope>
                </format>
                <args>
                    <arg expression="get-property('SYSTEM_TIME')"/>
                </args>
            </payloadFactory>
            <property name="messageType" value="text/plain" scope="axis2"/>
            <respond/>
        </inSequence>
        <outSequence>
        </outSequence>
    </resource>
</api>
