如何在apache camel中检查查询参数是null还是空

时间:2015-05-26 15:12:31

标签: spring-mvc apache-camel

我正在尝试使用camel-restlet-2.14.0来调用外部REST服务。对rest服务的调用将取决于user.i尝试使用xml配置执行此操作的查询参数。

<spring:camelContext trace="true">
        <spring:route id="countries-fetch-route">
            <spring:from uri="restlet:/verifyTest?restletMethod=GET">
            </spring:from>
            <spring:choice>
                <spring:when>
                    <spring:simple>{header.abc} != null &amp;&amp; {header.pqr} != null</spring:simple>     
                    <spring:to uri="restlet:http://localhost:10080/TestRESTfulService/api/v1/av/verify/abc?abc={header.abc}&amp;pqr={header.pqr}"></spring:to>
                </spring:when>
            </spring:choice>
           <spring:transform>
                <spring:simple>${body}</spring:simple>
            </spring:transform>
        </spring:route>
    </spring:camelContext>

如果有人可以帮我检查那些真正有用的标题(查询参数)

0 个答案:

没有答案