my sequence is too long,so please go through this

∥☆過路亽.° 提交于 2019-12-13 06:14:06

问题


Below is my sequence i am filtering based on clientid and modifiedon,it is giving proper data when i am running at soap side as well as query is fine.

<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ParameterMobile_Seq">

   <property xmlns:ns="http://org.apache.synapse/xsd"
             name="WorkPartyBranchId"
             expression="//WorkPartyBranchId/text()"/>
   <log level="full">
      <property xmlns:ns="http://org.apache.synapse/xsd"
                name="kk"
                expression="get-property('Authentication')"/>
   </log>
   <filter xmlns:ns="http://org.apache.synapse/xsd"
           xpath="get-property('Authentication')='false'">
      <then>
         <payloadFactory>
            <format>
               <ResponseJSON xmlns="">
                  <Exception>Authentication Failed</Exception>
                  <Status>404</Status>
               </ResponseJSON>
            </format>
         </payloadFactory>
         <property name="HTTP_METHOD" value="POST" scope="axis2" type="STRING"/>
         <property name="RESPONSE" value="true" scope="default" type="STRING"/>
         <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
         <send/>
         <log level="full"/>
      </then>
      <else>
      <log level="full"/>
         <payloadFactory>
            <format>
               <p:mparameter xmlns:p="http://ws.wso2.org/dataservice">
                 <p:clientid>$1</p:clientid>
                 <p:modifiedon>$2</p:modifiedon>               
              </p:mparameter>
            </format>
            <args>
               <arg expression="get-property('clientid')"/>
               <arg expression="get-property('modifiedon')"/>
            </args>
         </payloadFactory>
          <log level="custom"/>
         <send receive="ParameterMobile_Seq2">
            <endpoint>
               <address uri="http://localhost:9764/services/mparameter_DataService/" format="soap11"/>
            </endpoint>
         </send>
         <log level="full"/>
      </else>
   </filter>
</sequence>

This is only the sequence,please check and revert me.And showing an exception as 500000.so can we esplain in the em


回答1:


In the filter mediator, then condition you are trying to send request back to the client as response. So, you need to remove the "To" header. The "else" condition looks fine. What is the issue now you are facing and at which configuration segment you are facing the issue?



来源:https://stackoverflow.com/questions/16894787/my-sequence-is-too-long-so-please-go-through-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!