Presenting binary file content as HTML inside a Portlet

Hello folks,
Do any of you has a piece of code that does that? Grabbing a word doc, pdf, ppt and such and convert it to HTML in order to present it inside a portlet? The easiest way would possibly be to use Dynamic Converter API, right? Is there any licensing problems on using Dynamic Converter on the limited UCM that comes with WebCenter Suite for that?
Thanks In Advance,
Pedro Boechat
Edited by: pboechat on 28/08/2009 10:01

Carmen,
There patch available for this bug in metalink ( http://metalink.oracle.com ). You should find the patch in the recent portal patch list. The bug no for this patch is 1574770.

Similar Messages

  • How can I convert the binary file content to XML message

    Dear friends,
    I poll the binary file from a ftp server but the payload only includes the binary content, no XML structure in the payload, I hope to convert the binary content to a element node within the XML structure, how can I do that? via content conversion?
    Thanks and regards,
    Bean

    Read the binary file stream using java I/O standard functions and convert the read stream to Base64 format. Now map this content to one of the field in target XML structure.
    You need a java mapping for this.
    what is your target system?
    Thanks,
    Gujjeti.
    Hi Gujjeti,
    Thanks a lot for your kind help, my target system is R/3.
    Can I achieve that with a UDF or a simple way?
    Regards,
    Bean

  • Binary file content check fails!

    Hello,
    I am finding it hard to capture the content of a binary file.
    Here is my code:
      if(!(null == myInstance.getBin_File().toString()) 
                              && !(myInstance.getBin_File().toString().equals(""))){ 
         //    Do something 
        }else{ 
        // Do something else. 
        }  When the binary file is blank, control still goes into "if" instead of "else"!!!!
    How should I change the "if" condition so that, whenever the binary file is blank, I wanna execute "else"
    Thanks
    Srinivas

    The purpose of toString() is (supposed to be) to return a string identification of the object. That doesn't necessarily mean the contents of the object; in fact, it normally wouldn't. For example, suppose an object holds a 100,000-word dictionary. It's toString() response could appropriately be "[100,000-word widget dictionary]", and not every word in the dictionary.
    So, if you're checking to see if the "xstring", whatever that is, is empty, then using toString() is almost certainly not the way to go, and only would be if "xstring" is really poorly designed and you shouldn't use it anyway.

  • BAPI_DOCUMENT_CHECKOUT... get binary file content???

    Hello!
    When i want to check out documents, the Function BAPI_DOCUMENT_CHECKOUT2 only checks the documents out in the unix file system of the server the dms is running. Is there another possibility to get the file content by a JAVA Application to story the file in the local filesystem?

    Hi Marco,
    I tried with the same thing as you mentioned, but its not working. see my code,
    DATA : T_ITAB TYPE SDOKCNTASCS.
    DATA : T_FILETYPE TYPE SDOKFILACIS.
    DATA: T_SKWF_IO LIKE SKWF_IO.
    T_SKWF_IO-OBJID = '44CEB4D549C229FBE100000097A3145C'.
    T_SKWF_IO-CLASS = 'CRM_P_ORD'.
    CALL METHOD CL_CRM_DOCUMENTS=>GET_WITH_TABLE
      EXPORTING
        PHIO                = T_SKWF_IO
        TEXT_AS_STREAM      = 'X'
      IMPORTING
        FILE_ACCESS_INFO    = T_FILETYPE
        file_content_ascii  = t_itab .
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    The table t_itab remains blank after executing the fun. module.
    Regards,
    Kumar.

  • Java mapping - for reading the binary file contents and changing filename

    Hi,
    I have already gone through the various bolgs and threads and have not been able to find a solution to my problem.
    One blog did give some idea but did not help- "JAAPPING", an alternate way of reading a CSV file
    I am not very good in java but have been trying some out recently to fulfill the interface requirements.
    I would really appreciate if you could help am I am giving below the detailed scenario below.
    Part 1- working fine - The incoming file looks like:
    :20:STMEMU096868DUBE
    :25:001180256210
    :28C:00371/00001
    :60F:C090617AED742136,92
    :61:0906300630CD34,27FINTCREDIT INTEREST
    26MAY2009 TO 25JUN2009
    :62F:C090630AED742171,19
    :64:C090630AED742171,19
    The file name as received is:TCDE.BLQSAM.SAEA2682.C0084025.A9G24T58.20090724195908
    This file without any conversion is placed on XI server dircetory folder.
    Part 2 - need to develop
    The file should now be renamed according to the incoming value in 2nd line - specifically the 12 digit value 001180256210 and placed on the R/3 dircetory folder.
    The new file name in the above example should be:
    AC_NO_001180256210_datetime
    The module for the above was created and the last time I checked it was working.
    However, when I wanted to do final testing in Dev and move the changes further, the module has seemed to have stopped working so I need an alternate solution fast.
    I was thinking of doing the Java mapping as I will be more in control as to what is going on thereby reducing the dependency.
    There is no need to create any target xml structure as the file as it is needs to be placed in the target folder with a new name.
    I can get the file name in UDF which I have already created but i am not usre if it working.
    Can you please help?
    Any help will be greatly appreciated.
    Regards,
    Archana
    +44-7867636863

    Hi Stephen
    The xml must be getting added in the below part of the code. It is coming from arg[0]
    You can put a check and get it removed.
    while ((len = arg0.read(buffer)) != -1) {
      arg1.write(buffer, 0, len);
    Regards
    Osman

  • Content Area link inside a Portlet

    I built a portal page titled Finance. I also created a content area titled Corporate
    Finance and published it as a portlet. When I add the Corporate Finance portlet to
    the page it's visible, however the portlet header link goes to a blank page. I was
    hoping this link would take me directly to the Corporate Finance content area.
    Thanks - Carmen

    Carmen,
    There patch available for this bug in metalink ( http://metalink.oracle.com ). You should find the patch in the recent portal patch list. The bug no for this patch is 1574770.

  • Binary file to variable

    Hi,
    I want to store a binary file content (it is a MS WORD file) onto a java variable (type String ?) to use this variable to create a new file identical by writing this variable value into a new file.
    I tried it as follow :
    1- I read a file using a fileInputString and method read
    2- I got a byte array, converted it in a String and using URLEncoder produced another String
    3- With this encoded String I created a java code that I displayed on System.out, It looks like :
    String content=""
    +"%D0%CF%11%E0%A1%B1%1A%E1%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%3E%00%03%00%FE%FF%09%00%06%00%00%00%00%00%00%00%00%00%00%00%01%00%00%00%21%00"
    +"%00%00%00%00%00%00%00%10%00%00%23%00%00%00%01%00%00%00%FE%FF%FF%FF%00%00%00%00+%00%00%00%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%F"
    +"%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00";Now I have my binary file in a string and using URLDecoder and writing this String into a new file I must obtain a clone of the original file, but when I compare the original file with this file with command cmp I always obtain severals differences (about 10 or 12 bytes that are differents in a total of 180000) I don't know why theses two files are differents, is there a way to obtain a perfect clone ?

    Hi,
    I want to store a binary file content (it is a MS
    WORD file) onto a java variable (type String ?) to
    use this variable to create a new file identical by
    writing this variable value into a new file.If you want to copy a file, never ever use Strings, use bytes!
    Have a look at the IO tutorial how to read a file as a byte stream:
    http://java.sun.com/docs/books/tutorial/essential/io/

  • View OID users inside a portlet

    Hello to all.
    Is there a way I can call a user group located inside OID and present its users and their data inside a portlet just like omniportlet does with database tables??

    Here's a start:
    DECLARE
    list PORTAL.WWSEC_OID.VC_ARR;
    BEGIN
    list :=
    wwsec_oid.get_group_attr_vals(
    p_groupname => portalGroupName,
    p_attr => attribute,
    p_base => wwsec_oid.get_group_search_base);
    The hard part is cycling thru the members, determining which as are users and which are groups. If group, recurse the find that group's members.
    Other options include determining if the user is an owner of the group.
    I am not sure if wwsec_oid is officially published, so beware...
    I hope this generates some ideas for you...

  • Spotlight doesn't find search results in .HTML file contents

    When I use Spotlight to search, it doesn't find any .HTML file contents. If I rename an .HTML file to use a .TXT extension, the contents are found. Is there a way to enable Spotlight to find contents in .HTML files?

    I remembered that used to be problem, so I just checked on my local version of my site, and Spotlight found the files on the basis of content without a problem. So I took a look at my installed mdimporters in /Library/Spotlight, to see what may have led to this happy turn of events. I thought perhaps the iWeb mdimporter might be doing it, but was unable to find a reference to HTML in its type declarations. I then took a look at in /System/Library/Spotlight and discovered that RichText.mdimporter has a declaration for public.html as a content type. You should have that mdimporter installed by default, but you might take a look to make sure it is there.
    If the mdimporter is there, but the html files aren't being indexed, it could be that whatever program you are using to create them isn't giving them the appropriate content type. I code by hand using TextEdit, which saves them with the following metadata entry:
    kMDItemContentType = "public.html"
    kMDItemContentTypeTree = (
    "public.html",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
    They are then evidently indexed without problem by the RichText.mdimporter. You might try opening one of your html docs in TextEdit (as plain text), resave, and see if Spotlight then picks up the content of the file. Of course, the content means the words that people see when they look at the page in a browser. If the content you are talking about is stuff that is inside an html tag, you are out of luck. I know of NO way to get Spotlight to find that. EasyFind will though, but it is a brute force search and will take awhile, even when restricted to a particular folder.
    Francine
    Francine
    Schwieder

  • How to send the entire binary file as Content in mail adapter

    Hi,
    I have the below scenario:
    A binary file is there on the XI server and this is more than 1 lines.
    This file needs to be sent across to certain email addresses via the XI interface.
    I have made the design and config and now get the the mail but so far not been able to get the file contents.
    The requiremnet is to send the entire file contents in the mail so that they appear in the body of the received mail.
    How do i do it?
    Can you please advice.
    Regards,
    Archana

    Hi,
    I am giving below the incoming mesasge details and the outgoing Mail message details.
    Sender File Adapter:
    Mesasge Content/Payload:
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_Ack_Mail_In xmlns:ns="Urn:Serco-com:interface:Banking:HSBC:FileTransfer">
    - <Content>
    - <Mail>
      <Details>UNBUNOA:3HEXAGON-ABCABC10268002081201:2152+692125127893</Details>
      </Mail>
    - <Mail>
      <Details>UNH1CONTRL:2:2:UN:APACS</Details>
      </Mail>
    - <Mail>
      <Details>UCI1000246720ABC10268002HEXAGON-ABC4+C09</Details>
      </Mail>
    - <Mail>
      <Details>UNT31</Details>
      </Mail>
    - <Mail>
      <Details>UNZ1692125127893</Details>
      </Mail>
      </Content>
      </ns:MT_Ack_Mail_In>
    Receiver Mail Adapter:
    Message Content/Payload:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>ME-Acknowledgement</Subject>
      <From>email of from</From>
      <To>my email</To>
      </ns1:Mail>
    I need to map the contents of the incoming payload Contents/Mail/Details (all the 5 instance) to outgoing Missing Content (after To field).
    If it can be in Mail body, then it would be best else please suggest what other option can I use?
    Also, If i want the file name to be in the subject of the mail, is that possible to be picked up in the configuration?
    Please help.
    Regards,
    Archana

  • How to add do not read file content option inside File Adapter (Synch Read)

    Hi,
    Is there any way, that I can skip reading the file content inside file adapter with operation as Synchronous Read ( I just want to read the file name and directory and if the file name matches with the input variables then I have to delete the files, for this i am using FA with synch read operation, everything is fine like deletion, but it is reading the file content and storing it in DB, i dont want this) .

    This will solve your problem.
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#CHDHIEBI
    HTH.
    Puneet.

  • Get modified date inside the File content of CM

    hi,
    In CM I have uploaded a file and have set the permission to modify the file to a group of users.Now when each and every time any user modifies the file content I want to have the modified date inside the updated file.
    How can i achieve this?.....
    Please help.....
    Thanks in advance,
    shami.

    Hi All,
    @Parvathy:There is no such property on your files, you should create one in your filter and depending on this custom property your filter should decide if a document update is required or not.
    As already said follow this:
    You have a content filter which can do updates to these files:
    -- Content filter sets a custom property new_modifieddate on each resource after updating resource. (new_modifieddate==cm_modified of resource)
    -- It compares new_modifieddate with cm_modified of resource to determine if it should update the resource with cm_modified.
    @Shami: Use some logging in your Filter code, so that you can make sure your code is being executed. One more way is to dubug you code by setting break points in NWDS (Ofcourse the server should be in debug mode for this option).
    logging :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a0/58db515b95b64181ef0552dc1f5c50/frameset.htm
    debug:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5d/31e540b1278631e10000000a1550b0/frameset.htm
    Greetings,
    Praveen Gudapati

  • Multipart/form-data using HTTPService, sending a binary file and some text in the same request.

    Hi There,
             I am new to FLEX and also new to writing a client for a web service.
    My question is more about flex (Flash builder 4.5) APIs, what APIs to use.
    I want to access a web service, that's published here.
    https://build.phonegap.com/docs/write_api
    here is the description of webservice
    ===========
    1) I have to do a post on POST https://build.phonegap.com/api/v1/apps
    2) content type has to be "multipart/form-data"
    3) JSON bodies of requests are expected to have the name 'data'
      data will be someting like this
    'data={"title":"API V1 App","package":"com.alunny.apiv1","version":"0.1.0","create_method":"file"}'
    4) include a zip file in the multipart body of your post, with the parameter name 'file'.
    ===========
    I want to make a 'multipart/form-data' Post and send
    one string and one zip file.
    My first question to self was If i send both string + binary data in the body ...
    how will server understand where string end and where zip file starts?
    Then read on W3.org( http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 )
    How is text + binary data can be sent through "multipart/form-data" post requst.
    there has to be some boundries.
    After this I read and example in flex and  tried following it.
    http://codeio.wordpress.com/2010/04/03/5-minutes-on-adobe-flex-mimic-file-upload-for-in-me mory-contents/
    but it doesn't seems to be working for me.
                        public function createNewApp(cb:Function , appFile : File):void
                                  var service:HTTPService = new HTTPService();
                                  service.url = ROOT+"apps";
                                  service.showBusyCursor = true;
                                  service.addEventListener(ResultEvent.RESULT, function(e:ResultEvent):void {
                                            //translate JSON
                                            trace(e.result);
                                            var result:String = e.result.toString();
                                            var data:Object = JSON.parse(result);
                                            cb(data.link);
                                  service.addEventListener(FaultEvent.FAULT, defaultFaultHandler); //todo : allow user to add his own as well
                                  authAndUploadNewApp(service,appFile);
                        private function authAndUploadNewApp(service:HTTPService,appFile : File):void {
                                  var encoder:Base64Encoder = new Base64Encoder();
                                  encoder.encode(username + ":"+password);
                                  service.headers = {Accept:"application/json", Authorization:"Basic " + encoder.toString()};
                                  service.method ="POST";
                                  var boundary:String = UIDUtil.createUID();
                                  service.contentType = "multipart/form-data; boundary=—————————" + boundary;
                                  var stream:FileStream = new FileStream();
                                  stream.open(appFile, FileMode.READ);
                                  var binaryData:ByteArray = new ByteArray();
                                  var fileData : String = new String();
                                  stream.readBytes(binaryData);
                                  stream.close();
                                  fileData = binaryData.readUTFBytes(binaryData.bytesAvailable); // I think this is where I have problem.... how do
                           //how do i converrt this bytearray/stream of data to string and send it in my post request's body - i guess if this step work rest should work..  
                                  var params: String = new String();
                                  var content:String = "—————————" + boundary + "nr";
                                  content += 'Content-Disposition: form-data; name="data";' + '{"title":"ELS test app 2","package":"com.elsapp.captivate","version":"12.3.09","create_method":"file"}' + "nr";
                                  content += "—————————" + boundary + "nr";
                                  content += 'Content-Disposition: form-data; name="file";' + fileData  + "nr";
                                  content += "—————————–" + boundary + "–nr";
                                  service.request = content;
                                  service.send();

    In the past I have used URLVariables with URLRequest and URLLoader to achieve this kind of requirement.
    Check out http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_3 .html which should be useful. My preference has always been to use this style instead of HTTPService objects, giving you a little more control which is what you need here.
    Let me know if you need any more assistance.

  • Can we compare file contents of two files in the Application server?

    Hi,
    A file is generated daily to the application server. and i need to compare the generated file to the file generated on the previous day and prepare a report.
    Can we compare file contents of two generated files present in the Application server?
    If there is any alternative, please suggest.
    regards
    cs

    yes we can compare if the app server is Unix.
    cmp compare two binary files and report if different
    cmp is silent if the files are the
         same;
    if they differ, the byte and line number at which the first
    difference occurred is reported.
    REPORT ZUNIX line-size 400
                    no standard page heading.
    data: unixcom like   rlgrap-filename.  
    unixcom = 'cmp file1 file2'.
    data: begin of tabl occurs 500,
            line(400),
          end of tabl.
    data: lines type i.
    start-of-selection.
      refresh tabl.
      call 'SYSTEM' id 'COMMAND' field unixcom
                    id 'TAB'     field tabl[].
    "if the files are different then you will some content in tabl
    Regards
    Viajy  Babu Dudla

  • Multipart request is garbled in case of binary file (excel)

    Hi,
    I am having problem in uploading file in our portal application.
    Setup:
    We have a 10g portal server (10.1.0.4). Authentication is done using coreid.
    We have a http apache server hosted on a different machine with webgate plugin protecting all the request. Coreid is hosted on a different machine. So we have three machines, one for http server, one for portal server and one for coreid. The request is SSL request.
    When I submit a multipart request, I am not able to upload the file. When I printed the whole request in a file, I could see header of file item (which contains filename, content type etc.) is getting stripped off. Not only this, any html element above "file" element in the form is also stripped off. This happens only in case of binary file. Uploading text files works fine.
    Above case is when I submit the request to http apache server.
    Now if I submit the multipart request directly to portal server, file upload works fine, both for text and binary (excel).
    What is different in these two cases:
    In case of first case request is going thru http server and webgate. SSL is configured in http server, so request is SSL request.
    In second case, submitting directly to portal server, the request is not over SSL.
    Please help me solving this problem.
    Help is greatly appreciated.
    Regards,
    Rana Biswas

    Would like to add another thing, the problem is not limited to portal application. I created two simple jsps one form and another to receive the multipart request and deployed it in a separate application, which is NOT a portal application.
    Same problem is there.
    Regards,
    Rana Biswas

Maybe you are looking for

  • Haw to execute and create a report in pdf format

    i have installed developer 10g and application forms & report 10g. I have used until noe application 1.0.2.2 and ina form to execute a report i have this istruction run_product(REPORTS,      var_report,           SYNCHRONOUS,      RUNTIME,      FILES

  • MS Access woes

    Hi all, I am quite frustrated with running sql queries on an MS Access 2002 database. First a simple query such as 'Select DISTINCT VariableName from DISTRIBUTIONDATA' returns all the rows in my database. I also tried 'Select DISTINCTROW VariableName

  • Some songs from my iTunes library do not show in my Finder music folder

    Some songs from my iTunes library do not show in my Finder music folder. For example one of the three CD's form a triple album do not show in Finder. And therefore they do not get saved when I back up my Mac either. Any ideas?

  • Cell definition choice in Query Designer is inactive

    In the Query Designer the choice "Define cells" is inactive, or grayed out. Why is this? Is there a global setting or does it have something to do with the query itself?

  • Deployment of Flash in a closed network

    Hello, my company wants to develop a flash plugin based video player that will run inside a webpage. Each of our customers run a website (that we create) instance in their own network. (i.e. http://customer_machine_hostname\my_company_website) There