2014-07-22 90 views
0

從代理服務或序列或rest API WSO2 developer studio 3.6.0在構建之後從$ ctx,$ trp,$ body等等XPATH變量中刪除$。請告訴我如何解決此問題或解決此問題。

例如序列

<sequence xmlns="http://ws.apache.org/ns/synapse" name="XMFSequence"> 
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:np1="http://ws.apache.org/commons/ns/payload" xmlns:np="http://schemas.xmlsoap.org/soap/envelope/" xmlns:np2="http://services.www.up.com/xmf/2.0" name="serviceName" expression="//np:Envelope/np:Header/np2:request-header/np2:service-name" scope="default" type="STRING"/> 
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:fn="http://www.w3.org/2005/xpath-functions" name="localEntryName" expression="fn:replace($ctx:serviceName,'/','-')" scope="default" type="STRING"/> 
<property xmlns:ns="http://org.apache.synapse/xsd" name="contractEnforcedVal" expression="get-property(get-property('localEntryName'))" scope="default" type="STRING"/> 
<filter xmlns:ns="http://org.apache.synapse/xsd" xpath="fn:contains(get-property('contractEnforcedVal'),$trp:XMFRequestor)"> 
    <then> 

     <filter xpath="fn:contains(get-property('contractEnforcedVal'),'isSecured=true')"> 
      <then> 
       <class name="com.uprr.app.poc.esb.mediator.RequestHandler"> 
        <property name="secValServiceURL" value="http://localhost:9080/SecurityService/secure-util"/> 
       </class> 
       <filter xpath="fn:contains(get-property('isAuthorized'),'true')"> 
        <then> 

         <send> 
          <endpoint key-expression="get-property('serviceName')"/> 
         </send> 
        </then> 
        <else> 

         <drop/> 
        </else> 
       </filter> 
      </then> 
      <else> 
       <send> 
        <endpoint key-expression="get-property('serviceName')"/> 
       </send> 
      </else> 
     </filter> 
    </then> 
    <else> 

     <drop/> 
    </else> 
</filter> 

回答

0

請檢查Maven的汽車插件的在CAPP的POM文件的版本。它應該是2.0.8如下圖所示

<groupId>org.wso2.maven</groupId> 
    <artifactId>maven-car-plugin</artifactId> 
    <version>2.0.8</version> 

同時確保ESB項目的POM文件中包含了2.0.8版的序列插件版本

<groupId>org.wso2.maven</groupId> 
    <artifactId>wso2-esb-sequence-plugin</artifactId> 
    <version>2.0.8</version>