Listing the parameters in rest-service-component

View: New views
2 Messages — Rating Filter:   Alert me  

Listing the parameters in rest-service-component

by Richard Swart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings!

Is there a better way to specify the optional parameters in the *rest-service-component* ?

Long story short, I have to send a request to a REST service with about 10 to 13 dynamic parameters.

with the *rest-service-component*, the only way i see how to set these parameters is to list them out like so:

<http:rest-service-component serviceUrl="http://localhost/test">
<http:optionalParameter value="param1"/>
<http:optionalParameter value="param2"/>
...
</http:rest-service-component>


It would be nice if I can just passing a Map with the parameters and it's values.

thanks in advance

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Listing the parameters in rest-service-component

by Richard Swart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I kind of found a alternative way to approach this.
Instead of using the *rest-service-component*, we use the <http:outbound-endpoint> with the expression eveulator.

<http:outbound-endpoint address="http://dummysite.com/process?%23[payload:java.lang.String]"/>

All I have to do is configure an inbound custom-transformer to translate the params Map into the query string and return that.

It works fine right now, since I'm so new to mule, i'm not sure if this is the right way of archiving this.  -_____-

please help.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email