Binary Data

Hi,
I'm developing a program that reads and writes data via http. Although I am having a problem with the response that the server is giving me. The server is sending me binary data and I'm unsure how to decode it. For example, part of the below request returns 41 97 33 33, which is supposed to convert to 18.90. Here is the code that I'm using to connect and read the data.
URL urlq = new URL(url);
URLConnection streamrConnection = urlq.openConnection();
streamConnection.setDoOutput(true);
DataInputStream dis = new DataInputStream(streamConnection.getInputStream());
float inputLine;
while ((inputLine = dis.readFloat()) != -1) {
System.out.printf("%f",inputLine);
The output of this code is
0.000000
0.000000
3367254360064.000000
0.000000
-0.000000
-0.000000
-0.000000
-0.000000
0.000000
0.000000
-67013848328296200000.000000
-0.000000
-0.000000
-0.000000
-0.000000
-206013237815188270000000.000000
0.000000
1084495953920.000000
Could anyone tell me the proper way to decode binary data coming from a server over http? Thanks for any help.

jjstuart79 wrote:
In order to print the actual bytes I'm receiving would I just use the int read(byte[] b) or the byte readByte() methods from the dataInputStream class? Maybe just wrap it in a LoggingInputStream?
You can find loads of examples from Google (LoggingInputStream).

Similar Messages

  • Sporadically getting error "string or binary data would be truncated" in SQL server 2008 while inserting in a Table Type object

    I am facing a strange SQL exception:-
    The code flow is like this:
    .Net 4.0 --> Entity Framework --> SQL 2008 ( StoredProc --> Function {Exception})
    In the SQL Table-Valued Function, I am selecting a column (nvarchar(50)) from an existing table and (after some filtration using inner joins and where clauses) inserting the values in a Table Type Object having a column (nvarchar(50))
    This flow was working fine in SQL 2008 but now all of sudden the Insert into @TableType is throwing  "string or binary data would be truncated"  exception. 
    Insert Into @ObjTableType
    Select * From dbo.Table
    The max length of data in the source column is 24 but even then the insert statement into nvarchar temp column is failing.
    Moreover, the same issue started coming up few weeks back and I was unable to find the root cause, but back then it started working properly after few hours
    (issue reported at 10 AM EST and was automatically resolved post 8 PM EST). No refresh activity was performed on the database.
    This time however the issue is still coming up (even after 2 days) but is not coming up in every scenario. The data set, for which the error is thrown, is valid and every value in the function is fetched from existing tables. 
    Due to its sporadic nature, I am unable to recreate it now :( , but still unable to determine why it started coming up or how can i prevent such things to happen again.
    It is difficult to even explain the weirdness of this bug but any help or guidance in finding the root cause will be very helpful.
    I also Tried by using nvarchar(max) in the table type object but it didn't work.
    Here is a code similar to the function which I am using:
    BEGIN
    TRAN
    DECLARE @PID
    int = 483
    DECLARE @retExcludables
    TABLE
        PID
    int NOT
    NULL,
        ENumber
    nvarchar(50)
    NOT NULL,
        CNumber
    nvarchar(50)
    NOT NULL,
        AId
    uniqueidentifier NOT
    NULL
    declare @PSCount int;
    select @PSCount =
    count('x')
    from tblProjSur ps
    where ps.PID
    = @PID;
    if (@PSCount = 0)
    begin
    return;
    end;
    declare @ExcludableTempValue table (
            PID
    int,
            ENumber
    nvarchar(max),
            CNumber
    nvarchar(max),
            AId
    uniqueidentifier,
            SIds
    int,
            SCSymb
    nvarchar(10),
            SurCSymb
    nvarchar(10)
    with SurCSymbs as (
    select ps.PID,
                   ps.SIds,              
                   csl.CSymb
    from tblProjSur ps
                right
    outer join tblProjSurCSymb pscs
    on pscs.tblProjSurId
    = ps.tblProjSurId
    inner join CSymbLookup csl
    on csl.CSymbId
    = pscs.CSymbId 
    where ps.PID
    = @PID
        AssignedValues
    as (
    select psr.PID,
                   psr.ENumber,
                   psr.CNumber,
                   psmd.MetaDataValue
    as ClaimSymbol,
                   psau.UserId
    as AId,
                   psus.SIds
    from PSRow psr
    inner join PSMetadata psmd
    on psmd.PSRowId
    = psr.SampleRowId
    inner join MetaDataLookup mdl
    on mdl.MetaDataId
    = psmd.MetaDataId
    inner join PSAUser psau
    on psau.PSRowId
    = psr.SampleRowId
                inner
    join PSUserSur psus
    on psus.SampleAssignedUserId
    = psau.ProjectSampleUserId
    where psr.PID
    = @PID
    and mdl.MetaDataCommonName
    = 'CorrectValue'
    and psus.SIds
    in (select
    distinct SIds from SurCSymbs)         
        FullDetails
    as (
    select asurv.PID,
    Convert(NVarchar(50),asurv.ENumber)
    as ENumber,
    Convert(NVarchar(50),asurv.CNumber)
    as CNumber,
                   asurv.AId,
                   asurv.SIds,
                   asurv.CSymb
    as SCSymb,
                   scs.CSymb
    as SurCSymb
    from AssignedValues asurv
    left outer
    join SurCSymbs scs
    on    scs.PID
    = asurv.PID
    and scs.SIds
    = asurv.SIds
    and scs.CSymb
    = asurv.CSymb
    --Error is thrown at this statement
    insert into @ExcludableTempValue
    select *
    from FullDetails;
    with SurHavingSym as (   
    select distinct est.PID,
                            est.ENumber,
                            est.CNumber,
                            est.AId
    from @ExcludableTempValue est
    where est.SurCSymb
    is not
    null
    delete @ExcludableTempValue
    from @ExcludableTempValue est
    inner join SurHavingSym shs
    on    shs.PID
    = est.PID
    and shs.ENumber
    = est.ENumber
    and shs.CNumber
    = est.CNumber
    and shs.AId
    = est.AId;
    insert @retExcludables(PID, ENumber, CNumber, AId)
    select distinct est.PID,
    Convert(nvarchar(50),est.ENumber)
    ENumber,
    Convert(nvarchar(50),est.CNumber)
    CNumber,
                            est.AId      
    from @ExcludableTempValue est 
    RETURN
    ROLLBACK
    TRAN
    I have tried by converting the columns and also validated the input data set for any white spaces or special characters.
    For the same input data, it was working fine till yesterday but suddenly it started throwing the exception.

    Remember, the CTE isn't executing the SQL exactly in the order you read it as a human (don't get too picky about that statement, it's at least partly true enough to say it's partly true), nor are the line numbers or error messages easy to read: a mismatch
    in any of the joins along the way leading up to your insert could be the cause too.  I would suggest posting the table definition/DDL for:
    - PSMetadata, in particular PSRowID, but just post it all
    - tblProjectSur, in particularcolumns CSymbID and TblProjSurSurID
    - cSymbLookup, in particular column CSymbID
    - PSRow, in particular columns SampleRowID, PID,
    - PSAuser and PSUserSur, in particualr all the USERID and RowID columns
    - SurCSymbs, in particular colum SIDs
    Also, a diagnostic query along these lines, repeat for each of your tables, each of the columns used in joins leading up to your insert:
    Select count(asurv.sid) as count all
    , count(case when asurv.sid between 0 and 9999999999 then 1 else null end) as ctIsaNumber
    from SurvCsymb
    The sporadic nature would imply that the optimizer usually chooses one path to the data, but sometimes others, and the fact that it occurs during the insert could be irrelevant, any of the preceding joins could be the cause, not the data targeted to be inserted.

  • Need to convert the binary data in blob field to readable format

    Hi,
    We need to convert the Binary data in the BLOB field to readable format and need to display it in Oracle Apps Environment,does anybody come across the similar requirement.
    please advise, thanks in advance.
    Regards,
    Babu.

    You could use standard Attachments functionality here ... if the blob is not in FND_LOBS, insert into FND_LOBS, fnd_attached_documents etc to enable viewing via "Attachments" to the entity the blob is related to.
    Gareth

  • Where is the binary data of this icon stored and retrieved from Application server?

    Hello guys,
    Today I observed one phenomenon and could not explain it per my knowledge.
    I have one url which points to an icon in application server:
    https://<host name>:44301/sap/public/bc/ur/nw5/themes/sap_corbu/common/libs/Icon/SuccessMessage.gif
    I could successfully open it via chrome:
    and after that I could see an entry in ICM server cache. Everything works perfectly.
    Then I tried to check this icon in mime browser in SE80. To my surprise, the folder /sap/public/bc/ur/nw5/themes is empty.
    However, the ICM cache shows that there is a subfolder called "sap_corbu" under "themes" folder. But why I cannot find it in mime browser?
    Then I write a report to retrieve the binary data of icon via CL_HTTP_CLIENT, and clear the ICM buffer via tcode SMICM.
    I expect this time some database table will be queried to load the content of the icon, since now the buffer is not available.
    To my surprise again, in SAT no database table is involved.
    So now I am confused: since I have already cleared the ICM server cache, where does the icon binary data come from when I run the report to access the icon?
    Best regards,
    Jerry

    Hello guys,
    one colleague today told me that there is a zip file "ur_mimes_nw7.zip" in MIME repository /PUBLIC/BC/UR/ur_mines_nw7.zip. I download it locally and unzip it and indeed find many theme folders including sap_corbu folder and its resource files. So I guess there must be some logic done in web application server which will unzip this archive file and put each theme folder to the corresponding folders in application server. I would assume those logic are done outside ABAP stack side, this is the reason I cannot find any hint of them in ABAP backend via tcode SAT even I clear both client and server side cache.
    Best regards,
    Jerry

  • Help needed with binary data in xml (dtd,xml inside)

    I am using the java xml sql utility. I am trying to load some info into a table.
    my.dtd:
    <!ELEMENT ROWSET (ROW*)>
    <!ELEMENT ROW (ID,JPEGS?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT DESCRIPTION EMPTY>
    <!ATTLIST DESCRIPTION file ENTITY #REQUIRED>
    <!NOTATION INFOFILE SYSTEM "Files with binary data inside">
    <!ENTITY file1 SYSTEM "abc.jpg" NDATA INFOFILE>
    xml file:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE ROWSET SYSTEM "MY.DTD">
    <ROWSET>
    <ROW>
    <ID>1272</ID>
    <DESCRIPTION file="file1"/>
    </ROW>
    </ROWSET>
    I am using the insertXML method to do this. However, the only value that gets loaded is the ID. abc.jpg is in the same directory where I ran the java program.
    Thanks in advance.

    Sorry! wrong dtd. It should read this instead:
    my.dtd:
    <!ELEMENT ROWSET (ROW*)>
    <!ELEMENT ROW (ID,DESCRIPTION?)>
    <!ELEMENT ID (#PCDATA)>
    <!ELEMENT DESCRIPTION EMPTY>
    <!ATTLIST DESCRIPTION file ENTITY #REQUIRED>
    <!NOTATION INFOFILE SYSTEM "Files with binary data inside">
    <!ENTITY file1 SYSTEM "abc.jpg" NDATA INFOFILE>
    null

  • How can I transfer binary data from a database to another database?

    Hi all.
    I want to transfer binary data from a MS SQL Server 2000 to anohter SQL Server 2000.
    I created JDBC(table) to JDBC(stored procedure) scenario,and
    I uploaded a JPG image file to the sender table using the java program I developed.
    The JPG data was transfered to receiver,but the transfered data was broken.
    I can't not open the file correctly.
    Can XI transfer binary data using JDBC adapter?
    The sender table structure is following.
    <b>column (data type)</b>
      id  (int 4)
      binary (binary 8000)
      flag (int 4)
    The receiver stored procedure parameter is following.
    <b>parameter (data type)</b>
       id  (smallint)
      binary (binary 8000)
      flag (smallint)
    Regards.
    Yuuki

    Hi,
    <i>Can XI transfer binary data using JDBC adapter?</i>
    Ans: Yes
    Supported JDBC Types
    http://help.sap.com/saphelp_nw04s/helpdata/en/16/9dc9ac8bc72a48b80e639abaa2e497/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Mapping JDBC types to Java types
    http://help.sap.com/saphelp_nw04/helpdata/en/7d/79dfa72d1049bc963f4f272bb1638e/frameset.htm
    Regards,
    Prateek

  • How to add an image - binary data is present in data interface

    Hi,
    we have the requirement that an image (e.g. pie chart) has to be present in a print form. Based on the data, the image always differs. It is not possible to set an URL to get the image so we decided to store the binary data in the data interface.
    Is it possible to map the image control to the data structure?
    How can we store the binary content of an image in the data structure (please think about unicode and non-unicode ERP systems)?
    Do you have any idea?
    Thank you very much.
    Thomas

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • How to extract binary data from a File?

    Hello there!
    Hope I'm right here.
    I have a slight problem with a file containing text- and binary-data. At the beginning of the file is only some text followed by some html-code and at the end is some binary stuff like a pdf oder an image (jpg/gif).
    My problem is now how to split these parts and save them in the suitable format. The text and the html are no problem, but I don't know how to extract the binary data. I tried it out with an Inputstream, but I don't know how to find the exact position where the binary data begins.
    Anyone have an idea how I can solve this?
    Thanks in advance and sorry for my bad english.

    I don't believe a bullet-proof solution exists.
    If you know where the HTML ends, you may skip whitespace and then assume the rest is binary data. Or, if you know the first bytes of the binary data, you may locate those. With either of these solutions, though, you risk coming across a file where it doesn't work as expected, for example if the first byte of the binary data happens to match a whitespace character.

  • 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

  • Download file problem for binary data?

    Dear All,
    I have wrote a jsp file to do download page. I have used a piece of code from the JDC to this. This code will prompt the download dialog box each time user clicks the download button. The code itself will set the content type for different application. The code is like below:
    try
    java.io.File fileobj = new java.io.File(strFolder + strFile);
    response.setContentType(application.getMimeType(fileobj.getName()));
    response.setHeader("Content-Disposition","attachment; filename=\""
    + strFile + "\"");
    java.io.FileInputStream in = new java.io.FileInputStream(fileobj);
    int ch;
    while ((ch = in.read()) != -1) {
    out.write(ch);
    out.flush();
    in.close();
    } catch(Exception e)
    The code can download and handle text file correctly when it is openned in the text editor or inside the IE. But when a PDF file or Image is downloaded and openned in the PDF viewer or image viewer, it is corrupted and cannot be viewed. What is the problem? Any ideas?
    So, I wonder this code can handle binary data or not. It is seen like there is no different code to handle text and binary data in Java/Jsp.
    Thank you very much!
    Best Regards,
    Rockyu Lee
              

    Add following lines to .tld file (custom tag definition)
    <tag>
    <name>downloadbinary</name>
    <tagclass>org.rampally.DownloadBinaryTag</tagclass>
    <bodycontent>JSP</bodycontent>
    </tag>
    Add following line to JSP files.
    In JSP, keep one line of source. Make sure that there are no space and additional line feeds at the any where
    in the JSP files except JSP tags.
    <%@ taglib uri="/WEB-INF/taglibs/mb.tld" prefix="mytags" %>
    <mytags:downloadbinary />
    I am hoping that you have all required parameters such as fileName to download, etc.
    in your session or request object.
    Tag class ....
    public class DownloadBinaryTag extends TagSupport {
         public int doEndTag() throws JspException {
              // TODO: get binary data from filename or
              // binary data buffer from datase.
              // I am making it simple .. assume that it is a request parameter for
              // you test easily.
              String fileName = request.getParameter( "filename" );
              java.io.File file = new java.io.File( fileName);
              java.io.DataInputStream dis;
              try {
                   dis = new java.io.DataInputStream(new FileInputStream(fileName));
              } catch (FileNotFoundException e) {
                   // do error handling ...
                   return EVAL_PAGE;
              BinaryUtil.sendBinaryFile( dis, (HttpServletResponse) pageContext.getResponse(), contentType );
              return EVAL_PAGE;
    public class BinaryUtil
         static public void sendBinaryFile( DataInputStream dis,
                                  HttpServletResponse response,
                                  String contentType ) {
              try {
                   response.setContentType(contentType);
                   String fileName="test.pdf";
                   response.setHeader("Content-disposition", "inline; filename=" + newFileName );
                   ServletOutputStream sout = response.getOutputStream();
                   int len;
                   byte[] data = new byte[128 * 1024];
                   while ((len = dis.read(data, 0, 128 * 1024)) >= 0)
                        sout.write(data, 0, len);
                   sout.flush();
                   sout.close();
              } catch (Exception e) {
                   System.out.println(e.getMessage());
         static public void sendBinaryFile( byte[] data,
                                  HttpServletResponse response,
                                  String contentType ) {
              try {
                   response.setContentType(contentType);
                   String fileName="test.pdf";
                   response.setHeader("Content-disposition", "inline; filename=" + newFileName );
                   ServletOutputStream sout = response.getOutputStream();
                   sout.write(data);
                   sout.flush();
                   sout.close();
              } catch (Exception e) {
                   System.out.println(e.getMessage());
    You may have to change 'inline' to 'attachment' if you do not want IE to inline the document.
    That's all!!.. Hope this helps...!

  • Map binary data (PDF) to XML not possible due to non-printable chars

    Hi XI Gurus,
    we have the following issue.
    We send a PDF as binary data (as a hex string '25255044462D3' ) along with some other information from ERP within one RFC to XI , doing a message split 1:n for those two kind of messages (1. the PDF, 2. the XML) an send the split messages to file/ftp receiver adapter.
    The message split and sending of the messages is working well, but we encounter some problems with non-printable chars (hex code below 0x20) in the pdf binary. The PDF data and the dynamic file name is mapped into an XML. But the non printable characters are converted into '#' when mapped into the XML target field.
    (Due to the 1:n multi mapping, we cannot put the filename into dynamic configuration, so we have to map the pdf and the filename into an XML and extract the content with variable substitution in receiver file adapter....)
    My question is: how can binary data with non-printable chars be sent through XI and can be mapped into an XML without beeing replaced by '#' ?
    Any help will be greatly appreciated.
    Thanks and regards
    Holger

    Maybe I didn´t explained it clearly enough.
    We do not have the issue that the RFC puts the '#' into the string. We got from the RFC a hex string containing the pdf as visible hex values like:
    As you can see we have the pdf as hex string. During message mapping XI replaces some non-printable chars like '0x04' or '0x19' with '#'.
    My question is: how can we avoid those char replacement ?
    BTW: I grabbed a pdf with sender file adapter, routed through XI without any mapping and send it with ftp in binary mode. But the pdf contains more chars as the origional file and the pdf content is not visible when opening with a pdf reader like Acrobat. I guess the file adpter has problems with carriage return and linefeed chars. Some CR and LF are replaced inserted somehow.
    Best regards,
    Holger

  • How to use Binary data in Oracle(OLE DB)?

    I have the Oracle 8.1.6, I can store VARCHAR2 or CBLOB into oracle database(by DBTYPES_STR). But can NOT store binary data(DBTYPES_BYTES)such as RAW, BLOB into database. My platform is VC++,ATL,OLE DB, consumer. I try to use the Oracle tools to do that, but do not successful? Can you tell me how to store data into binary column in oracle?
    Thank you

    Better to trim those values after the form submission.
    Once you put them into form,
    user may also makes mistake by hitting space, right?
    Also, by trimming all form fields after submission, you will
    be sure that your DB is clean... no whitespaces on it.
    Well unless someone insert data directly onto it :)

  • Oracle 9.2.0.8 Binary Data Problem

    Hi Folks,
    need some advice from the experts here about an error I got yesterday while installing a (Java-based) Software at a customer using Oracle 9.2.0.8.
    While being able to work with the database most of the time, I get an error when trying to save binary data. Unfortunately I don't have access to the DB-logs, so I hope the log I have may raise a thought or two from anybody and that may help me bring some light into the darkness I'm poking in at the moment.
    <log>
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:962)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:894)
         at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:103)
         at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:693)
         at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:731)
         at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:535)
         at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:440)
         at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.close(DelegatingStatement.java:168)
    </log>
    I searched around and got some results about
    - codepage: The DBA told me that the DB is using "cp1252", so I tried to use both ISO-8859-1 and UTF-8 (both are supported by the application)
    - Session Management: Tried to raise/decrease the limits for idle/maximum connections and the DBA told me to set the parameter "SESSION_CACHED_CURSORS=0", but unfortunately this is not possible when using a connection URL "jdbc:oracle:thin:@..."
    So... if anybody has an idea what to check or ask the DBA to change or almost anything, I'd kindly welcome the feedback.
    Thanks,
    enni

    Hi Sybrand,
    thank you for your clarification for the codepage!
    And no, I don't think that I found a new issue, just wasn't able to find a good answer on the net and after trying to get an evaluation copy (just for the install and first tests) of Oracle 9, the support told me "No way.".
    And yes, you're definitely right, it should be buried.
    But we all know that there are companies out there that allow new applications tests on thier "good'old" DB. Guess that is exactly what happens here.
    Maybe somebody else reads this and had similiar problems in the past, so I keep this "open" for just some more time.
    Thanks,
    have a good time!
    enni

  • Binary Data type in Logical - Is it a bug?

    Binary Data type in Logical - Is it a bug?
    Hi ,
    I am using SQL DM 3.0.0.665. I need your thoughs on following.
    I have an attribute in logical model with binary datatype. As I generate physical, SQL DM putting the column in BLOB data type. I thought binary means 1 bit ON/OFF type.
    What is the interpretation?
    Thanks in helping us out.

    I thought binary means 1 bit ON/OFF typeYou can check mapping of logical type to native database types in "Tools>Types administration". Data Modeler comes with set of predefined logical type and their purpose is to cover all native types in supported databases.
    Nothing can stop you to change predefined types if you don't like them or/and to create your own types.
    In the case of "Binary" - it's introduced to cover "binary" type in MS SQL Server - it's sequence of bytes not bits or bit.
    Philip

  • SAP DMS: Read document binary data stored in a 3rd party repository

    Hi,
    I'm totally new regarding SAP DMS and I'm a bit confused about what can or can't do, so maybe the question will be quite generic and unclear.
    The scenario in my company is that we have multiple repository servers where we store our documents. When a document is created or modified in one of these repositories a new record is also created/modified in SAP DMS, but this DMS entry only contains the basic metadata information and a URL link to the document, not the content. When the user is in SAP DMS, the only way to access the document content, is via the link that will open the browser outside of SAP GUI and access the repository data using the laptop credentials.
    I would like to know if DMS provides some kind of interface to be able to access the document content from SAP. Now we only have this unidirectional interface from the repository that creates the record in DMS with the metadata but there is nothing to retrieve the content.
    Our main purpose is that we want to download all the files linked to a user (we have a logic to determine if a DMS file is linked to a user). The content of these files may be stored in different content repositories. So I would like to read the binary data in SAP from the different repositories and then be able to download it.
    Thank you in advance for your help.
    - Marçal

    Hi Sagar,
    This FM can't work since there is nothing configured in SAP to access to the file content. The DMS record only has a URL pointing to it.
    Actually what I want to know is what do I have to configure in SAP in order to be able to use a FM like the one you mentioned.

  • Binary data in xml document

    Hi,
    I have some tables and I store binary data in varchar2 column. I want to create xml document from one of the table using xsql. What will happen to binary data? Can xml document takes care of binary data? I will appreciate, if I get the answer/solution for this.
    Thanks
    Prasanta De

    Hi,
    I have some tables and I store binary data in varchar2 column. I want to create xml document from one of the table using xsql. What will happen to binary data? Can xml document takes care of binary data? I will appreciate, if I get the answer/solution for this.
    Thanks
    Prasanta De

Maybe you are looking for

  • My dock is empty.  How do I get the icons back?

      The dock still appears to be there, but there are no icons.  I can tell the dock is there by the size of the distorted screensaver image when I minimize or enlarge the dock.  I tried to drag app icons into the dock area but they don't stick (the co

  • Problem accessing web service, error 2032 Stream Error

    I'm building a small flex app hat uses two web services provided by the same coldfusion CFC. I've verified that I can successfully access the web services via HTTP, and one of the web services actually does work when called. Both return structures th

  • What is Link Speed?

    I am using a Macbook Pro and in my Utilities->Network Utility you can check the network connection you are using. Well, I can use ethernet(hardwired connection) or a wireless connection(through my airport extreme 802.11n router). When I look in the n

  • How can I synce photos to my ipad2?

    I want to transfer my photos from my PC into my ipad2. what should mI do? Itune does not seem to have an option for photos.

  • Yacht Management Application

    looking for a contract developer to build a "basic" labview application to monitor systems onboard yachts.  maybe 6 or so different types of inputs from sensors like J1939 interfaces on engines and generators, serial outputs RS432 and 232 from severa