FILE- WEBSERVICE- JDBC Sceanrio
Hi All,
have file to webserivce sceanario
i am using this Webserice to insert the records into the oracle databse.(not using the JDBC recievr adapter because of some size limitations)..so i can only use websrivce for this to insert
Now the table has five columns field1 field2 field 3 input_xml and output xml
and webservice will insert the records into field 1 field 2 field 3 and input xml and output xml will be blank
Now i need invoke the javastored procedure by passing the value from field 1 from the record inserted along with some other parametes
this perticular java stored procedure will create output_xml in the output xml column and will be placed against the same record that was inserted from the webservice.
finally need to send this output xml back to the file systems.(sender)
currently i ahve configured the indivisual sceanrios one for webserivce and other for the invoking the stored procedure
i need to make club into a single sceanrio(FILE->WEBSERICE->INVOKE JAVA STORED PROCEDURE-SEND OUTPUT XML TO SENDER FIEL SYSTEM) where in after the webserivce has inserte the record successfully,need to invoke the java stored procedure and send the output XML back to the sender(file system)
is this possible w/o using BPM.?
if i have to use BPM..what will be steps in the integration processa nd the the ID.
> is this possible w/o using BPM.?
No, this is not possible without BPM.
> if i have to use BPM..what will be steps in the integration processa nd the the ID.
search for related weblogs
Similar Messages
-
Can't read special characters in an excel file using JDBC
Hi! I 've a code to read an excel file using JDBC-ODBC bridge. I can read the values, but any special characters is readed wrong, just symbols. The special characters are of spanish language. This is my code:
Locale currentLocale;
currentLocale = new Locale("es", "MX");
Locale.setDefault(currentLocale);
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=comisionesperfiles.xls");
stmnt = c.createStatement();
String query = "Select * from [Hoja1$]" ;
ResultSet rs = stmnt.executeQuery( query );
while( rs.next() ){
String valor = rs.getString(2) ;
if(valor != null && !"null".equalsIgnoreCase(valor)){
if(!comisiones.contains(valor)){
System.out.println(valor);
comisiones.add( valor );
rs.close();
stmnt.close();As you can see, I've tried to set the locale, but it didn't work.
I'm using Excel 2003, Java Version 1.4.2_07 and Windows XP Professional (in latin american spanish).
Hope someone can help me!FYI: Apache's POI can read/write Excel files in Java:
http://jakarta.apache.org/poi/index.html -
Test cases for File to JDBC scenario?
Hi Experts,
I would like to know what are the things needs to be tested to ensure that the File to JDBC scenario holds good in the PI box. Your valuable inputs are required to verify /check my scenario configuration is free of errors.
Thanks & Regards,
Pcv.Hi,
You can try the following:
1) If the end systems require authentication and the same is not provided in PI then it should throw an error.
2) Check what happens when you dont give a mandatory field.
3) check what result you will get when you give a wrong input.
4) Check whether all your restrictions (in mapping and/or in receiver determination) are working properly.
5) Check what you need to do when the target system is down.
6) If using any FCC then check whether the conversion is done properly.....
7) See to it that you have defined a proper DB structure when you are communication with JDBC
8) Check with the end system whether your statement (Insert/Update/Delete etc) is performed properly
Regards,
Abhishek.
Edited by: abhishek salvi on Dec 4, 2008 9:58 AM -
File to JDBC - JDBC database not getting updated using UPDATE_INSERT
Hi ,
I have a done a file to JDBC Scenario.File is successfully picked up by sender file channel and recieved by reciever JDBC channel.There is no error in receiver communication channel.I used UPDATE_INSERT action in mapping which has to update the database with all records it recieve.But,i found there is no update in Database table.I donot have access to database,so i made a sender jdbc channel querying all data in it to see what new value is populated.
I made a dummy sender jdbc channel to check what are the values updates on the run of above interface.But , i found no update occur.Please help me out of this problem.
Thanks
Deepak JaiswalThe reason I ask , because you will see whether the message got successfully delivered to the target system.
I want to see information like below
2010-04-14 14:31:35 Success Message successfully received by messaging system. Profile: XI URL: http://server:port/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
2010-04-14 14:31:35 Success Using connection JDBC_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
2010-04-14 14:31:35 Success Message successfully put into the queue.
2010-04-14 14:31:35 Success The message was successfully retrieved from the receive queue.
2010-04-14 14:31:35 Success The message status set to DLNG.
2010-04-14 14:31:35 Success Delivering to channel: Communuication channel
2010-04-14 14:31:35 Success MP: Entering module processor
2010-04-14 14:31:35 Success MP: Processing local module localejbs/CallSapAdapter
2010-04-14 14:31:35 Success Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
2010-04-14 14:31:35 Success JDBC adapter receiver channel CC: processing started; party , service DB_BS
2010-04-14 14:31:35 Success Database request processed successfully
2010-04-14 14:31:35 Success MP: Leaving module processor
2010-04-14 14:31:35 Success The message was successfully delivered to the application using connection JDBC_http://sap.com/xi/XI/System.
2010-04-14 14:31:35 Success The message status set to DLVD.
raj. -
Error in file-webservice- file (Error: java.lang.NullPointerException)
Hi everybody,
I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
File - RFC - File without a BPM - Possible from SP 19.
I have used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
1 communication channel for sender file
1 for receiver soap
1 for receiver file
Error: java.lang.NullPointerException
What could be the reason for this error
thanks a lot
RamyaHi Tanaya,
I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
1 sender ftp channel
1 receiver soap channel
1 receiver ftp channel.
2009-12-16 15:02:00 Information Send binary file "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
2009-12-16 15:02:00 Information MP: entering1
2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
2009-12-16 15:02:00 Information RRB: suspending the transaction
2009-12-16 15:02:00 Information RRB: passing through ...
2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
2009-12-16 15:02:00 Information Trying to put the message into the call queue.
2009-12-16 15:02:00 Information Message successfully put into the queue.
2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
2009-12-16 15:02:00 Information The message status was set to DLNG.
2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
2009-12-16 15:02:02 Error The message status was set to FAIL.
Now, the error is internal server error.What can I do about this?
thanks a lot
Ramya -
Error in File-XI-JDBC Scenario
Dear All,
I am working on File-XI-JDBC scenario which is using stored procedure (SP_UPDATE). When I am processing the file it is giving me the following error in the message monitoring:
Unable to execute statement for table or stored procedure. 'SP_UPDATE' (Structure 'Statement') due to java.sql.SQLException: ERROR: Invalid XML document format for stored procedure: 'type="<SQL-type>"' attribute is missing for element 'access' (Setting a SQL-type (e.g. INTEGER, CHAR, DATE etc.) is mandatory !)
Please guide me what is this error all about and how this can be resolved.
Warm Regards,
N.JainDear All,
Now, I am able to update the SQL Server database but only one record is coming at the target. Can anyone please guide me what is he error in my Data types o in my mappings. Following is the source Data Type:
MT_TEST_FILE_T179T 1..1 DT_TEST_FILE_T179T
ROOT 1..unbounded
PRODH 1..unbounded xsd:string
VTEXT 1..unbounded xsd:string
DATUM 1..unbounded xsd:string
Following is the target Data Type:
MT_TEST_JDBC_T179T 1..1 DT_TEST_JDBC_T179T
STATEMENT 1..1
SP_UPDATE 1..1
action required xsd:string
TABLE 1..1 xsd:string
PRODH 1..unbounded xsd:string
type optional xsd:string
VTEXT 1..unbounded xsd:string
type optional xsd:string
DATUM 1..unbounded xsd:string
type optional xsd:string
Following are the mappings done:
EXECUTE-->@action
storedprocedurename-->TABLE
PRODH-->PRODH
VTEXT-->VTEXT
DATUM-->DATUM
CHAR-->@type.
With this stucture and mapping i am able to insert only one recored in the database even though there are multiple entries in the file.
Please guide me in solving this error so that multiple records can be inserted.
Warm Regards,
N.Jain -
Strange error in File-XI-JDBC scenario
Dear All,
I am working currently on File-XI-JDBC scenario and is facing with a stange problem.
I have writtern one simple query which is downloading the data from R/3 and is sending to XI Server local folder. From that folder File is getting picked by XI and is posted into SQL database.
Now, when I am generating the required file from R/3-DEV server then my scenario is getting executed successfully but if file is generated thru R/3-QAS Server then the scenario is giving the following error "Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MARA_UPDATE' (structure 'Statement'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Error converting data type nvarchar to smalldatetime."
Also, if I am copying the complete data from the error file and paste it into a new file and executing again then the scenario is executing correctly.
I have checked the payload and didn't find anything there.
Kindly help me in solving this error.
Regards,
N.JHi Farooq,
Thanx for your reply. But this scenario is running when we are sending the file from R/3-DEV Server and also if I am copying all the contents of the error file and pasting it into a new file and then processing the file then the scenario is getting executed and I am getting no error with the same data which I have processed earlier and has thrown error.
Reg, -
Hi All,
I am doing a File to JDBC scenario, where sender side message type occurance is 0..unbounded and receiver side message type occurance is 1 in message mapping. The whole scenario working fine when both sender and receiver side message type occurance is 1 in message mapping.
When Sender side occurance is 1.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_smtjdbc_sender xmlns:ns0="http://SmartJDBC">
<NAME>A</NAME>
<DEPT>B</DEPT>
</ns0:mt_smtjdbc_sender>
When Sender side occurance is 0..unbounded.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">
<NAME>Dip</NAME>
<DEPT>xi</DEPT>
</ns1:mt_smtjdbc_sender>
</ns0:Message1>
</ns0:Messages>
If I use Sender side occurance as 0..unbounded I am getting the following error in adapter engine Communication channel monitor (for receiver communication channel)
Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
Can anybody please help me how to solve this problem?
DipankarHi,
My Sender side structure as follows.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:mt_smtjdbc_sender xmlns:ns1="http://SmartJDBC">
<NAME>DIp</NAME>
<DEPT>XI</DEPT>
</ns1:mt_smtjdbc_sender>
</ns0:Message1>
</ns0:Messages>
My corresponding Receiver side structure as follows.
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:mt_smtjdbc_receiver xmlns:ns1="http://SmartJDBC">
<Statement>
<dbTableName action="INSERT">
<TABLE>SMARTOP</TABLE>
<access>
<NAME>DIp</NAME>
<DEPT>XI</DEPT>
</access>
</dbTableName>
</Statement>
</ns1:mt_smtjdbc_receiver>
</ns0:Message1>
</ns0:Messages> -
Hello XI Gurus,
Thanks for all the help so far. Right now I am in the process of doing file to jdbc scenario. I am following this link: /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
<b>I am getting the follwoing error in the JDBC adapter monitoring:</b>
Receiver Adapter v2606 for Party '', Service 'JDBC_Service':
Configured at 16:31:32 2006-09-08
Last message processing started 16:47:07 2006-09-08, Error: TransformException error in xml processor class, rollback:
Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
SXMB_Moni says that the message has been processed succesfully.
Here are my data:
<b>Here is my Source XML(XI is picks this xml file thru file adapter):</b>
<p2:data_filesender_MT xmlns:p2="http://filetojdbc">
<EMPID>JDK</EMPID>
<EMPNAME>JohnDoe</EMPNAME>
<EMPAGE>3</EMPAGE>
<FLAG>Yes</FLAG>
</p2:data_filesender_MT>
<b>Here is my target XML (in the message mapping test window)</b>
<p2:data_jdbcreceiver_MT xmlns:p2="http://filetojdbc">
<STATEMENTNAME>
<Table1>
<action>INSERT</action>
<TABLE>Table1</TABLE>
<access>
<EMPID>JDK</EMPID>
<EMPNAME>JohnDoe</EMPNAME>
<EMPAGE>3</EMPAGE>
<FLAG>Yes</FLAG>
</access>
</Table1>
</STATEMENTNAME>
</p2:data_jdbcreceiver_MT>
Please let me know what I am doing wrong:
Regards,
N.SHi Swamy,
As Bhavesh mentioned check the mapped xml message i.e JDBC message structure. By seeing the your post, you mentioned action as a element. It should be attribute.
<p2:data_jdbcreceiver_MT xmlns:p2="http://filetojdbc">
<STATEMENTNAME>
<Table1 action = INSERT</Table1>
<TABLE>Table1</TABLE>
<access>
<EMPID>JDK</EMPID>
<EMPNAME>JohnDoe</EMPNAME>
<EMPAGE>3</EMPAGE>
<FLAG>Yes</FLAG>
</access>
</Table1>
</STATEMENTNAME>
</p2:data_jdbcreceiver_MT>
In this Table1 should be your Table Name.
To know more
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
btw what is the error in the RWB->message monitoring->Message DisplaY tool . also check JDBC communication channel in the Adapter monitoring
Regards,
Moorthy -
Dear All,
I have working on a file to JDBC scenario, while i am executing the scenario I am getting the following error message in receiver JDBC.
Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
Regards,
NithiyanandamDear All,
Now that I able to insert the record into the oracle database. But the problem is I am able to insert only one record at a time and not multiple records.
My mapping is like this
Source Target
MT_Sender_File(1 to1) MT_Receiver_JDBC(1 to 1)
row (1 to unbound) Statement(1 to 1 Not mapped to any field
EMPNAME(1 to unbound) EMPLOYEE(1 to 1 Tablename mapped to row)
EMPNUMBER(1 to unbound) action(Attribute required mapped to INSERT)
AGE(1 to unbound) access(1 to unbound mapped to row)
***(1 to unbound) EMPNAME(1 to unbound mapped to EMPNAME)
EMPNUMBER(1-unbnd map to EMPNUMBER)
AGE(1 to unbound mapped to AGE)
***(1 to unbound mapped to ***)
But stl im not able to insert multiple records.please let me know how to insert multiple records in this structure.
Regards,
Nithiyanandam -
Hi All
I am trying to configure File to JDBC Adapter to insert data in the database .I am having problem with message mapping.I get the error with the statement field in mapping .Please can anyone let me know what mapping changes need to be done
My Mapping is as follow
SOURCE TARGET
MT_INFO_DATA----
>MT_JDBC_REC
Header----
> Statement
TABLENAME
Update_insert----
>Action
T_EMPLOYEE(TABLE NAME)----
> TABLE
ACCESS
EMP_NO----
>EMP_NO
COMP_ID----
>COMP_ID
BRANCH----
>BRANCH
Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
Please can anyone let me know what is to be mapped with the field STATEMENT.
Thanks
AmitHi Bhavesh
I did as suggested but still i am getting the following error
Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: ORA-01861: literal does not match format string
- 2007-05-24 06:21:17 IST: Processing started
- 2007-05-24 06:07:48 IST: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found
- 2007-05-24 06:07:48 IST: Processing started
- 2007-05-24 06:05:48 IST: Error: TransformException error in xml processor class: Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format: structure 'STATEMENT', no key element found -
What is the best way to load a csv file using JDBC link? Right now I basically read a line and insert it, batching it doesn't seem to speed it up either.
Thanks
Brian Timothy
nullHai !
I think i can help u in this as i have done almost the same thing...
In Oracle for importing the data from other databases there is one bulk insert command ie SQLLDR...This commands takes parameters as a Control File(*.ctl) and data file ie(*.csv) ......You can get more help on it on the site if you search for SQL Loader....
But i think it cann't be executed from StoredProcedure's so what i am doing is running this command from my java application using Runtime.exec("SQLLDR...................") .
I think this will help you ...You are always welcome for any more clarifications....
Regards
Brijesh Kumar
SSI-Technologies -
ABOUT MAPPING IN FILE TO JDBC?
can any one give me how the mapping takes place between file structure and jdbc structure ,
from where we will get receiver side structure(JDBC SIDE) and
How the data in file is mapped and
Where we store stored procedure and data.
How stored procedure is executed. and data is transfered to the database.
I am expecting answer in full detail.Hi,
Please see below links
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
Regards
Chilla.. -
Error comming in File to JDBC scenario.
Hi Frnds,
I am trying to do the File to JDBC scenario and is using the SQLServer.
After processing the message, it is showing executed successfully in moni but for the receciver communication channel i am getting the error like---->
Error during database connection to the database URL 'jdbc:sqlserver://10.112.132.211:1433;databaseName=DemoDB' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://10.112.132.211:1433;databaseName=DemoDB': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
What could be the possible solution for it.
Thnx
Raj.Hi Raj,
As Prateek mentioned, the error you are getting is because of an improper installation of a driver.
Check out the doc for the driver installtion steps : [How To Install and Configure External Drivers for the JDBC & JMS Adapters|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f]
Also, the following thread contains some more useful links : Re: What's necessary to connect SQL server to XI?
Thanks,
Pooja Pandey -
Hi all
I am trying to do a simple File to Jdbc scenario.table has 2 fields empno and empname.i am able to insert records into the database successfull without any data in empname ,but when trying to insert a record with value in empname it is giving me the error " Error when executing statement for table/stored proc. 'EMPLOYEE' (structure 'STATEMENT'): java.sql.SQLException: ORA-00984: column not allowed here ".
empname in database is of type varchar and length 100
and in IR it is of type string.
plz help me in resolving the issue
<It is against the rules of Engagement to post a question with the catch of awarding points. Please refrain from the same.>
Regards
Bhasker
Edited by: Bhavesh Kantilal on Dec 3, 2008 10:26 AMHi all
Thank u for response and feedback.
my xml payload in adapter engine looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:employee_MT xmlns:ns0="http://filetojdbc.com/employee">
- <STATEMENT>
- <EMPLOYEE action="INSERT">
<table>EMPLOYEE</table>
- <access>
<EMP_NO>2548</EMP_NO>
<EMP_NAME>abc</EMP_NAME>
</access>
</EMPLOYEE>
</STATEMENT>
</ns0:employee_MT>
is anything wrong in this payload.?
as mentioned earlier i am able to insert data without the any value in <EMP_NAME>
please help me in resolve this issue.
Regards
Bhasker
Maybe you are looking for
-
i have an ipod touch linked to laptop, i now want to add another ipod touch how do i do it using same email etc, but dont want the same apps etc as the first ipod. as it is now i have exactly the same stuff on both ipods. please help.
-
I have one TABLE with TABLE MAINTENANCE GENERATOR and it has also LOCK OBJECT. Now I have adjusted the table by making some normal fields as primary keys and regenerated Table maintenance generator , It seems to me lock object also adjusted( I am a
-
I am trying run a dvd on my new Macbook Air, I am running the dvd from my iMac but it is slow and not running correctly. Any suggestions on running dvd's from the network to the Macbook Air?
-
Spl gl / alternate recon / true co obj / stats co obj relationship & setup
hi, i quite confused of the following and i do hope to get explanation if there is any RELATIONSHIP of these 3 and also where and how to create/setup: 1 special gl acc 2 alternate recon acc 3 what should i consider the statement below? it is account
-
We don't want replicated sales order to r/3
Hi!! We are working in a CRM Standalone scenario. When we create a sales order in CRM it tries to replicate the document to R/3, then the document is locked by the system. And we can not do any changes in the sales order cause "The document is being