Hello, I have this scenario and can't figure out how to make it work with
synapse:
I would like to make synapse lo "listen" to a simple REST url like this:

"hostname/assest/1/15" where a and 15 are ids. (Like for instance get
assest 15 of user 1)

then, I have another external service with a longer url that performs the
actual fetching of the asset. So the idea would be that the synapse REST
get would call this external service and send the binary asset (an image)
to the caller.


So basically it would be like this:


Enter a url in a browser: localhost/asset/1/15
synapse listen this url and calls "
http://externalservice/getAsset/1/15/content"; and return the binary
response of this service to the original caller.


Any hints? I have tried with an api and also with a proxy, but there seems
that I can't make it work:



<proxy name="asset" transports="http">
    <target>
        <endpoint>
            <address uri="
http://localhost:8085/digitalassets-app/content/1-RetailStore/15-SKU/asset/content";
format="get"/>
            <log level="full"/>
        </endpoint>
        <outSequence>
            <log level="full"/>
        </outSequence>
    </target>
</proxy>

<api name="DigitalAssets" context="/assets">
    <resource uri-template="/{store}/{sku}" methods="GET">
        <inSequence>
            <log level="full"/>
            <send>
                <endpoint >
                    <address uri="http://www.google.com"; format="get"/>
                </endpoint>
            </send>
        </inSequence>
        <outSequence>
            <log level="full"/>
        </outSequence>
    </resource>
</api>


Thanks in advance!
Regards,
Manuel

-- 
Disclaimer: The information contained in this communication is confidential 
and only for the use of the intended addressee(s).  If you have received 
this communication in error, any disclosure or use of such information is 
strictly prohibited.  Please notify the sender immediately and destroy all 
copies.  Thank you.

Reply via email to