Is there a way to consume REST based pdf web service in PeopleSoft

We have a requirement to consume an pdf REST based web service in PeopleSoft and display the pdf file on browser. I have configured the Service & Service Operation in PeopleSoft.
I have also confirmed the request is making to target server. Also when using curl, confirm the target web service is working  and response seems to be binary bytes representing pdf file.
How can I consume this response from PeopleSoft message object. Tried using contentstring() and trying to do %response.write
   &getrpt_RESP = %IntBroker.SyncRequest(&MSG);
   &strresponse = &getrpt_RESP.GetContentString();
   %response.write(strresponse );
/* Open a file.pdf* - to do/
/* Write the response from message to file - to do */
/*Use view attachment to open the file on browser - to do*/
But this returns nothing on browser.
If I had to copy pdf file, I normally would use something like
   Local JavaObject &in = CreateJavaObject("java.io.FileInputStream", &SrcFullPath);
   Local JavaObject &out = CreateJavaObject("java.io.FileOutputStream", &filepath);
   Local JavaObject &buf = CreateJavaArray("byte[]", 1024);
   Local number &byteCount = &in.read(&buf);
   While &byteCount > 0
      &out.write(&buf, 0, &byteCount);
      &byteCount = &in.read(&buf);
   End-While;
But I am failing to find a way to copy the bytes from message to a file?
Any help is appreciated!

Integration Broker supports MTOM. You can find an example here: Sending and Receiving Binary Data.
The alternative is to use Java to make the HTTP request. You can use HttpClient, as Sasank mentioned, if you don't mind managing jar dependencies. The alternative is to use HttpUrlConnection directly. Not easy in PeopleCode, but possible. If you are on PeopleTools 8.53, then you can script it in JavaScript and run it on the server through the Rhino JavaScript script engine manager included with Java 7 and part of PeopleTools 8.53+. I find this MUCH easier because you don't have to deal with reflection.
Once you get the binary file, the next task is sending it to the client in binary format. %Response.WriteBinary works great, but requires you to start with binary data. I am only aware of one way to read binary data in PeopleCode that is suitable for %Response.WriteBinary and that is to select the binary data out of the database and into an Any variable. I have not figured out how to convert Java binary data into something suitable for PeopleCode's %Response.WriteBinary.

