How to read pdf file using file adapter

Hi..
    How to read pdf file using file adapter?
regards
Arun

Hi
This may help you
/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
/people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
---Ram

Similar Messages

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • Reading .pdx file using File Adapter

    Hi,
    I have .pdx file in the input directory of my BPEL process .Also i have the DTD of the pdx file.Using file Adapter wizard i converted tht DTD to the XSD.Now when I run my BPEL process i am getting this error.
    Failed to translate file : {C:\OraBPELPM_1\integration\jdev\jdev\mywo
    rk\TestWs\readPDX\inputDr\agile_20070621_050222833.pdx}
    <2007-07-06 23:08:38,137> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Sending message to Adapter Framework for rejection to user-configured
    rejection handlers : {
    file=C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\readPDX\inputDr\agile_2
    0070621_050222833.pdx, Exception=ORABPEL-11207
    IO Failure in translator.
    IO failure because the translator failed to SAX Parse InputStream .
    Check the error stack and fix the cause of the error. Contact oracle support if
    error is not fixable.
    <2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: The reso
    urce adapter 'File Adapter' requested handling of a malformed inbound message. H
    owever, the following bpel.xml activation property has not been defined: 'reject
    edMessageHandlers'. Please define it and redeploy the business process. Will use
    the default Rejection Directory file://C:\OraBPELPM_1\integration\orabpel\domai
    ns\default\archive\jca\readPDX\rejectedMessages for now.
    <2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: Sending
    invalid inbound message to Exception Handler:
    <2007-07-06 23:08:38,138> <INFO> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> Handing rejected message to DEFAULT rejection handler: file://C:\
    OraBPELPM_1\integration\orabpel\domains\default\archive\jca\readPDX\rejectedMess
    ages since none of the configured rejection handlers [] succeeded.
    <2007-07-06 23:08:38,142> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Deleting file : C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\re
    adPDX\inputDr\agile_20070621_050222833.pdx after processing.
    Can somebody help me to find how to rectify this?
    Thanks in Advance

    Hi Anirudh,
    Please have a look at the answers for ur questions:
    (1)Is it a .pdf file?
    its a .pdx file.This file is generated from Agile PLM side.It consists of DTD information and the actual xml.If i rename it to .xml then its working fine.But i would be getting this file in .pdx format
    (2)Its size?
    It can be 73 MB
    (3)Using a file adapter to pick the file?
    Yes
    (4)Picking from the local box or a remote one?
    For the time being i am picking it up from the local box.But going fwd it shld be from remote
    (5)Any firewall being used?
    No
    (6)Is the schema correct and confirming with right namespaces?
    Yes
    (7)BPEL version?
    10.1.2
    Thanks
    Cheers
    Anirudh Pucha

  • How To Store pdf or doc file in Oracle Database using Java Jdbc?

    can any one help me out How To Store pdf or doc file in Oracle Database using Java Jdbc in JSP/Serlet? i tried like anything. using blob also i tried. but i am able 2 store images in DB not files. please if u know or else if u have some code like this plz send that to me, and help me out plz. i need that urgent.

    Hi.. i am not getting error, But i am not getting the original contents from my file. i am getting all ASCII vales, instead of my original data. here i am including my code.
    for Adding PDF in DB i used image.jsp
    Database table structure (table name. pictures )
    Name Null? Type
    ID NOT NULL NUMBER(11)
    IMAGE BLOB
    <%@ page language="java" import="java.util.*,java.sql.*,java.io.*" pageEncoding="ISO-8859-1"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%
    try{
         Class.forName("oracle.jdbc.driver.OracleDriver");
         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
         PreparedStatement ps,pstmt,psmnt;
         ps = con.prepareStatement("INSERT INTO pictures VALUES(?,?)");
    File file =
    new File("D:/info.pdf");
    FileInputStream fs = new FileInputStream(file);
    ps.setInt(1,4);
    ps.setBinaryStream(2,fs,fs.available());
    int i = ps.executeUpdate();
    if(i!=0){
    out.println("<h2>PDF inserted successfully");
    else{
    out.println("<h2>Problem in image insertion");
    catch(Exception e){
    out.println("<h2>Failed Due To "+e);
    %>
    O/P: PDF inserted successfully
    i tried to display that pdf using servlet. i am giving the code below.
    import java.io.IOException;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class DispPDF extends HttpServlet {
         * The doGet method of the servlet. <br>
         * This method is called when a form has its tag value method equals to get.
         * @param request the request send by the client to the server
         * @param response the response send by the server to the client
         * @throws ServletException if an error occurred
         * @throws IOException if an error occurred
         public void service(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              //response.setContentType("text/html"); i commented. coz we cant use response two times.
              //PrintWriter out = response.getWriter();
              try{
                   InputStream sPdf;
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
                        PreparedStatement ps,pstmt,psmnt;
                   psmnt = con.prepareStatement("SELECT image FROM pictures WHERE id = ?");
                        psmnt.setString(1, "4"); // here integer number '4' is image id from the table.
                   ResultSet rs = psmnt.executeQuery();
                        if(rs.next()) {
                   byte[] bytearray = new byte[1048576];
                        //out.println(bytearray);
                        int size=0;
                        sPdf = rs.getBinaryStream(1);
                        response.reset();
                        response.setContentType("application/pdf");
                        while((size=sPdf.read(bytearray))!= -1 ){
                        //out.println(size);
                        response.getOutputStream().write(bytearray,0,size);
                   catch(Exception e){
                   System.out.println("Failed Due To "+e);
                        //out.println("<h2>Failed Due To "+e);
              //out.close();
    OP
    PDF-1.4 %âãÏÓ 2 0 obj <>stream xœ+är á26S°00SIá2PÐ5´1ôÝ BÒ¸4Ü2‹ŠKüsSŠSŠS4C²€ê P”kø$V㙂GÒU×713CkW )(Ü endstream endobj 4 0 obj <>>>/MediaBox[0 0 595 842]>> endobj 1 0 obj <> endobj 3 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj xref 0 7 0000000000 65535 f 0000000325 00000 n 0000000015 00000 n 0000000413 00000 n 0000000168 00000 n 0000000464 00000 n 0000000509 00000 n trailer <<01b2fa8b70ac262bfa939cc786f8770c>]/Root 5 0 R/Size 7/Info 6 0 R>> startxref 641 %%EOF
    plz help me out.

  • Creating PDF files using file adapter

    Hi,
    Is it possible to create a pdf file using, File/FTP adapter? If yes can someone please suggest how to do it.
    Thanks,
    Phani

    Hi Phani,
    I would say pdf files are binary files with a specialized format.
    You can move pdf files through BPEL or ESB (i.e. file/ftp -> file/ftp), or from file to database BLOB and database to file, by importing the schema as opaque.
    However I doubt that file adapter can create PDF files from a plain-text xml file, i.e. as PDFCreator would.
    In a sense a pdf file is much like a jpg, mp3, or zip file, it can be passed through bpel but not created.
    In other words if you have a base64Binary element in xml, that you know is the complete bytes to a pdf, jpg, or other file, you can write it out as a file using the File adapter.
    Thanks
    Steve

  • Reading Multiple lines in a file Using File Adapter

    Hi All,
    Iam new to this technology.How to read multiple lines in a file using file adapter.Brief me with the methodology.

    I didn't look at anything else but if you want to write more than one line ever to your file you should change this
    out = new FileOutputStream("Calculation.log");to this...
    out = new FileOutputStream("Calculation.log",true);A quick look at the API reveals the follow constructor FileOutputStream(File file, boolean append) append means should I add on the end of the file or over-write what is there.
    By default you over-write. So in our case we say true instead which says add on to what is there.
    At the end of that little snippet you shoudl be closing that stream as well.
    So where you have
    p.close();You should have
    p.close();
    out.close();

  • How to read PDF files on your iphone in book format

    Hey everyone, I just posted a tutorial on how to read pdf files like ebooks on Stanza. Let me know if you have any questions
    http://budurl.com/u4tz
    That used to drive me crazy until I figured it out. Enjoy

    an easier way would be to wait until iOS 4 and then download the free iBooks app... you can import via the file sharing feature in iTunes (same that the iPad uses), or open the file from an email using the "open in" feature currently found on the iPad...
    http://www.apple.com/iphone/features/mail.html
    ^ scroll down to the iphone with the subheading underneath saying "See what’s attached."

  • Is it possible to read the file using File Adapter which is in client machi

    Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?

    You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
    FTP adapter will help you to communicate with different machine which is in different network.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • Reading encrypted file using file adapter...

    Is it possible to read and write encrypted file using file adapter or if the file adapter is capable to encryption and decryption?

    what is the soa version you are currently running?

  • Delete file using file adapter

    Hi,
    How can we delete a file using file adapter, I am using SOA 11g R3.
    Thanks
    Yatan

    thanks for reply,
    What I am trying to do is to only delete the file, is there some way where we can simply do a "delete", instead of first reading a file and then deleting it.
    Thanks
    Yatan

  • How to read a whole text file into a pl/sql variable?

    Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?

    how to read a whole text file into a pl/sql variable?
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....

  • How to read list of all files in folder on application server?

    How to read list of all files in folder on application server?

    Hi,
    First get the files in application server using the following function module.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
          EXPORTING
            name     = loc_fdir
          TABLES
            file_tbl = int_filedir.
    Here loc_fdir contains the application server path.
    int_filedir contains all the file names in that particular path.
    Now loop at int_filedir.
    OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
    MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
    endif.
    close datset int_filedir-name.
    endloop.

  • How to read text in .kep files

    hey friends,
    how to read text in .kep files
    please help me .
    with regards,
    s.jagadeesh babu

    Hi,
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/8f/42a293e35011d29b340000e8a4b41d/content.htm
    .kep files are SapShow Training Files. They can be played with sapshow.exe in Knowledge Warehouse.
    SAP Show is KW Viewer Application. You can use it to see “Kep” files. It can be run in windows without the SAP environment. To run SAP Show (4.6D version) you just need 3 files. First is SAP show executable file, another two are “Sapstg.dll” and “ZLib.dll”. You can easily find these files on internet.
    Regards,
    Niraj

  • "encoding = UTF-8" missing while writing XML file using file Adapter

    Hi,
    We are facing an unique problem writing xml file using file adapter. The file is coming without the encoding part in the header of xml. An excerpt of the file that is getting generated:
    <?xml version="1.0" ?>
    <customerSet>
    <user>
    <externalID>51017</externalID>
    <userInfo>
    <employeeID>51017</employeeID>
    <employeeType>Contractor</employeeType>
    <userName/>
    <firstName>Gail</firstName>
    <lastName>Mikasa</lastName>
    <email>[email protected]</email>
    <costCenter>8506</costCenter>
    <departmentCode/>
    <departmentName>1200 Corp IT Exec 8506</departmentName>
    <businessUnit>1200</businessUnit>
    <jobTitle>HR Analyst 4</jobTitle>
    <managerID>49541</managerID>
    <division>290</division>
    <companyName>HQ-Milpitas, US</companyName>
    <workphone>
    <number/>
    </workphone>
    <mobilePhone>
    <number/>
    </customerSet>
    </user>
    So if you see the header the "encoding=UTF-8" is missing after "version-1.0".
    Do we need to configure any properties in File Adapter?? Or is it the standard way of rendering by the adapter.
    Please advice.
    Thanks in advance!!!

    System.out.println(nodeList.item(0).getFirstChild().getNodeValue());

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

Maybe you are looking for