简体   繁体   中英

Unable to call Sequence in API (WSO2)

I am trying to call sequence from an API in wso2. Api I have written is below:

<resource methods="GET">
        <inSequence>
            <log level="custom">
                <property name="Bashir bhhhh" value="Service"/>
            </log>
            <sequence key="checkseq"/>
            <log level="custom">
                <property name="Bashir bhhhh" value="Service Ends"/>
            </log>
        </inSequence>
    </resource>

The Sequence I have written is mentioned below:

<sequence name="checkseq" trace="disable" xmlns="http://ws.apache.org/ns/synapse"/>
   <log level="custom">
        <property name="Seq" value="Working Starts"/>
    </log>
    
    <log level="custom">
        <property name="Seq" value="Working Ends"/>
    </log>
</sequence>

It is not giving me any errors or any problem, just not going into sequence, skipping it. Both logs above and below sequence are printing. Would be grateful if anyone can guide me with where am I doing wrong. Thank You

There is an issue with your sequence definition. You have mistakenly added a self-closing ( <sequence /> ) tag for sequence.

Use the following updated sequence.

<sequence name="checkseq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
   <log level="custom">
        <property name="Seq" value="Working Starts"/>
    </log>
    
    <log level="custom">
        <property name="Seq" value="Working Ends"/>
    </log>
</sequence>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM