Java proxy to send binary data

Hi guys,
I needed a small clarification.
I'm using java proxy sender and file receiver in a scenario. I want to pick up binary files (i.e. the file could be of any format text,zip,pdf, image etc) using jakarta commons api to connect to ftp and then call the proxy to send this file data via proxy.
I'm not clear on how this requirement can be achieved or it can be achieved or not.

Hi Stefan,
I'm referring to the comments given by Michal in the below blog.
[How to send any data (even binary) through XI, without using the Integration Repository|How to send any data (even binary) through XI, without using the Integration Repository]

Similar Messages

  • How to send binary data in the message body

    How can we send binary data in the message body that is base64 encoded? below are the requirements
    Mime Header.
    Mime-version: 1.0
    Content-Type: application/octet_stream; name=test
    Content-Transfer-Encoding: Base64
    Submission must be named "test.sub" (lowercase)
    Submission must be base64 mime-encoded
    Submission must be sent in the body of the message (not as an attachment)
    Only one submission per mail message
    No other comments should be put in the body of the mail message (other than the submission)
    I highly appreciate your help. If you can provide few examples, that will be very helpfull.
    Thanks,
    Madan

    Use Message.setContent to set the content, or use Message.setDataHandler with
    a DataHandler constructed with a ByteArrayDataSource. If the content is not
    "naturally" encoded in base64, you can enforce it by setting the Content-Transfer-Encoding
    header to "base64". Any reasonable mail reader won't care what encoding you use, as
    long as the decoded data is correct.

  • Sending Binary data using ASCII

    Hello All,
    I'm trying to control serial-interface instrument using NI-VISA with a set of ASCII codes, but the instrument reads/sends binary data only. What should I do so that the ASCII codes I send are converted into binary commands for the instrument to read, and that the data I receive is converted back into ASCII?
    Thanks in advance
    M

    Hi M,
    first you should define the words "binary commands/data". Then you should know: ASCII is binary too...
    You may work with an U8 array. You can easily convert strings to U8 arrays and vice-versa!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Sending Binary Data using HTP package

    Has anyone been successful in using the HTP package and its PUTRAW procedure to send binary data to a browser?
    Example code shows basic idea:
    create or replace
    procedure test_raw as
    output VARCHAR2(20);
    begin
    OWA_UTIL.MIME_HEADER('application/x-gzip', TRUE);
    output := 'Hello World!';
    HTP.PUTRAW(UTL_RAW.CAST_TO_RAW(output));
    HTP.FLUSH;
    end test_raw;
    I receive an empty file when called from the browser.
    What gives?

    I found my answer. I should be using wpg_docload.download_file(BLOB) to "download" a the contents of a BLOB.

  • Sending binary data from JSP (1.1)

    Hi all:
    I am using Tomcat 3.2.1 and Apache under Linux Mandrake OS.
    I have a JSP (1.1) sending binary data (GIF, PDF, DOC ..) using response.getOutputStream().write(data)
    method.
    The problem is the precompiler automatically creates the JspWriter and puts some out.write("\r\n") lines
    before I use getOutputStream method. The JVM throws an IllegalStateException because I am using both
    methods (this is from Servlet 2.2 specification).
    Must I change my code to forwarding to a servlet that make this work or is there a simple solution to
    avoid this?
    Thanks in advance.
    J.
    null

    Hi Shreeharsha
    Please refer to below docs for sending data from JSP page to RFC. In which you need to use sap connectors for connecting to SAP backend system.
    http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm
    Hope it helps
    Regards
    Arun

  • Sending binary data over RS232 without conversion to ascii

    I need to send binary data to a PIC without the data being converted to ascii. With the VISA vi's, when I want to send 11111111, it gets converted to a string "255", and is sent as "2","5","5" in ascii.
    How can I send it as one byte?

    r_keller wrote:
    @tbob: I probably shouldnt tell my customer that he's an idiot, and obviously 9 bit addressing/signalling modes seem to be not so uncommon in industry, so ur post does not really contribute to solve the problem.
    Well I wouldn't call my customer an idiot either.  I didn't know he was your customer.  Sorry.  Not every comment posted here is intended to directly solve a problem.  We are a fun loving group, and occasional ribbings take place here.  I still think that trying to use 9 bits over an 8-bit protocol is not a good way to go.  But if it is the only way, then so be it.
    r_keller wrote:
     Does the Mark or Space parity bit add another 10th bit to the command or can i only use either ODD parity/Mark/Space?
    According to the link you attached, the parity bit adds only one more bit.  If the number of bits is set to 8, then the parity is the 9th bit, and you can only use Mark or Space to force that 9th bit to either 1 or 0 respectively.  If you try to use odd or even parity, the protocol will determine the parity and change the bit accordingly, and it may not be the one you intended to send.  The start and stop bits are fixed by the protocol and cannot be used for extra data bits.
    Actually, until I read that article about using Mark and Space, I had no idea at all that sending 9 bits at a time was possible.
    - tbob
    Inventor of the WORM Global

  • Java Proxy as Sender in PI 7.1

    Hello everybody,
    I would like to build a Java Proxy as a sender in PI 7.1. To be more precise, I would like to implement an asynchronous distribution scenario from MDM to PI. I understand the process of deploying and calling a receiver Java Proxy, but currently I don't know how to do the sender proxy. I can import the PI WSDLs, but I only get methods with return parameter void, taking the PI message type as input.
         public  void modifyRecordOutA(mdm.masterdatareplication.ModifyRecordRequest modifyRecordRequest) { }
    So far so good, but somehow I have to send the data to PI, right? Could anybody tell me how to do this? Is there any documentation available that does not refer to older versions of the NWDS?
    Thanks in advance,
    Jörg
    P.D.: Hints referring to attach pictures to the request would also be welcome, if there is something special to be considered.

    Hi,
    You can have 2 types of Java proxies viz. client(putting data into xi pipeline) & server (xi pipeline sends request to these proxies.)
    From system point of view, the requirements vary in case of these two. for server proxies you can have a webas java business system and associated technical system in sld.in case of client proxies, refer SAP note #809420.
    But for a Java proxy, I would need a separate Java server(?) to run the application on, is this correct?
    You do not need a separate Java server. The basic difference between ABAP proxies and Java proxies is ABAP proxies reside on the perticular application system(CRM or R/3) but java proxies reside on SAP Web AS J2EE stack of your XI server.
    Just search SDN pointers on Java proxy developement and you will get good pointers. There is one How-to guide on service marketplace by the name "HowToWorkWithJavaProxies.pdf".
    Regarding your dev environment, you can always make use of NWDS, you need to be very much familier with EJB concepts and deployment. Check help.sap.com for more details.
    few links for java proxies
    /people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    Learning Java proxies - landscape question
    Check these links also,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    Rgds
    joel
    Edited by: joel trinidade on Feb 18, 2009 3:06 PM

  • Reg : Sending Binary data as output in GP

    Hello ,
    I developed one webdynpro Project it has interactive adobe form ,  in Guided procedures
    created CO for Webdynpro Componet(GP interface) for this form and created GP inerface also.
    But in this callable object the Requestor creates new pdf form.This PDF(means interactive form is taken as binary for pdfsource )  form has binary data.
    *How to send this binary data as output in GP. *
    Please help me out.
    Thanks
    Risha

    thanks

  • Sending binary data as attachment

    Is that possible to send binary ( which is actually fragment of a large file i.e. 100MB ) data as attachment to SOAP message ?
    The complete scenario is below.
    * I have to send a large file around 100MB, to server as a fragment as attachment of SOAP message.
    * It is received at the server and sent as such to another server ( I dont want the user to send data directly to this "another" server, call it as main server ).
    * main server will update the fragment into a stream which remains unclosed until last fragment received.
    * after receiving SOAP message ( which contains the fragment ), main server will repond 'OK' to sub server.
    * If the sub server receives OK, then it will send the next fragment until EOF.
    May be at main server I may need to check whether the file is properly received using some checksum logic.
    I hope I am making sense. I am thinking of using Axis2 ( I am totally newbie to web services). Could someone point me if I miss something ?

    thanks

  • Using a servlet to send binary data

    There is a section of our intranet that need to hold documents that have to be available only for a certain group of users. Here's my approach (if you think of a better one, please tell me):
    1-all the files are in a directory upper than WWWRoot so that nobody can directly download them
    2-there is a servlet that first: authentificate the user with username-password; and then lists all available documents.
    3-When one of these docs is clicked, I want my servlet to open the file using filesystem File object and then copy the content of the selected file in the http response body. What object and method should I use to do so? I dont know if I should use FileReader or something else. Dont forget it will not only has to work with text files, but also with binary data files like swf, powerpointpresentation and the like. So I fear that objects such as FileRead will mess special characters up and corrupt data.
    What would you advice me? Use FileReader or another object? Or maybe a completly different approach for the problem? And if you want to give me some sample codes, it would be appreciated.
    Thx for your help

    There is something I dont understand.. its bizarre. Usually I dont understand why a script is not working, but now, I dont understand why a scritp is working..
    Here are the codes that copy from a file to the servlet's ouput:
    //basic response configurations
    response.setContentType( mimeType );
    ServletOutputStream out = response.getOutputStream();
    //copy a file f to the servlet's output stream
    File f = new File( path );
    FileInputStream fis= new FileInputStream(f);
    int available = fis.available();
    byte[] b = new byte[available];
    fis.read(b);
    out.write( b );
    out.flush();
    They work fine. What I dont understand is that I tried them with a file of about 5 megs, and they still worked! I expected them to fail because the variable available is of the type int and then it implies that the maximum file size permitted by the algorithm should be 65536 bytes/1024=64 ko... isn't it????

  • Abap Proxy to Send RFC  data  -- xi - File    ,   how to do - pls help  ?

    Hi Friends ,
                           Our scenario is once in day an  RFC is to be triggered and create flat file .That RFC will return data .
       Using  below likns i have configured the RFC Sender adapter
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    First Activate the ABAP Proxy?
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    How to implement a Client Proxy?
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    My question is
    <b>     1.    Is it possible to use ABAP Client proxy   to achive this ?
          2.   Then do we need to write RFC Call in side this proxy call ?
          3.      If we go for proxy do we need RFC Sender Adpater ?</b>
            I am little confused can you please explain , as how it works ?
    <b>       Is there is any other way to trigger RFC to send data ?</b>
    Regards.,
    Shyam

    Hi sabrish ,
                          Tahnks for ur reply. I was waiting for ur response . i have doubt
    the foloowing code i got from ur blog .
    REPORT Z_TEST_RFC_XI_WEBSERVICE.data: lv_distance type char10.CALL FUNCTION 'Z_WEBSERVICE_TEST_SHABZ' <b>destination 'Z_WEBSERVICE' </b> EXPORTING FROMZIP        = '12222' TOZIP          = '22222' IMPORTING  DISTANCE       = lv_distance.write : 'Distance is : ' , lv_distance.
      <b>           1. i have to generate proxy from Out bound interface right ? inside that proxy class whare i have to in clude the code to call rfc ?
                  2. Can u please tell what is the Destination in that report.  What is z_webservice ?</b>
                  3 . Do we need to use RFC Sender adapter ? It is not related to proxy right ?
    Regards.,
    Shyam
    null

  • ABAP Client Proxy not sending the data to XI ?

    Hi Guys,
    My scenario is proxy - soap asynchronus process.
    when i execute the report on the R/3 side, i am able to see message in sxmb_moni in R/3 with the proper sender service but i could not see the receiver side.
    There is proper HTTP connection defined and it works properly with the proxy- soap synchronus scenario for another interface.
    The data is not coming into XI only for the asynchronus scenrio. I could not find any messages in XI under sxmb_moni or in RWB.
    any help would be really appreciated
    Thanks,
    srini

    Hi Emile,
    In this program there is a Bapi calls which performs the activity. I did not find any commit work. I am able to see the xml out of the proxy and in the trace i am seeing the following error
    Trace level="1" type="T">Get definition of external pipeline = SENDER</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
      <Trace level="1" type="T">Get definition of internal pipeline = SAP_SENDER</Trace>
      <Trace level="1" type="T">Queue name : XBTS0007</Trace>
      <Trace level="1" type="T">Generated prefixed queue name = XBTS0007</Trace>
      <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
      <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Going to persist message</Trace>
      <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
      <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
      <Trace level="1" type="T">- Exit CALL_PIPELINE_ASYNC</Trace>
      <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">--start sender interface action determination</Trace>
      <Trace level="1" type="T">select interface ClearingHousePaymentOrderRequest_Out*</Trace>
      <Trace level="1" type="T">select interface namespace http://sap.com/xi/APPL/SE/Global</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      </SAP:Trace>
      </SOAP:Header>
    - <SOAP:Body>
    - <SAP:Manifest xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <SAP:Payload xlink:href="cid:[email protected]">
      <SAP:Name>MainDocument</SAP:Name>
      <SAP:Description />
      <SAP:Type>Application</SAP:Type>
      </SAP:Payload>
      </SAP:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>

  • Sending binary data to Nativeprocess (C++)?

    Hello
    I am developing an AIR application, which uses lots of C++ libraries to do number crunching (OCR, taking screenshots,...)
    I need to send somehow BitmapData objects to the C++ app, and i need to do this a lot (like every 1-2 secs.)
    Until now, i've tried 3 methods, all would not work for me:
    1. Save the file to the disk in AIR, start the application, and send the file path as a parameter.
    This method is bad, its terribly slow, because of the lots of disk I/O and compression/decompression of images.
    2. Make a socket server in C++, and use sockets in Actionscript to send files.
    This method is fast, but since i use sockets, the program depends on firewall settings. (i get a "do you allow xxx.exe trough the firewall?" warning too).
    This means, that users with bad firewall settings wont be able to use my application, and it is critical for me, that not tech savvy users can use my app too.
    3. Use NativeProcess.standardinput/standardoutput to send data.
    This method is fast (although i heard, that its slower, than sockets..), but i could not figure out how to send a bytearray. 
    My best try was to receive a Bytearray containing a BitmapData:
    int bsize = width*height*4;
    char* buff = new char[bsize];
    std::cin.read(buff,bsize);
    This did not work either, the received Bytearray was always truncated at approximately its half height.
    Anyone has a good solution? I would love to use sockets, if i can avoid firewall issues somehow. Or a working example how to send a bytearray to C++ would be OK too.
    Thanks.

    the messageString = "00000011"Wild guess: this is supposed to represent the bit pattern of a byte you need to send.
    Don't use Strings at all, use bytes. This byte would be 3.
    Carrying on from the wild guess,messageString = "0000001001101111000001010001001100000011"would becomebyte[] messageBytes = new byte[] {2, 111, 5, 19, 3}

  • Send JDBC Data with Java Proxy

    Hello,
    I Have generated a Java Proxy. And the Data Source is a JDBC Table like:
    VALUE01--VALUE02--VALUE03
    ROW1-Test1----Test1----Test1
    ROW2-Test2----Test2----Test2
    Now i can set the Datatypes in XI Proxy with
    TYPE.setVALUE01("Test1");
    TYPE.setVALUE02("Test1");
    TYPE.setVALUE03("Test1");
    so i can send a XML like
    <TYPE>
    <VALUE01>Test</VALUE01>
    <VALUE02>Test</VALUE02>
    <VALUE03>Test</VALUE03>
    </TYPE>
    My Problem is to send a XML Data like
    <TYPE>
    <VALUE01>Test1</VALUE01>
    <VALUE02>Test1</VALUE02>
    <VALUE03>Test1</VALUE03>
    </TYPE>
    <TYPE>
    <VALUE01>Test2</VALUE01>
    <VALUE02>Test2</VALUE02>
    <VALUE03>Test2</VALUE03>
    </TYPE>
    How can is send more than one item throw XI Proxi?
    Any Idea or Documentation?
    Regards,
    Robin

    Hi Robin,
    Hope these links provide good help
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/java proxies and sap xi - the inside story, part 1.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/java proxies and sap xi - the inside story, part ii.pdf
    Regards
    Vishnu

  • Help - how to create java proxy (sender) in NWDS 7.1

    Hi,
    I am trying to develop a java proxy as sender to send message from WAS to PI.
    I am using NWDS 7.1. Let me explain what I have done so far,
    1. Received proxy classes from PI
    2. Created a EJB Project, imported the proxy classes into EJB project
    3. created a EJB bean, local interface in the EJB project and exposed as webservice
    4. added the ejb to an ear
    5. added reference to the following jar files (external library)
    tcaiiproxy_rt_api.jar
    com.sap.aii.af.sdk.jar
    com.sap.aii.utilxi.server.jar
    com.sap.aii.utilxi.core.jar
    com.sap.aii.proxy.svc_api.jar
    6. able to build and deploy the application
    7. able to open the webservice in wsnavigator
    Error encountered:
    "Server Exception: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sap/aii/proxy/xiruntime/core/AbstractType "
    Questions:
    1. Which method I should execute / call among all the proxy classes from local bean class to send message to PI?
    2. Is it mandatory to add refernces to the application.xml, ejb-jar.xml and other xmls ?
    3. How can I test / monitor the message being sent to PI interface?
    Thanks and best regards,
    Arun prabhu S

    plz cross chk the references under application-j2eeengine.xml and ejb-jar.xml
    http://wiki.sdn.sap.com/wiki/display/Java/JavaProxyChangesinPI7.1fromPI7.0
    u can chk tis article also:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508bb504-87cf-2c10-2aaf-f3a5df75e651?quicklink=index&overridelayout=true

Maybe you are looking for

  • Sync.me application not working

    the application "sync.me" was working properly i removed the application "sync.me" and i reinstall it from my new apple id the application is not working when i opened it it close directly

  • Urgent need of some assistance.

    i will post a code here from Table.java.. i have been reading the code for quite a few minutes now. However, i can't find the part where the JTable variable has been initialized. I believe it's this one... JTable table = new JTable(new MyTableModel()

  • Problems with Yahoo! business email since 3.0

    iPhone 3G My business email, which is served by Yahoo, is not longer able to send messages from the phone. I can receive, but when the phone tries to load the Sent message folder, I get an error. Also, when I send a message, it makes the "sent sound"

  • Installing error, also on manual Install.

    I have just updated to Mac OS 10.8.2 (Mountain lion) and updated all my CS6 Master collection and got the following errors in installing three of the products (error codes listed below): Extension Manager 6.0.4 Update Installation failed. Error Code:

  • Infotype query

    HI all        I have some queries regarding infotypes. Can any employee have more than 1 pernr and if yes what are different situation for that? In infotype 0105(communication) we have subty 0001,0010,0011 but is there any subty = 9965 in it? i have