Integration- HTTP Response, Content-Type: image/jpeg

Integration with external API is returning response as success and HTTP response Content-Type as image/jpeg.  How can we display the response image.  

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi  As per my understanding, you are trying to consume an external service using Integration Object of Appian which returns the Binary Response. 

    Few points to consider here:

    Integration Object is meant for exchanging the text content to / from external service but this cannot deal with Binary Content.

    Here your integration object is telling you that, it's able to interact with the external system but cannot display the information, because it's a Binary Content.

    Hence, if you want to display the response image, then you need to use HTTP File Download Smart Service and configure it's input parameters such as, endpoint, Authentication / Header, File Name, Folder (to define where exactly you want to store this downloaded document).

    Also, store the downloaded document ID(New Document Created (Node Output) into the process variable and display this document on your Interface (either as a Download Link, or as a imageField, if it's an image)


    NOTE: It all depends upon the service, what mode of Authentication does it support, if it's Basic Authentication then you can configure this directly inside this Smart Service, but if the authentication require, Cookie, OAuth 2.0 headers in such case, first of all you need to invoke this service using Integration Object, Call this Integration inside the process, parse the response and extract the header value in process and then pass this Cookie / OAUth Header using Headers Input Parameter of this Smart Service in the form of Key-Value Pair

    Hope this will help.

Reply
  • 0
    Certified Lead Developer

    Hi  As per my understanding, you are trying to consume an external service using Integration Object of Appian which returns the Binary Response. 

    Few points to consider here:

    Integration Object is meant for exchanging the text content to / from external service but this cannot deal with Binary Content.

    Here your integration object is telling you that, it's able to interact with the external system but cannot display the information, because it's a Binary Content.

    Hence, if you want to display the response image, then you need to use HTTP File Download Smart Service and configure it's input parameters such as, endpoint, Authentication / Header, File Name, Folder (to define where exactly you want to store this downloaded document).

    Also, store the downloaded document ID(New Document Created (Node Output) into the process variable and display this document on your Interface (either as a Download Link, or as a imageField, if it's an image)


    NOTE: It all depends upon the service, what mode of Authentication does it support, if it's Basic Authentication then you can configure this directly inside this Smart Service, but if the authentication require, Cookie, OAuth 2.0 headers in such case, first of all you need to invoke this service using Integration Object, Call this Integration inside the process, parse the response and extract the header value in process and then pass this Cookie / OAUth Header using Headers Input Parameter of this Smart Service in the form of Key-Value Pair

    Hope this will help.

Children
No Data