Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
555 views
in Technique[技术] by (71.8m points)

wso2esb - How to read query param in WSO2 ESB 4.8 or above?

I have a rest end point in WSO2ESB (4.8),I need to read query parameter to set as dynamic payload as the my business ,But i failed to read it due to newer with wso2 ESB.Any help ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The bellow code may help you

<api xmlns="http://ws.apache.org/ns/synapse" name="sample" context="/api/sample">
   <resource methods="OPTIONS GET" uri-template="/{val1}/groups/{val2}.json?q1={v1}&q2={v2}">
  <inSequence>
     <property name="uri.var.q1" expression="$url:q1"></property>
     <property name="uri.var.q2" expression="$url:q2"></property>
     <property name="uri.var.val1" expression="get-property('uri.var.val1')"></property>
     <property name="uri.var.val2" expression="get-property('uri.var.val2')"></property>
     <send>
        <endpoint>
           <http method="GET" uri-template=""></http>
        </endpoint>
     </send>
  </inSequence>
  <outSequence>
     <send></send>
  </outSequence>
  </resource>
</api>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...