Binary Output

Hey there, im pretty new to java, and i've stumbled across a problem with one assignment. I need to "Save a ?snapshot? of the situation say every 10 generations in a binary file".
I've tried to use what i know, but if anyone could give me some pointers, that would be great.
this is what i have so far.
thanx
try {
           ObjectOutputStream outputstream =
           new ObjectOutputStream(new FileOutputStream("binaryoutput.dat"));
           outputStream.writeObject(" " + temp + "             " + df.format(score) + " " +gen);
           System.out.println("Numbers written to the file binaryoutput.dat");
           outputStream.close();
        catch(IOException e) {
            System.out.println("Problem with file output.");

the rest is from this part of my code.
   import java.text.*;
   import java.io.ObjectOutputStream;
   import java.io.FileOutputStream;
   import java.io.IOException;
   public class MonkeyGen
      public static void main(String [] args)
         DecimalFormat df = new DecimalFormat("#0.0000"); //Format of the percentag output.
         Genetic m = new Genetic();
         String t = "To be or not to be, that is the question."; //The line in which we need to have as our output.
         System.out.println(t);
         String temp = m.randString(t.length());
         System.out.println(temp);
         String [] slist = new String[10000]; //declaring a new array of 10,000 strings
         double score = 0, tempScore;
         int gen =0;
         while (score < 1.0)
            gen++;
            for (int n=0;n<10000;n++)
               slist[n] = m.permuteString(temp.length(), temp);
               tempScore = m.getScore(slist[n],t);
               if (tempScore > score)
                  score = tempScore;
                  temp = slist[n];
            System.out.println(" " + temp + "             " + df.format(score) + " " +gen); // Prints out the final solution.
         System.out.println("--------------------------------------- "+ gen);im only really following lecture notes and my textbook, both which seem to point to using an ObjectOutputStream.
the problem im really having is the fact that it's not compiling

Similar Messages

  • Passing binary output in servlets

    Hi all,
    I am new to struts.In Jsp i need to give three text field values
    1.category
    2.two date fields.
    On click of submit button,it should export the csv file from db into excel sheets.
    If i didnt give the input values properly and clicking the submit button will display the error msg.
    But next time if i give the proper input values,then it should disappear.
    but my problem is the err msg is not removing from jsp but export is working and in my console :
    SEVERE: Servlet.service() for servlet action threw exception+
    java.lang.IllegalStateException: Cannot forward after response has been committed*
    **and in my action class:**
    The following condition is to check existence of err:
    if (category.length() == 0 || startdate.length() == 0
                        || enddate.length() == 0) {
                   ActionMessages errors = this.getErrors(request);
                   errors.add("fatal", new ActionMessage(DATE_FIELD_MISSING, ""));
                   saveErrors(request, errors);
                   return mapping.findForward("failure");
    The following code is for export  the data:+
    if (category.equals("book")) {
                   String fileName = "part.csv";
                   response.setContentType("application/octet-stream");
                   response.setHeader("Content-Disposition", "attachment; filename=\""
                             + fileName + "\"");
                   try {
                        OutputStream oStream = response.getOutputStream();
                        oStream
                                  .write(" Number, Description, Revision, Dummy, Manual, Classification, Owner, Global Effective Date, Global Expiration Date, New Part\n"
                                            .getBytes());
                        for (int i = 0; i < result.size(); i++) {
                             PartDTO part = (PartDTO) result.get(i);
                             StringBuffer sbpart = new StringBuffer(part.getPartNumber());
                             sbpart.append(',');
                             sbpart.append(part.getPartDescription());
                             sbpart.append(',');
                             sbpart.append(part.getRevision());
                             sbpart.append(',');
                             sbpart.append(part.getIsDummy());
                             sbpart.append(',');
                             sbpart.append(part.getIsManual());
                             sbpart.append(',');
                             sbpart.append(part.getClassification());
                             sbpart.append(',');
                             sbpart.append(part.getOwner());
                             sbpart.append(',');
                             sbpart.append(part.getEffectiveDate());
                             sbpart.append(',');
                             sbpart.append(part.getExpirationDate());
                             sbpart.append(',');
                             sbpart.append(part.getIsNewPart());
                             sbpart.append("\n");
                             oStream.write(sbpart.toString().getBytes());
                        oStream.close();               } catch (IOException ioe) {
    return mapping.findForward("success");
    I think oStream.close() will return to jsp .. so the last return statement is not working..
    I dont know how to do it in someother way......Plz help me.its urgent yaar......Thanks in advance....

    It's been awhile since I've used Struts, so don't put too much stock in this answer. That said...
    Generally, you should not close the response output stream, ever. The application server takes care of this, when and if the time is right.
    Also, it appears that you're writing output within an action, and then forwarding to a JSP. If you want to write binary output or some other type of output for which a text-template based JSP is not appropriate, forward to a plain old servlet, and write your output there. Define the servlet as you would any other in web.xml, and dispatch to it from Struts instead of going to a JSP.
    Good luck!
    - Jerry Oberle

  • How to display binary output in numeric indicator

    Hai
        How to display binary output in a Numeric display.
    in my program i use numeric display for displaying numeric values in one case
    in the other case i want to display binary output in the same numeric display window as binary,
     i don't want to make seperate o/p display for binary o/p i want change the property of the Numeric display to binary display .
    is it possible to display Binary data in numeric indicator, please give me an idea to do this.
    thanks
    sk
    Attachments:
    DBL2BIN.vi ‏39 KB

    Alternatively, you can use the FormatString property node, and use %08b as format string : 08 means : pad the output with 0 to get a 8 digits wide result.
    See attachment.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    DBL2BIN[1].vi ‏21 KB

  • Formatting Binary Output

    I want to format binary output in text fields to confrom to the following scheme:
    head data1 data2 return offSet id
    6 bits 5 bits 5 bits 5 bits 5 bits 6 bits
    where the first row are field names and the second is the filed width.
    What that means is that, using the value 1 (base 10) as an example, a 6 bit filed will read 000001 and so a 5 bit field will read 00001.
    My program converts to binary no worries, but how do I enforce the width requirements? I am using Integer.toBinaryString(int) to convert, if that helps.
    Thanks

    public String intToJustifiedBinaryString(int number, int length)
      StringBuffer buffer = new StringBuffer(Integer.toBinaryString(number));
      while (buffer.length() < length)
          buffer.insert(0, "0");
      return buffer.toString();It works great! Now for the learning. I looked up StringBuffer and found this explanation:
    StringBuffer(String str)
    Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
    What I am trying to figure out is how it is not overwriting what already exists in the buffer. Lets pretend with int = 7 and a 6 bit field.
    So initially, buffer.length() = 3 and my buffer looks like 1 1 1.
    From the API: The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.
    If I am specifying my insert point as 0 (insert(int offset, char c) Inserts the string representation of the char argument into this string buffer.) How am I not overwriting one of my bits comprising my binary 7? My only guess is that insert operation first shifts what is already there over the necessary amount, based on the length of what is being inserted, before inserting at the specified point. I have read nothing to support this theory. Please let me know if it is correct.
    Thanks for the help!

  • How to send a binary output from ni daq 6009

    I am trying to get a binary output from ni daq 6009 to make the selections of a multiplexer.
    I am trying to make the selection directly from the labview program.
    Please help me in getting this binary output from ni daq 6009 to do the selection

    Try something like this. 
    I'm not a fan of daq-assistant express vi's... use the primitives.  Create the task outside the main structure, pass that task inside the loop and do a write where needed.  Close the task after the main loop.  This improves speed and labview performance.
    Attachments:
    ocelot.png ‏43 KB
    ocelot.vi ‏21 KB

  • Console grab binary output

    I'm playing around with a small app that will save mysqldump output to file.
    I managed to get it working, except when there's binary data on blob fields.
    So, if I run from a console:
    mysqldump -h server -u uni testdb > /tmp/test.1sql
    and then the program listed below, I get excessive garbage in the binary fields and file sizes grow up:
    -rw-r--r-- 1 nobody nobody 4535097 Aug 20 14:36 /tmp/test1.sql
    -rw-r--r-- 1 nobody nobody 6493448 Aug 20 14:51 /tmp/test.sql
    So, I tried executing with the --hex-blob flag in the mysqldump command, but in this case I've to pay the extra size cost:
    -rw-r--r-- 1 nobody nobody 7131966 Aug 20 14:47 /tmp/test1.sql
    As you will see, I'm grabbing the contents through an InputStreamReader
    and then I write they with OutputStreamWriter. I didn't choose execute the command and save the file by the console 'cause I would prefer know what's going on, count bytes, showing a progress or whatever...
    I would like to know how could I grab the binary output of the command ?...
    It seems like the sh command is not binary...
    Thank you!
    This is the code:
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    String Filename;
    StreamGobbler(InputStream is, String type,String Filename)
    this.is = is;
    this.type = type;
    this.Filename=Filename;
    public void run()
    try
    PrintWriter out;
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    if (type=="ERROR") {
    FileWriter outFile = new FileWriter("/tmp/error.log");
    out = new PrintWriter(outFile);
    String line=null;
    while ( (line = br.readLine()) != null)
    if (type=="ERROR") {
    System.out.println(type + ">" + line);
    out.println(line);
    } else {
    out.println(line);
    out.close();
    } else {
    // FileWriter outFile = new FileWriter(Filename);
    // out = new PrintWriter(outFile);
    FileOutputStream fos = new FileOutputStream(new File(Filename));
    OutputStreamWriter outs = new OutputStreamWriter(fos,"UTF8");
    int len = 512;
    char buf[] = new char[len];
    int numRead;
    while ((numRead = isr.read(buf, 0, len)) != -1)
    outs.write(buf, 0, numRead);
    outs.close();
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class mxdump {
    public mxdump(String Cmd) {
    try {
    Cmd="/bin/bash /usr/bin/mysqldump -h server -u uni testdb";
    /* String cmd[]={"sh", "-c",Cmd,""} ; //"mysqldump";
    ProcessBuilder pb=new ProcessBuilder(cmd);
    System.out.println("Start");
    pb.start();
    System.out.println("Termino"); */
    String cmd[]={"sh", "-c",Cmd,""} ;
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1]
    + " " + cmd[2]);
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR","");
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT","/tmp/test.sql" );
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    catch(Throwable t)
    //System.out.println(e);
    t.printStackTrace();
    }

    Don't use Readers and Writers on binary data. Use Streams.

  • Display PDF from BAPI's binary output

    Dear All,
    I am struck badly with this scenerio here.
    we have a Bapi which is generating an adobe form in the backend and providing that as an attribute of type binary.
    i used the following code to display that binary output, to be opened in Acrobet reader.
    byte[] pdfContent= wdContext.nodeZhra_Get_Lettertype_Desc_Input().nodeOutput().currentOutputElement().getE_Bin_File();
         IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
         IWDWindow win = wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(),"PDF in Arabic",true);
         win.setTitle("PDF in Arabic");
         win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
         win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
         win.removeWindowFeature(WDWindowFeature.MENU_BAR);
         win.removeWindowFeature(WDWindowFeature.STATUS_BAR);
         win.show();
    the problem is that the acrobet reader opens and says it could not display the file and it may be not supported or might be damaged.BUT
    1. the file is being generated and correctly displayed on another system
    2. both systems have the same version and updates of acrober reader 9.
    Kindly let me know the solution or some work-around to solve this problem. Is there a way,where i should use interactive form to do this...
    thanks in advance

    Hello!
    If it works on one client but not on the other i think it is not a Server problem.
    Check th following:
    Open the document in the Browser where it is displayed and save it on a thumbdrive and open it on the other client.
    -> If it works: it must be Browser settings
    -> If not: the generated PDF is not valid for the Adobe Reader of the other client.
    If it works on the Server but not on the client, try to dump it to a file on the Webserver to see if the BAPI call (RFC/WS) is the problem. When you use XString for exampe I think there is a problem with the data beeing split into several lines. If you have the file you should be able to open it. Compare the size of the File on the WebAS and the backend.
    Kind regards
    Matthias
    Edited by: Matthias Schneider on Nov 4, 2008 6:19 PM

  • Binary Output On Serialport

    Hi,
    I am trying to send numbers from 0 to 255 over the serial port. Locally I can convert an integer to a byte by a cast. However, if I write this byte in the Outputstream with the OutputstreamWriter, all values from 128 to 160 get lost. Instead I recive the value 63.
    Using a workaround with ISO-8859-1 makes it possible to send all values except 129,141,143,144,157. Again, these are replaced by the value 63.
    OutputStreamWriter aus = new OutputStreamWriter(main.out);
    int value;
    String s;
    s = new Character((char) i).toString();
    s = new String(s.getBytes("ISO-8859-1"));
    aus.write(s);For the communication I am using the RxTx library under Windows XP pro.
    How can I write binary code to the serial port?

    If you want write byte per byte (not very effective) :
    DataOutputStream aus = new DataOutputStream(main.out);
    int value;
    aus.writeByte(value);If you want write more efficiently, gather data into byte arrays, and write into a buffered output.
    DataOutputStream aus = new DataOutputStream( new BufferedOutputStream(main.out) );
    byte [] values;
    //fill values, assuming numberOfValuesInArray is the number of bytes
    // in values that must be written, with numberOfValuesInArray<=values.length
    aus.write(value, 0, numberOfValuesInArray);
    //Don't forget to flush after writing the last array of values, or at any time you want to force data output on underlaying stream.
    aus.flush()

  • Binary output from two tags

    Hi
    I'm having problems outputting a binary image from a tag handler more than once. This is apparently a known problem with JSP but I was wondering if anyone had found a workaround (other that writing a servlet).
    The basic problem is that if you call ServletResponse.getOutputStream() more than once in a page or if you call it after ServletResponse.getWriter() has been called then you get:
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
    The result is that Tag Libraries are a technology that doesn't allow you to output two binary things directly onto a page or to output any binary data if you've also output text or vice versa. That sounds extraordinarily bad to me.
    I know there must be good reasons for the difficulty but surely there's a fix or a well known workaround.
    Has anyone out there got over this problem or know whether any fixes are planned? Thanks.
    Murray

    You can call either getOutputStream or getWriter, and you can it only once (it assumes you'll assign that to a variable and use the variable from then on). It's not a bug or problem, it's a reasonable restriction to prevent you from doing what I think you are trying to do....
    So you can use the writer to write text-based output, or the output stream to write binary data.
    But this is somewhat irrelevent. You can't output HTML and include binary data, like an image, in the HTML.
    <div>here is some text, followed by an image</div>
    <div>0a68df9834ce7932d....</div> <-- binary data...
    The browser has no idea what to do with that. That's why you have image tags and object/embed tags in HTML. And the browser has to make a separate request to get the content for the image tag. So the servlet can output image data or other stuff, if the image tag is used to call a servlet to serve an image. But they are not doing with the same call the a servlet (and usually you have separate servlets for that stuff).
    Ultimately, this is not a JSP/servlet issue. This is strictly and HTML, HTTP, browser issue: That's how it works and has worked since long before JSP and servlets came about. JSP/servlets do not change how HTML and browsers work in any way/shape/form. They only allow for dynamically generating content the browser gets.

  • Cfdocument and binary output

    I'm using the Fusebox3 framework.
    file: dsp_Invoice.cfm
    <cfdocument format="pdf" orientation="portrait"
    name="myPDF" overwrite="true">
    <cfcontent type="application/pdf" variable="#myPDF#">
    I get the binary results opened in Wordpad with the filename
    default.cfm
    Any ideas?
    Tried using Foxit PDF reader on IE7 and Firefox2. Both
    usually open PDF correctly from anywhere on the web.

    <cfheader name="Content-Disposition" value="inline;
    filename=invoice.pdf">
    <cfcontent type="application/pdf" variable="#myPDF#">
    in place of just the cfcontent tag alone.
    In any case, I would build the invoice document in
    dsp_Invoice.cfm. Then I would open it in a separate page,
    dsp_showInvoice.cfm, say, that contains just a cfheader and
    cfcontent tag.

  • Binary output at the digital output pin as 1111 1111 1111

    Hi 
     I am using DAQ 6009 and i need a output as 1111 1111 1111 at the digital output(12pin )of the DAQ.Please give an idea or a vi to do so
    Thanks in advance...
    Solved!
    Go to Solution.

    DKLabView wrote:
    I am using DAQ 6009 and i need a output as 1111 1111 1111 at the digital output(12pin )of the DAQ.
    It seems that you want to generate static value(s) on 12 pins of USB-6009. Find attached example and let me know if it helps.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example - Write Digital [LV 2009].vi ‏10 KB

  • How to output variable names and units used in binary file

    My colleague will be giving me binary files (*.dat) generated from within LabView. There are over 60 variables (columns) in the binary output file. I need to know the variable names and units, which I believe he already has set up in LabView. Is there a way for him to output a file containing the variable name and unit, so that I'll know what the binary file contains? He can create an equivalent ASCII file with a header listing the variable name, but it doesn't list the units of each variable.
    As you can tell I am not a LabView user so I apologize if this question makes no sense.
    Solved!
    Go to Solution.

    Hi KE,
    an ASCII file (probably csv formatted) is just text - and contains all data that is (intentially) written to. There is no special function to include units or whatever!
    Your collegue has to save those information the same way he saves the names and the values...
    (When writing text files he could use WriteTextFile, FormatIntoFile, WriteToSpreadsheetFile, even WriteBinaryFile could be used...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to append binary data to existing file in OSB

    Hi,
    I have an OSB project that I need for it to append binary data via ftp.  Here's my current flow:
    MFL binary output --> Replace $body with mfl binary output --> Publish to action (Business service that's configured to ftp binary data).
    However, when the data is ftp'ed the following error is thrown:
    URI = ftp://xxx:21/opt/home/zzz/logs
    Request metadata =
        <xml-fragment>
          <tran:headers xsi:type="ftp:FtpRequestHeaders" xmlns:ftp="http://www.bea.com/wli/sb/transports/ftp" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="h
    ttp://www.w3.org/2001/XMLSchema-instance">
            <ftp:fileName>11802_insert_oh_xfrmr.eai_data</ftp:fileName>
          </tran:headers>
          <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
          <ftp:isFilePath xmlns:ftp="http://www.bea.com/wli/sb/transports/ftp">false</ftp:isFilePath>
        </xml-fragment>
    Payload =
    19266787^CLLL^C711791^CLLL^C^C1178213^CSingle Phase(1)^C63185066204^CA^CConstructed^C358880 NW 4 DR LK MONTAZA^C120/240^C09361^CN/A^CProposed Remove^CAerial^C45718100^C
    Unknown^C^CNo^CNormal Closed^CClamp^CA^C1^C2-Cover^C19266796^CNo^CNo^C15^C^CYes^CYes^CYes^C13200Y/7620 X 22860Y/13200^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
    ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C19266641^Coh_fuse_switch^C63086930001^C4^CN31^CDD0613^C22.9^C63376474601^C8129580^CFalse^C4^COke
    echobee^C43^C0^Cdefault^CYes^C
    >
    ####<Nov 6, 2013 2:28:23 PM EST> <Error> <WliSbTransports> <goxsd1604> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<
    anonymous>> <BEA1-4B688443B66FA09FFE75> <d2b4601b2fffd9b7:6b9f2297:1422a857ee8:-8000-000000000000171b> <1383766103889> <BEA-381105> <Error occured for the service endpo
    int: com.bea.wli.sb.transports.TransportException: Unable to open data connection. Message is Received error response (553) from FTP server [mpsd1] IP [10.111.19.32] po
    rt [21] status [connected] upon executing command [stor opt/home/zzz/logs/11802_insert_oh_xfrmr.eai_data.a]
    com.bea.wli.sb.transports.TransportException: Unable to open data connection. Message is Received error response (553) from FTP server [mpsd1] IP [10.111.19.32] port [2
    1] status [connected] upon executing command [stor opt/home/icanadm/logs/11802_insert_oh_xfrmr.eai_data.a]
            at com.bea.wli.sb.transports.ftp.connector.FTPTransportProvider.sendMessage(FTPTransportProvider.java:422)
    From what I understand the error code 553 represents a bad file name.  The file name that I'm supplying is 11802_insert_oh_xfrmr.eai_data but it appears that the name is changed to 11802_insert_oh_xfrmr.eai_data.a .  So I did the obvious and changed the file several different ways (without the .eai_data extension, removed the numbers from the file name) but still no luck. 
    Any suggestions?
    Thanks,
    Yusuf

    Thanks Eric.
    I'm using the JCA FTP adapter instead and noticed it's appending the test generated data supplied by the OSB test console.
    However, how can I ensure that the MFL output that I need to append will be placed on a new line? 
    Also, how should I map/assign the MFL binary output to the opaqueElement type base64Binary defined in the WSDL file below?
    Once again here's a sample payload that I need to ensure will be presented on a new line:
    19266787^CLLL^C711791^CLLL^C^C1178213^CSingle Phase(1)^C63185066204^CA^CConstructed^C358880 NW 4 DR LK MONTAZA^C120/240^C09361^CN/A^CProposed Remove^CAerial^C45718100^C
    Unknown^C^CNo^CNormal Closed^CClamp^CA^C1^C2-Cover^C19266796^CNo^CNo^C15^C^CYes^CYes^CYes^C13200Y/7620 X 22860Y/13200^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
    ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C19266641^Coh_fuse_switch^C63086930001^C4^CN31^CDD0613^C22.9^C63376474601^C8129580^CFalse^C4^COke
    echobee^C43^C0^Cdefault^CYes
    Here's the WSDL file that gets generated for the FTP adapter:
    <wsdl:definitions
         name="PutGenericDevice"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/AMS/Project1/PutGenericDevice"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/AMS/Project1/PutGenericDevice"
         xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
        >
      <plt:partnerLinkType name="Put_plt" >
        <plt:role name="Put_role" >
          <plt:portType name="tns:Put_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
        <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
                xmlns="http://www.w3.org/2001/XMLSchema" >
          <element name="opaqueElement" type="base64Binary"/>
        </schema>
        </wsdl:types>
        <wsdl:message name="Put_msg">
            <wsdl:part name="opaque" element="opaque:opaqueElement"/>
        </wsdl:message>
        <wsdl:portType name="Put_ptt">
            <wsdl:operation name="Put">
                <wsdl:input message="tns:Put_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>
    Here's the JCA details:
    <adapter-config name="PutGenericDevice" adapter="FTP Adapter" wsdlLocation="PutGenericDevice.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/ftp/DssPut"/>
      <endpoint-interaction portType="Put_ptt" operation="Put">
        <interaction-spec className="oracle.tip.adapter.ftp.outbound.FTPInteractionSpec">
          <property name="PhysicalDirectory" value="/opt/eai/ofmw/Oracle/Middleware_R7/logs"/>
          <property name="FileType" value="binary"/>
          <property name="Append" value="true"/>
          <property name="FileNamingConvention" value="dummy.txt"/>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>
    Thanks,
    Yusuf

  • Binary to XML format

    Hi all,
    To post a document to bank i have used digital signature using SSF functions. It is working fine. And my recipient received the data with digital signature.
    Now I have a problem, when i use SSF function my input data is converted into binary format, which is not accepatble by the recipient system. They wanted the format to be in XML. How do I convert my binary data to XML format. OR am i doing something wrong.
    My program flow is like this,
    1. get the data from SAP.
    2. using FM SSF_KRN_SIGN.
    3. Output of SSF_KRN_SIGN, is passed to SSF_KRN_ADDSIGN.
    4. Output of SSF_KRN_ADDSIGN is passed to HTTP_POST to the bank.
    When I send data to FM SSF_KRN_SIGN, my input data is plain text format, the return value from this FM is in binary format.
    Could any one help me in solving my problem .
    Regards,
    prabhu rajesh.

    I believe that the XML and the digital signature are two separate things.  When you call SSF_KRN_SIGN it takes whatever input data you have and signs it - producing a binary output table. If your bank wants its dta in XML, you will have to change your input data to the function SSF_KRN_SIGN into XML before passing it to the function.  Use the iXML classes or if on 620 the Call Transformation command (Both of which have been discussed on this forum before) to change your data into iXML.  Output your XML Stream as a character Table.  Feed this Character table into the function modeul SSF_KRN_SIGN.  The results of this function module will be your XML stream, digitally signed, and in binary format.

  • How to create universal binary for CPAN bundle?

    Hi all,
    has anybody had any success on cross-compiling a Perl bundle (i.e., HTML::Parser from CPAN) on a PPC to create a universal version of the *.bundle file?
    I have tried to manually change the compile and link command lines to build a i386 version according to
    http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compilin g/chapter4_section3.html
    and then use "lipo" to create a universal version of the bundle. This "universal version works just fine on a PPC but not at all on an Intel Mac (even the error message is some mangled binary output so I can't really get much useful info from there...)
    Andreas

    OK, I tried building the bundle as i386 only but it was working about as well as the lipo'd universal one (i.e., not really...). Has anybody been successful building an i386 version of a CPAN bundle on a PPC or is this only possible on an i386 machine (in order to use the i386 version of Perl's PackageMaker)?
    Andreas

Maybe you are looking for

  • Incomplete Data on report (report does not show all records from the table)

    Hello, I have problem with CR XI, I'm running the same report on the same data with simple select all records from the table (no sorting, no grouping, no filters) Sometimes report shows me all records sometimes not. Mostly not all records on the repo

  • XPRA_EXECUTION. TP_STEP_FAILURE, Return code: 0012

    Hi, I'm implementing support packages on a production system. By running SAP_APPL (SAPKH60408), the spam goes brocken. It returns the following error message : The import was stopped, since an error occurred during the phase       XPRA_EXECUTION, whi

  • Able to make local adjustment on video ?

    When I shot video about academic presentation, the PowerPoint graphic on projector screen was easily washed out while the speaker exposure was correct.  In Photoshop Elements, I can select and copy the screen area as layer, then adjust the brightness

  • Installing problem oracle 8.1.6 in RH 6.2 & SWAP problem

    halo everybody 1) i am having celeron machine with 32 MB RAM with four swap partition of 133MB each. i am trying to install oracle 8.1.6 for Red Hat linux 6.2. i have created mount point and required group/account. everything is finw. But while insta

  • Problème mise à jour en compte limité

    après mise à jour 3.6.6 en compte limité, une petite fenêtre apparait au lancement de firefox m'indiquant que la mise à jour ne peut être effectuée. Comment m'en débarasser ? == This happened == Every time Firefox opened