0

From proxy service or sequence or rest API WSO2 developer studio 3.6.0 is removing $ from XPATH variables like $ctx, $trp, $body etc after build. Please advice me how to fix this issue or work around for this.

example sequence

<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>

Community
  • 1
  • 1
Mahesh.Ganta
  • 43
  • 1
  • 5

1 Answers1

0

Please check the maven-car-plugin's version in the CAPP's pom file. It should be 2.0.8 as shown below

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

Also make sure the ESB project's pom file contains the version 2.0.8 as the sequence plugin version

    <groupId>org.wso2.maven</groupId>
    <artifactId>wso2-esb-sequence-plugin</artifactId>
    <version>2.0.8</version>
Christine
  • 71
  • 1