Forum Stats

  • 3,824,755 Users
  • 2,260,414 Discussions


SOA 12c - REST Adapter - Using GET verb with response is "Accept:application/pdf"

EdgarOliveira Member Posts: 57 Blue Ribbon


I have a problem for an implementation and would like the opinion of the forum.

in my implementation, the client has a service of type "REST", where through the method "GET" we will pass the necessary key and this service returns a PDF file with an invoice.

however, is URL used by the get method has a change, where in the header the "Accept" has been changed from the default to "application/pdf", is form when searching for the URL in a browser, the file is opened on the screen.

I tried through REST adapter changing the property during invoke. and I also tried through the command "xpath" below:

now:readBinaryFromFileWithMimeHeaders( $urlBoleto , 'one' , 'application/pdf', '', '7bit', '', 'en')

in the xpath command returns me a "href" in the attribute, but do not know how to convert it to a String or base64 file.

How do I call this service and get the return through SOA?