Hi All,
          im not able to set the output from the call mediator as the actual
output, im calling the call mediator in the OUT flow, my code looks like
below.

<?xml version="1.0" encoding="UTF-8"?>
<sequence name="callTokenService_flow" trace="disable"
xmlns="http://ws.apache.org/ns/synapse";>
    <log level="custom">
        <property name="insideToken" value="inside the token esb"/>
    </log>
    <payloadFactory media-type="xml">
        <format>
            <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
                <soapenv:Body>
                    <root xmlns="">
                        <grant_type>password</grant_type>
                        <username>admin</username>
                        <password>admin</password>
                    </root>
                </soapenv:Body>
            </soapenv:Envelope>
        </format>
        <args/>
    </payloadFactory>
    <call>
        <endpoint>
            <http method="post"
uri-template="https://localhost:8243/token"/>
            <property expression="fn:concat('Basic
','WnRJQWVNUHdiR1dVcnRueE5hRWtnanhuVGNrYTplRkwwSUJ4MXRNU25SSmgwTGtySFNNVXF4akVh')"
name="Authorization" scope="transport"
xmlns:ns="http://org.apache.synapse/xsd"/>
            <property name="messageType" scope="axis2"
value="application/x-www-form-urlencoded"/>
            <property name="Content-Type" scope="transport"
value="application/x-www-form-urlencoded"/>
        </endpoint>
    </call>
    <log level="custom">
        <property expression="$body" name="Message3"/>
    </log>
    <enrich>
        <source clone="true" xpath="$body//jsonObject"/>
        <target type="body"/>
    </enrich>
    <log level="custom">
        <property expression="$ctx:body" name="MESSAGE"/>
        <property expression="json-eval($.MESSAGE)" name="location"/>
        <property expression="$body//access_token" name="access_token"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
        <property expression="$body//refresh_token" name="refresh_token"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
        <property expression="$body//expires_in" name="expires_in"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
        <property expression="get-property('ENDPOINT_PREFIX')"
name="Endpoint"/>
        <property expression="get-property('transport', 'Content-Type')"
name="Content-Type"/>
    </log>
    
</sequence>




--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to