Need to create a function to receive binary files from Java WebDynpro

Hey,
I need to recieve files from java Webdynpro and save them as a file on the backend
system. After that, the file will be loaded to the documentum.
In a function module, I only can get the files as a String. Therefore (I think), I need the
binary file as base64 encoded. Otherwise I can´t get it as a string.
Now I need to decode it in the backend, but how? I know, there are HTTP-classes
in newer system, but not in the 4.6C System, I have here.
Any idea, how I can recieve the files in the function module and transfer it as binary
file to the backend system?
If I load a file from the gui with gui_upload, I get the binary file as an internal table
and can transfer it to the backend filesystem now. Maybe I can get the binary file
in this way in the function?
Thank You for Your help!
Arne

http://jakarta.apache.org/commons/net/

Similar Messages

  • Calling a function in an EXE file from Java Program

    Hi Im having a function which is written in c program.i need to call that function from my java program, if i create a shared library (DLL) for my C code then it works but my requirement is i dont want to create that DLL , like in it would be an executable and my java code should access that function in that C program

    I understand the usage od a DLL but the thing is if i convert the exe to a DLL
    the server doesnt start at all so what i need is that i dont want to change
    that .EXE into a .DLL,let it be an executable. that executable is in running mode
    and through my java program i need to call a function in that EXE file.
    Is ther any way to do it?Nope, but you have another problem: why can't you separate your server program
    into a .dll part and a startup part? Both, when properly linked against each other
    should give you an executable file.
    kind regards,
    Jos

  • DE PDP-1 binary file from Java

    Can someone here help me, please!?
    Anyone know how to convert a Java class file into a binary file that will run natively on my Digital PDP-1 computer? I just spent over $120,000 for it! Thanks.
    This resurrected thread was first posted November 25, 1960 at 8:25AM
    -------------------------------------------------------------------------

    This resurrected thread was first posted November 25,
    1960 at 8:25AMIn what time zone?

  • Need Help Creating A Script For Labeling Finder Files from Indesign

    Trying to figure out a way to have a script run in InDesign CS4 that will label a text file RED after it's been imported into InDesign.
    We import numerous text files into an InDesign template. Since there are several text files in the same folder, we need to somehow "mark off" that we've imported that file and move to the next one to import. I have created an Automator "service" with a keyboard shortcut to label the file Red in the finder but it would be great if we could have this happen automatically after we import into InDesign.
    If we import the wrong text file by accident and it gets missed in proofing, it costs us a lot of money with the printer.
    Thanks for any ideas.
    Jim

    You know, these guys are absolutely right in their assessment that this is a good place for event listeners. You would need three scripts though.
    Something like...
    Label Placed Files Red.scpt
    --Put this in a folder called IDScripts in your Documents folder
    main(evt)
    on main(myEvent)
    tell application "Adobe InDesign CS4"
    set placedFilePath to full name of myEvent
    set placedFilePath to placedFilePath as alias
    end tell
    tell application "Finder"
    --This turns the file color red
    set label index of placedFilePath to 2
    end tell
    end main
    And these two are in your InDesign scripts folder...
    Start Placed File Finder Labelling.scpt
    --Installs the afterImport event listener for the Label Placed Files Red script.
    tell application "Adobe InDesign CS4"
    set myHandler to path to documents folder
    set myScriptName to "Label Placed Files Red.scpt"
    set myHandler to "" & myHandler & "IDScripts:" & myScriptName
    try
    set myHandler to myHandler as alias
    make event listener with properties {event type:"afterImport", handler:myHandler, captures:true}
    display dialog "Placed File Labelling: ON" buttons "OK" default button 1
    on error
    display dialog "ERROR: Couldn't start handler!" & return & return & "Make sure the \"" & myScriptName & "\" script in a folder called \"IDScripts\" inside your Documents folder and try again" buttons "OK" default button 1
    end try
    end tell
    Stop Placed File Finder Labelling.scpt
    --Removes the afterImport event listener for the Label Placed Files Red script.
    tell application "Adobe InDesign CS4"
    set myHandler to path to documents folder
    set myScriptName to "Label Placed Files Red.scpt"
    set myHandler to "" & myHandler & "IDScripts:" & myScriptName
    set myHandler to myHandler as alias
    set myResult to remove event listener event type "afterImport" handler myHandler with captures
    if (myResult is false) then
    display dialog "ERROR: Couldn't remove handler! Are you sure it is active?" & return & return & "If so, please quit and relaunch InDesign to get rid of it." buttons "OK" default button 1
    else
    display dialog "Placed File Labelling: OFF" buttons "OK" default button 1
    end if
    end tell

  • Calling C Functions in existing DLL's from Java

    Hi Guys ,
    The tutorial in this site talks about creating ur own DLL's and then calling them from Java . I need to call C functions in existing DLL's from Java . How do I go about doing this ? . Any help on this would be much appreciated.
    regards
    murali

    What you are interested in can be done with what's called "shared stubs", from the JNI book (http://java.sun.com/products/jdk/faq/jnifaq.html), although you don't need the book to do it (I didn't).
    The example code will call functions with any number and kind of parameters, but doing that requires some assembly language. They supply working examples for Win32 (Intel architecture) and Solaris (Sparc).
    If you can limit yourself to functions to a single function signature (number and types of parameters), or at least a small set that you know you'll call at compile time, you can modify the example so that the assembly language part isn't needed, just straight C code.
    Then you'll have one C library that you compile and a set of Java classes and you can load arbitrary functions out of arbitrary dynamic libraries. In my case you don't even have to know what the libraries and functions are ahead of time, the user can set that up in a config file.
    You mentioned doing this with Delphi. One thing to watch out for is C versus Pascal (Win32) function calling convention. A good rule of thumb; if it crashes hard, you probably picked the wrong one, try the other. :-)

  • What is the need of creating partner functions for sales document type.

    Hi SAP (SD-GURUS),
    Actually we create partner functions  before creating customer ex: sold to party, ship to party, bill to party, and payer.
    These partner functions are going to be copied into sales order while processing sales order.
    Again what is the need of creating partner functions for sales document type.
    Thanks&Regards
    sreenivas peruru

    There are some Partners you could enter at Sales ORder Level. E.g. Sales Person, Employee Responsible, Forwarding Agent, Broker, etc.
    Thus these partner Determination need to be carried out at Sales Order Level & not at Customer Master level.
    So we have to configure partner Determination for various levels e.g. Customer Master, Sales Order, Delivery level etc...
    Hope this helps...
    THanks,
    Jignesh Mehta

  • Creating Binary Files in Java

    Does anyone know how to create a binary file in Java.
    in C i can do an fopen("filename" , "rb") i cannot find a equivalent java binary file stream.
    Thanks

    The following code is part of my FileIO applet. This method allows the user to download any file from my server and save it on his/her disk, the download is accomplished by doing a byte-read and byte-write (byte mover as I'd call it). This example illustrates how you can read and write binary files in Java:
       public void aok_DownLoad(String inputFile, String outputFile) {
          try {
             URL url=new URL(inputFile);
             InputStream in;
             in=url.openStream();
             BufferedInputStream reader=new BufferedInputStream(in,4096);
             FileOutputStream out=new FileOutputStream(outputFile);
             BufferedOutputStream writer=new BufferedOutputStream(out,4096);
             byte[] buf=new byte[4096];
             int byteRead;
             while ((byteRead=reader.read(buf,0,4096))>=0) {writer.write(buf,0,byteRead);}
             reader.close();
             writer.flush();
             writer.close();
          catch (Throwable exception) {
             exception.printStackTrace();
       }V.V.
    PS: in this posting the code is posted in a different manner so that the > sign is not converted to & gt ; by the forum's software

  • How to create search function (af:query) using method in java

    hi All..:)
    i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
    anyone help me....
    thx
    agungdmt

    Hi,
    download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
    Frank

  • I need to create a second back-up of iPhoto from Time Machine to a separate external drive.  The old iPhoto in TM will not open.  Please help!

    I need to create a second back-up of iPhoto from Time Machine to a separate external drive.  The old iPhoto in TM will not open.  Please help!  And thank you!

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • How to receive flat file from XI to R/3 system?

    Hello guys,
    The XI will receive XML files from other source. I have to pick that XML file  and convert it in flat file so that i can receive it in R/3 with required BAPI. Guys plz tell me necessary steps need to follow to do the whole process. I dont know much about XI and from lots of tutorials i am getting confused. I have to work with both XI and SAP R/3. What to do. Plz advise me.
    Thanks in advance.
    With regards,
    Rosaline.

    Dear Abhishek,
    Thanks for your help.
    1) convert the XML content of the file into flat structure (using UDF or JAVA mapping)....map the output of the JAVA mapping to the the BAPI structure....so now you would have falt file (content) in the BAPI.
    2) create a flat file using PI and place it in some folder....now the BAPI program should pick this flat file from the folder and process accordingly....this will not require a JAVA mapping and can be done by FCC parameters of the File channel.
    These are 2 diff way or steps? Plz provide any help link.
    With regards,
    Rosaline.

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • How can I using functions implicit in dll file in java code ?

    How can I using functions implicit in dll file in java code ?
    I'm developing a program that interfacing with fingerprint hardware.
    I have the finger print already, and I have to the SDK that have all functions for managing this fingerprint.
    These SDK functions are represented in dll files.
    I want to know how can I use these functions in java code .
    I looked on this link of sun forums :
    http://forum.java.sun.com/thread.jspa?threadID=305171&messageID=1215613
    but I don't Understand the meaning of native code.
    Thanks for help.

    please please please please please please please please help me:
    After reading a lot of articles, tutorials, and overviews about JNI (Java Native Interface)
    I found that these steps
    1.     Develop the Java code
    2.     Compile the Java code to a class file
    3.     Generate the header file
    4.     Implement the native method
    5.     Create the shared library or DLL
    6.     Run the Java program
    Is the common steps in JNI development
    The most powerful link was
    http://java.sun.com/docs/books/jni/html/start.html
    and
    http://www.netbeans.org/kb/55/beginning-jni-part2.html
    and the pdf oh this link
    http://www.ibm.com/developerworks/edu/j-dw-javajni-i.html requiring IBM registration to download it.
    But I have already the DLL, and want to the stright forward way to use its functions by java code only.
    I don not to write any C++ code .
    Is this possible???????????????????????????????
    The name of these dll is �zkemsdk.dll�
    It developed by ZKSOFTWARE company for managing a finger print �NP1500A�of
    http://www.napcogulfsecurity.com/finger_print.asp
    thanks for help

  • I need to call a batch file from java and pass arguments to that Batch file

    Hi,
    I need to call a batch file from java and pass arguments to that Batch file.
    For example say: The batch file(test.bat) contains this command: mkdir
    I need to pass the name of the directory to the batch file as an argument from My Java program.
    Runtime.getRuntime().exec("cmd /c start test.bat");
    How to pass argument to the .bat file from Java now ?
    regards,
    Krish
    Edited by: Krish4Java on Oct 17, 2007 2:47 PM

    Hi Turing,
    I am able to pass the argument directly but unable to pass as a String.
    For example:
    Runtime.getRuntime().exec("cmd /c start test.bat sample ");
    When I pass it as a value sample, I am able to receive this value sample in the batch file. Do you know how to pass a String ?
    String s1="sample";
    Runtime.getRuntime().exec("cmd /c start test.bat s1 ");
    s1 gets passed here instead of value sample to the batch file.
    Pls let me know if you have a solution.
    Thanks,
    Krish

  • How I can create a XML file from java Aplication

    How I can create a XML file from java Aplication
    whith have a the following structure
    <users>
    <user>
    <login>anyName</login>     
    <password>xxxx</password>
    </user>
    </users>
    the password label must be encripted
    accept any suggestion

    Let us assume you have all the data from the jsp form in an java bean object..
    Now you want a xml file. This can be acheived in 2 ways
    1. Write it into a file using java.io classes. Say you have a class with name
    write("<name>"+obj.getName+</name>);
    bingo you have a flat file with the xml
    2. Use data binding to do the trick
    will recommend JiBx and Castor for the 2nd option
    Regards,
    Rajagopal

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

Maybe you are looking for