How to configure a RESTful client using Sonic Connect

Posted by cmspsdn on 04-Jul-2011 06:21

Need some help seting up a RESTful client to perform http POST's. Sonic documentation is a bit vague in the 'How To' steps.

My criteria is simple.

Connect to a secure URL, supply a method of POST, a username, a password, "application action request" and post data.

I've tried using the "Generic Rest Service", gave it a URL, added a few parameters which I map constants to. I seemed to make the connection, but the site responded with a message which appeared to be that it couldn't validate the account.

I then changed the URL to one of dev systems so that i could view the logs. When tried this  i saw that the parameters that i had supplied where not being set in the http header as i expected them to be.

I performed another test, this time i created a RESTful client. Again i created the parameters i needed and tested connecting to our dev system. The logs showed me the same result, parameters not being set in the http header.

I'm obviously missing something (like knowledge).

Any help would be appreciated, pointers, examples, documents.

Thanks, Tony.

All Replies

Posted by wtam on 05-Jul-2011 21:06

Check out the "Configuring SSL Support" section in http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html.  You will need to click on the Spring.xml link in SC Editor in WorkBench to edit the spring.xml file.  You can then create a http:conduit bean and supply user name and password.

Posted by cmspsdn on 06-Jul-2011 17:16

Thanks William you did point me in a direction, but wasn’t quite the solution.

I stumbled across another post which did. “Sonic Connect: All Message Headers sent as HTTP Headers” is a post from a user who actually wants to do the opposite to me and thereby gave me the solution.

I needed to add my parameters to the XQMessage headers in a step prior to the calling of the sonic connect service. The sonic connect service would by default then include them in the HTTP headers, except where the “In/Out Filter” rules applied.

If only I could find a document/tutorial explaining all this.

Thanks again William.

This thread is closed