WSO2 ESB-Как передавать даты с остальным URL - PullRequest
0 голосов
/ 30 ноября 2018

лайки URL:

http://ict.esg.ilfseducation.com`/gtrapi/api/profilesystem?`d1=17-10-2018&d2=17-10-2018

Я пытаюсь этот код передать с датами динамически d1 и d2, но не работает. Но как передавать даты с динамически, пожалуйста, любой предложит мне. Я должен попробовать этот другой URLс партией sigle работает нормально. но даты не работали, пожалуйста, предложите мне.

api:

   <?xml version="1.0" encoding="UTF-8"?>
<api context="/gtrapi/api/profilesystem?" name="SCR_profileapi" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET" protocol="http" uri-template="/{date1}/{date2}">
        <inSequence>
            <property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
            <log level="full"/>
            <send>
                <endpoint key="SCR_profileendpoint"/>
            </send>
        </inSequence>
        <outSequence>
            <switch source="get-property('axis2','HTTP_SC')">
                <case regex="200">
                    <log description="200log" level="custom">
                        <property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
                    </log>
                    <send/>
                </case>
                <default>
                    <log description="reslog" level="custom">
                        <property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
                        <property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
                        <property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
                    </log>
                </default>
            </switch>

            <send/>
        </outSequence>
        <faultSequence>
            <switch source="get-property('axis2','HTTP_SC')">
                <case regex="200">
                    <log description="200log" level="custom">
                        <property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
                    </log>
                </case>
                <default>
                    <log description="reslog" level="custom">
                        <property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
                        <property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
                        <property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
                    </log>
                </default>
            </switch>

            <send/>
        </faultSequence>
    </resource>
</api>

конечная точка:

<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="SCR_profileendpoint" xmlns="http://ws.apache.org/ns/synapse">
   <http uri-template="http://ict.esg.ilfseducation.com/gtrapi/api/profilesystem?d1={uri.var.service.date1}&amp;d2={uri.var.service.d2}" method="get">
   </http>"/>
</endpoint>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...