Announcement Announcement Module
Collapse
No announcement yet.
payload encoding when payload is a URL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • payload encoding when payload is a URL

    I am having a strange problem. I have the need to use Amazon Web API to make restful calls to interact with Amazon cloud. Amazon Web API requires developer to sign service calls using SHA256 hash for integrity. I used a custom service activator to create the url (with signature) and return it via a Message<String>. When the downstream http outbound channel adapter (shown below) gets the url, it returns http error. The error is generally related to the signature and points to the url having some encoding that the web service does not like.

    When i open the same url in a HttpURLConnection object directly in the service activator (instead of return the url to "awsInformation" channel) the result is 200. The Message<String> must be doing something to the url that is causing it to change ever so slightly. The AWS API is real picky on URIs and they mandate several ISO and IETF particulars in the way the URL is encoded.

    Code:
    <int-http:outbound-channel-adapter id="awsREST"
    		channel="awsInformation" 
    		url-expression="payload"
    		http-method="GET" 
    		expected-response-type="java.lang.String"
    		/>
    I am not sure if this is a bug.

  • #2
    I realized this is the wrong place. So I crossposted here in Spring Integration:
    http://forum.springsource.org/showth...161#post447161

    Comment

    Working...
    X