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

Similar Messages

  • Synchronous-Asynchronous Interface with Java Proxy

    Hi Gurus!!
    I have an Interface which begins on SAP with a call to an asynchronous ABAP Proxy . Xi sends the message to Java Proxy Server. This Java Proxy Server calls to a Java Proxy Client that sends the response to SAP through XI. This response is taken on SAP on ABAP Proxy Inbound.
    These arquitechture is a requirement, because the time between the request and the response could be 30 minutes and the user shouldn't be waiting the response synchronously.
    Is there any way to the user could manage the response in the same "thread" that he opened in the request?
    I hope have been clear enough.
    Thanks and regards,
    Manuel Míguez.

    The only possibility I could think of is using correlation. There also you have the limitation of java proxy as it does not support adapter modules. Could you use SOAP for your scenario?
    JMS receiver could use inherent properties to define correlations. But as your case is non-JMS, you have to define it manually. Say, if your receiver system is X, then the request from XI to system X should carry its message ID information. While X created the response message, it should use this message ID as the correlation ID for the response message. This could be achieved using an adapter module.
    I guess you were not looking for such a complex solution.
    Regards,
    Prateek

  • Problem with Java Proxy and Socket Connection

    Hi Gurus!!
    I have developed a Java Proxy that connects via socket with a Server Socket application. This Server Socket application accepts more than one connection at the same time.
    When I connect the first time from my Java Proxy, the connection is correctly established. When the first connection opened, if a try a second connection, this is not established.
    I use "new Socket(SocketServer,SocketPort);" to open the connection.
    I think that all time the Java Proxy is trying to open the same connection, and this is a problem.
    Is there a way to indicate to the server that is a new connection and that the existing connections remain?
    Anybody could help me, please?
    Thanks and regards,
    Manuel Míguez.

    Sorry!!!!i must give you more information.
    The error which i have when i push the submit button is
    HTTP Status 404 -
    type Status report
    message
    descriptionThe requested resource () is not available.
    GlassFish Server Open Source Edition 3.0.1
    My thought is that the error is in this line
    String connectionURL = "jdbc:mysql://localhost/mybooking";in mysql when i write this code then the table opens with no problems:
    mysql>show databases;
    mysql>usebooking;
    mysql>showtables;
    mysql>describe booking;Furthermore i have added in my web application the library mysql JDBC driver my-sql-connector-java-5.1.6.bin.jar
    Edited by: 813355 on Nov 22, 2010 1:50 AM
    Edited by: 813355 on Nov 22, 2010 2:00 AM

  • How to handle blob data with java and mysql and hibernate

    Dear all,
    I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
    now my code is :--
    ==================================================
    *.hbm.xml :--
    <property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
    ===================================================
    *.java :--
    package com.shrisure.server.usertype;
    import java.io.OutputStream;
    import java.io.Serializable;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.BLOB;
    import org.hibernate.HibernateException;
    import org.hibernate.usertype.UserType;
    import org.jboss.resource.adapter.jdbc.WrappedConnection;
    import com.google.gwt.user.client.rpc.IsSerializable;
    public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
    private static final long serialVersionUID = 1111222233331231L;
    public int[] sqlTypes() {
    return new int[] { Types.BLOB };
    public Class returnedClass() {
    return byte[].class;
    public boolean equals(Object x, Object y) {
    return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
    BLOB tempBlob = null;
    WrappedConnection wc = null;
    try {
    if (value != null) {
    Connection oracleConnection = st.getConnection();
    if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
    InitialContext ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
    Connection dsConn = dataSource.getConnection();
    wc = (WrappedConnection) dsConn;
    // with getUnderlying connection method , cast it to Oracle
    // Connection
    oracleConnection = wc.getUnderlyingConnection();
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    tempBlob.open(BLOB.MODE_READWRITE);
    OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
    tempBlobWriter.write((byte[]) value);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    tempBlob.close();
    st.setBlob(index, tempBlob);
    } else {
    st.setBlob(index, BLOB.empty_lob());
    } catch (Exception exp) {
    if (tempBlob != null) {
    tempBlob.freeTemporary();
    exp.printStackTrace();
    st.setBlob(index, BLOB.empty_lob());
    // throw new RuntimeException();
    } finally {
    if (wc != null) {
    wc.close();
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    final Blob blob = rs.getBlob(names[0]);
    return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
    public Object deepCopy(Object value) {
    if (value == null)
    return null;
    byte[] bytes = (byte[]) value;
    byte[] result = new byte[bytes.length];
    System.arraycopy(bytes, 0, result, 0, bytes.length);
    return result;
    public boolean isMutable() {
    return true;
    public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
    return assemble(arg0, arg1);
    public Serializable disassemble(Object arg0) throws HibernateException {
    return disassemble(arg0);
    public int hashCode(Object arg0) throws HibernateException {
    return hashCode();
    public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
    return replace(arg0, arg1, arg2);
    =================================================================
    can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..

    Moderator action: crosspost deleted.

  • Passing File sender adapter paylaod to Java Proxy

    I have scenarion that I am getting files from a file adapter and I am not using "File Content Conversion" so file adapter is not converting into any dataType I created for this Scenario to run. The receiver is the Java Proxy as you know the java proxies has input as the MessageType. since we are not mapping incoming file content to any message types then java proxies will not receive the actual Payload.
    Question is, How is pass this file content to Java Proxies. 
    Appreciate your help.
    thanks,
    laxman

    hi,
    if you want to put the whole message then you
    try this:
    - put the whole file into one field (with content conversion)
    - then map this one field to one of the fields
    fo the java proxy and insinde the java proxy
    you will have access to the whole not converted message
    Regards,
    michal

  • RFC lookup with java proxy class, how do I use "fromXml()"?

    Hi,
    I'm trying to do an RFC lookup in XI using java proxy classes (SAP Enterprise Connector).
    The XMLPayload comes from a java proxy class which has been converted to xml using a method called
    .fromXml() for this. I just don't know how to use and I can't find any documentation for it.
    Would very much appreciate if someone could provide me with an example of how to use this class
    Best Regards
    Olof Trönnberg

    http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStreamer.html#fromXML(com.thoughtworks.xstream.io.HierarchicalStreamDriver,%20java.io.Reader)

  • Porblem with Java Proxy EJB deploy to XI through NWDI

    Situation - I have a web app in Server A (WAS7), it needs to call a java proxy in Server B (XI WAS7). I want to deploy the Java Proxy EJB into the landscape using NWDI. To do this I created an external library with public parts that contains the required jars to build the java proxies. These are aii_msg_runtime.jar, aii_proxy_xirt.jar, and aii_utilxi_misc.jar. The EJB module used part is mapped to the library's public parts. Everything builds fine and the deployment was successful into XI.
    Problem - When my web application makes a remote call to the java proxy in XI, NoClassDefFoundError occurs. The first jar that it complain about was aii_util_cimaccess.jar. I included this jar into the library and redeployed. Called the java proxy again, and got another NoClassDefFoundError exception. Now it wanted the lrcclient.jar. I included that into the library and redeployed. Now it wanted another jar. The issue is that all these jars are in the XI server and I shouldn't have to add them as part of the library. Is there a SCA out there that contains these jars, or did I just forget to mark a checkbox somewhere when creating the EJB so that it would reference the XI jars without me adding them to the library?
    Note - This architecture works fine without having to add the jars above, if I deploy the Java Proxy EJB from my workspace to XI through the SDM process available through NWDS. This only breaks when I deploy through NWDI.
    Thank you in advance.

    HI,
    please see the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bc7f08e1-0901-0010-b1bd-80966009d8f0
    http://help.sap.com/saphelp_nw2004s/helpdata/en/40/00be09879f114aa1ec46c2afa4445b/frameset.htm
    To add On-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9221b490-0201-0010-0e90-8cc75cde876c
    http://help.sap.com/saphelp_webas630/helpdata/en/cb/f4bc3d42f46c33e10000000a11405a/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eaeb475d-0c01-0010-f5a4-d7a8eb185793
    Regards
    Chilla

  • Message Inbound with Java Proxy

    Hi all,
    I try looking for java proxy example code to write a whole inbound message into file. But I can't to find it. I try with these blogs but still confuse.
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    /people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
    Could you please to help and give me a example code?
    Thanks and Regards
    Park

    Hi,
    Refer this link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06315a6-e66e-2910-039c-ba8bbbd23702
    I hope this would help you

  • Parsing data with java is killing me

    i created some data in notepad
    which contains :: embedded in the data
    my loop gets to the :: and does not see the ::
    while
    (Strpos < (line.length() ) ) {
    index = Strpos +2;
    colons = (line.substring(Strpos, index)) ;
    System.out.println(colons);// i can see the value i'm looking at here
    if (colons != "::")
    displayline.append(line.substring(Strpos, Strpos + 1));
    Strpos++;
    the pgm always executes the displayline.append.
    is this because i created the data in notepad
    i'm really getting discouraged with java.

    Essentiallly what you're trying to do here is compare Strings. By using the == operator (or != in your case), what you are actually comparing is the address location, which is always going to return true for you, since the address are going to be different (not equal for your code example). Try changing your if statment to the following:String colonMatch = "::"
    if(!colons.equals(colonMatch)) // if you current search is not equal to a pair of colonsUsing the equals() method does a character by character comparison, which is what you are needing. I've made this mistake myself a few times, so no worries.
    James

  • Get html data with java

    Ok say I want to get some kind of data from a html page? How could it be done? Is this possible with java, or do I have to use some kind of scripting language?

    It looks like what you might be looking for is a method of getting HTTP, not HTML, data. HTML is simply text and can therefore be retrieved any way that a File could be retrieved (using a FileReader/FileWriter). HTTP, on the other hand, is the protocol that we use the most when viewing websites.
    If you're looking to make HTTP request, you may want to look into something like java.net.HttpURLConnection. Try searching these forums for HTTP, not html.

  • Sender JDBC Adapter with Mutiple SQL Database Tables.

    Hi All,
    My requirement is SQL->PI7.0->BI.
    I have a plan to go with the senario like this : JDBC sender->SAPPI->ABAP Proxy.
    And also I need fetch the data from more than 10 data tables with different database tables with key fields.
    Could you please suggest me, How to extract all tables data to SAP PI System. Either need to go with Stored procedures or Any Join conditions or each table like as one Interface.
    Please provide me your suggestions.
    Regards,
    Chandra

    Hi ,
    Chandra ,
    Best way is Database Views
    Involve a Database guy in your scenario : Tell DBA the fields required , tell DBA the PrimaryKey and ForeignKey Relation Between All your 10 Tables.
    DBA will create a View for you on 10 Tables.
    So in Ur SELECT Query . you can write simply
    Select * from <ViewName>;
    And One more thing to Tell DBA to create a UPDATABLE VIEW not only READ-ONLY View.
    By this way you can way you can Update VIEW  also in UPDATE QUERY of sender Adapter...
    Regards
    PS

  • How do you send a date from java to a stored procedure

    Oracle 8.0.5
    using thin drivers
    I'm trying to pass a date to a stored procedure. Does anybody
    have an example of how to do this.
    I want to send a month-day-year 01/01/1999 to oracle to be
    inserted into the table. what should the java code look like?
    and what should the (in) line look like in oracle.
    Thanks
    Kirk
    null

    Wow. You got me there.  All of the pdfs that i have, when i tap that icon, open a drop down window with the choices of e mail or print.  I wonder if the particular pdf you are working on is somehow protected?  Try a different pdf and see if the box recats the same way.   You might also do a full shut down and just try again.  Make sure there is not an old instance of i books, or some other pdf editor sitting in the task bar, by doblue clicking the home button, and shutting down any open apps.

  • Send form data from Java class

    Hi Guys,
    Is it possible to send data using a Java class to a URL?
    Thanks

    Yes, but XML has nothing at all to do with that. Google for "java url tutorial".

  • How to send AT commands with JAVA?

    Hi,
    to get the cell id on a mobile phone I would like to send "AT+CREG=2" as an AT command to the mobile phone.
    Is there an API for getting network registration things like the cell identification of a gsm mobile phone or is there a possibility to access the mobile phone with AT commands?
    In MIDP 2.0, there is the possibility to access serial ports of a mobile phone. Probably this will work?
    I would be glad, if anyone could give me an idea. I'm investigation since weeks.
    greetings,
    Ralf.

    Hi
    i really don't know, but when i read your posting i thought that this may not be possible because it would break the java security concept.
    I guess, if you'd like to get any plattform/device related information you would need to have a vendor/device specific api.....
    but as i said, i don't know, i just guess...

  • Export and import table data with Java

    I need a library for simple exporting and importing table data.
    The data should be exported to a SQL file with insert statements.
    I just want to tell the library the table name, the connection and where to store the file. The usage should be very simple.
    Are there any small libraries for this? Finished calsses and methods which I can just call?

    I need a library for simple exporting and importing
    table data.
    The data should be exported to a SQL file with insert
    statements.Every database has utilities to export/import data from tables. Take a look at your database manual.

Maybe you are looking for

  • PLease help me with the best product to buy, Logic Express, which one?

    Hi, I have a macbook pro snow leopard 10.6.4 with garageband 09. I need a very simple to use editing and mastering program and wondered if the logic express would be best suited to my needs. If so, Then WHICH logic express is the easiest to learn tha

  • DefaultHander cannot be resolved to a type

    Hello - I am using Eclipse to write a java mapping program but even before compilation, Eclipse IDE shows DefaultHandler as cannot be resolved to a type. I have done the following imports: import com.sap.aii.mapping.api.StreamTransformation; import o

  • How to get player's score with Adobe's Gaming SDK GameCenter ANE

    Hi! I need your help with something that should be super easy, but I really couldn't find anywhere. How do I get local player's highscore with adobe's gamecenter ane, from Gaming SDK? There is a requestScores, but in the only parameter it would make

  • The automatic filter starts/ends earlier than it should.

    I am working on a song using GarageBand'11 which i am quite familiar with and the signature of the song is 4/4. I have made quite a few songs before and have never had this problem... so i don't have a clue why this has happened. The track is using f

  • Which GUI should I install so as to login to SolMan 4.0?

    Which GUI should I install so as to login to SolMan 4.0? There are many options like 1.SAP GUI for windows 2. SAP GUI for java I want to install SAP- Netweaver 2004s on AIX 5.3(using MaxDB as Database). I choose EP, EP Core and AS Java for installing