Sonic Connect Service return data

Posted by wvanrensburg on 28-Jan-2011 13:28

Hi, we have implemented a Sonic Connect Service (v8.0) and used it to perform a Rest call to a public webservice. Right now, the Connect Service call only returns back the StatusCode, and Response. Is there anyway to expand on the return data to include things like Content-Type, and Status-Text?

Thanks!

Wesley

All Replies

Posted by peaston on 28-Jan-2011 15:33

Wesley

When calling a RESTful service, a header filter strategy is applied that determines which HTTP response headers get propagated into the ESB itinerary message headers.

You'll need to edit the spring.xml (in the project config directory)  to change this strategy. For example, the filter settings used by the generic rest invoke operation is defined here...

<

bean id="GlobalGenericRestInvocationHeaderFilterStrategy" class="com.progress.sonic.esb.camel.SonicHeaderFilterStrategy">

<

property name="outFilter">

<

set>

<

value>Authorizationvalue>

<

value>Cache-Controlvalue>

<

value>Connectionvalue>

<

value>Content-Typevalue>

<

value>Content-Lengthvalue>

<

value>Hostvalue>

<

value>Datevalue>

<

value>Servervalue>

<

value>Transfer-Encodingvalue>

<

value>Pragmavalue>

<

value>User-Agentvalue>

etc

This means, for example, that "Host" and "Date" headers to not get propagated back...

Content-type is a special case. The response content-type reflects itself as the content-type in the added "Response" part.

Status-text is not a regular HTTP header per se, I don't believe that status text is made available to the itinerary.

Peter

Posted by wvanrensburg on 28-Jan-2011 19:27

Thanks. That helped a lot!

Posted by wvanrensburg on 09-Feb-2011 16:59

Hi Peter, forgive me if this is a stupid question. Im trying to get the Date to flow through to the Output side. How would I exectly go about doing that? Ive tried to remove it from the spring.xml file, but it doesnt seem to work.

Thanks!

Wes

This thread is closed