Similar Messages

  • Is there any way to download a report by web services or know its content?

    Hi everyone,
    I need to know, maybe, using web services or anyway I can if a report will show some result when someone executes it, or if it just will show no results.
    I hope that there is any way to know the number of lines that will be returned from the report, or maybe download the report to a csv son I can open the file and know its content.
    Thank you.
    Kim.

    Thanks for the answer
    And do you know another way to know if a report will show any result or not without before to open it? maybe with a call by the url...
    Thanks, Kim

  • Is there a way to update an external dictionary for services without migrating the services

    Is there a way to update an external dictionary for services without migrating the services
    Is there a way to update a common external dictionary used by many services without migrating each and every service that uses the dictionary.  I have updated the table in the database and the external dictionary in our Development Environment. The external dictionary is used by many services. When I migrate the changed service to TEST/STAGE/PROD environments (NOTE: the table has been updated in the TEST/STAGE/PROD Databases), only the changed service is having the external dictionary updated. All other services that use the same external dictionary are NOT updated. I have the following questions
    Is it possible to migrate dictionaries so that all the services which are using that dictionary are updated?
    If the first one is not possible, Is there any other way to update the external dictionary without migrating all the services that use dictionary?

    dont think so but I could be wrong
    as it were I didn't like the build in audio so I connected some external logictech 2.1 speakers  but there
    are times when I use headset so I bought this one
    or any minijack splitter will work too so I have 2 things connected to the headset port works just fine
    http://www.belkin.com/IWCatProductPage.process?Product_Id=404634

  • Is there a way to take an existing PDF and make it into a form that will aggregate the responses?

    Is there a way to take an existing PDF and make it into a form that will aggregate the responses? 

    Sabian has pointed you to an older Acrobat X tutorial.
    It depicts the use of acrobat.com "workspaces".
    "Workspaces" are going away soon.
    See:
    https://forums.adobe.com/docs/DOC-4203 
    So, what is shown in the Adobe TV session is, basically, obsolete.
    For forms you may want to give acrobat.com's (now "Adobe Document Solutions) FormsCentral subscription service a look-see.
    https://new.acrobat.com/en_us/products/formscentral.html 
    Be well...

  • When i send a PDF file to out side print, some of the things I aded dose not print. Is there a way I can "close" the PDF when i finish the work- so' every thing will be printed for sure

    when i send a PDF file to out side print, some of the things I aded dose not print.
    Is there a way I can "close" the PDF when i finish the work- so' every thing will be printed for sure

    Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Or you can use your Apple ID to register with this site and go the Apple BugReporter. Supposedly you will get an answer if you submit feedback.
    Feedback via Apple Developer

  • Is there a way to restrict opening a PDF to one computer (PC or Mac)?

    Is there a way to restrict opening a PDF to one computer (PC or Mac)?
    I'm not sure how it would be done. Encoding of current IP number or logicboard serial number? Any ideas?
    The PDF publication is a trade-sensitive document that is expensive and the publishing company would like to restrict it's use to one computer. (Passwords can be passed around.)

    Do this:
    - iTunes: Back up your iTunes library by copying to an external hard drive
    - Then import into your new computer
    - Copy any synced photos to the new computer
    - Backup the ipd to the new computer
    iOS: How to back up
    - Restore the iPod from that backup. The link directly above says how.

  • Is there a way to add coverart to pdfs in ibooks ?

    My pdf's i put in to Ibooks show as blank. is there a way to add coverart to pdfs in ibooks?

    The image displayed for a PDF is the first page of the document. If you can edit the PDF and can insert a new title page then yes, it is possible, but it's not just a case of pasting ajpg into a property dialog as it would be with an mp3 track.
    tt2

  • Is there a way to tell if a pdf is a portfolio without the Portfolio SDK installed?

    I am developing a plugin that I do not want active when the document is a Portfolio. Is there a way to determine if a pdf is a Portfolio using only the Adobe Acrobat SDK?
    Thanks,

    The Portfolio SDK is for BUILDING Portfolios – it doesn’t tell you anything about whether one is (or is not) a Portfolio.
    I believe there is a PDDocIsCollection() API that will answer this question.

  • HT2506 Is there any way to view a signed PDF where the signed uses Windows/Adobe and I am viewing it preview?...I do not see the signature in  "signed" docs

    Is there any way to view a signed PDF where the signed uses Windows/Adobe and I am viewing it preview?...I do not see the signature in  "signed" docs

    I have already reinstalled both Adobe Reader and the full version of CS5 which includes Adobe Pro.  Neither of those steps worked. 
    Thanks,
    GiGi

  • How to consume sap xi pi web services or sap RFC with oracle 11g forms.

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

  • Is there a way to create date based timelines in iBook Author?

    Hi guys,
    Is there a way to create nice looking timelines in iBook author? I was going to utlize the interactive image functionality but it would be great if there were other options. Just something simple like dates along the bottom and then pictures above it with maybe some links in the body copy to actual chapters in the book?
    Here are some examples I found on the web but not sure if something similar can be done in iBooks (mine would be much simpler):
    http://timeline.verite.co/
    http://www.timetoast.com/
    http://www.tiki-toki.com/timeline/entry/55/The-Fight-for-Democracy-in-the-Middle -East/#vars!date=2010-12-18_08:00:20!
    Maybe we need to create a custom HTML widget? I really have no idea so any help is GREATLY appreciated.
    Thank you in advance!

    Hi KT, I saw that before but it's more about stiching an image and showing a change over time. I am just looking for date based timeline which shows events... a calendar basically in a timeilne format. Thank you though. I'll keep digging and post any solutions I find here.

  • Is there a way to copy all my PDfs in ibooks on my iPad?

    Because I'm still sorting out an issue with ibooks on the iMac renaming files so they do not match the names on my iPad, I am wondering if there is a way to copy all the pdfs I have in ibooks on my ipad (without doing each one, one at a time) so I can save a copy in Evernote or dropbox so when I sync and update shortly, I don't loose what I have?
    Thanks for any help you can offer.
    Michelle

    Thank you.Ok say for e.g.
    500 video files imported in fcpx
    800 clips extracted from these obviously on the timeline and joined/compounded according to their content in say 15 layers according to 15 instruments used ,so now just to see the entire usable footage ....
    now one 7 minute song sequence has to be made where bits would be simultaneously taken from these 15 layers as all instruments are playing simultaneously
    these shots are not more than 2 secs each according to the beat........
    when I try to work with these 15 layers as well as the Final primary layer that I'm making in the same timeline my fcpx becomes slow
    but when I drag individual layer to individual timelines it is fine so that is the only option
    but now for every 2 second bit I have to go back to the 15 layered timeline and find one single suitable shot
    So I was wondering is there a way to be able to see these layers and clips on the timeline in the browser in a systematic fashion like the way we get with keywords  ?
    and keywords can only be used in the imported clips already in the browser ,and not after we drag it on the timeline.....
    Till now I think exporting and importing back is the only option ...but is there another work around ?

  • Is there  a way to make Safari open PDF pages without opening Finder and select Reader from my applications folder?

    Simple, When I want to open a .pdf page from the web, I get Finder to open and I have to go to my applications folder to pick up Acrobat reader, Is there a way to have Safari doing it all by itself, Preview, or any other program?

    Right or control click a PDF file you have on the hard drive then click: Get Info
    In the Get Info panel click the pop up menu next to:  Open with
    Select the app you want to open PDF files from the pop up menu then click:  Change All

  • Is there a way to link to a pdf in a iframe and have the find box removed?

    Hello folks...
    We are working on a transcription process and would like to have the pdf in an iframe. The problem is that in order to make this as quick as possible for the transcriber, the iframe needs to be as small as possible. The find box comes up and takes up a lot of room. Is there a way to turn that off automatically in the iframe source? Kind of like "zoom=100" but perhaps find=off or something like that. The find is actually pointless anyway since there is no text on the pdfs.
    And what about the navigation panel on the left as well (not as big an issue)?
    Thanks in advance
    bardman

    nevermind...i found it myself. I found toolbar=0, and removed the entire tool bar. Thanks anyway....

  • Is there a way to create a new PDF from part of a form?

    I would like to create a PDF form that is really several forms. A master form and several forms like Form A, Form B and Form C. The idea is to be able to fill out the Master form and have it populate the like fields in the other forms. What I would like to accomplish is to have buttons/scripts for each Form A, Form B and Form C that would output each one to a new PDF. If I wrap each form in a subform, is there a way I can output that subform to a new PDF? Or is there another approach I can take?
    Maybe I could put all the forms in a package but somehow automatically populate the like fields in the other forms without exporting and importing data?
    Thanks in Advance,
    Ken

    You are using LiveCycle Designer?
    Acrobat Forms has has Personal Field Names, PFN, that can be used to import and export personal data since version 4. Samples are included on the distribution CD-Rom. forms\PFN

Maybe you are looking for