BAPI's from BW to Java-Urgent!!
Hello Gurus,
Just wanted to know if anyone has written BAPIs or RFCs ( function modules ) to retrieve data from BW cubes so that the reports could be generated on JAVA application. Which means it doesn't have any table or field information as retrieved from R/3 but characteristics and key figures from BW cubes. I started creating function groups and function modules defining the BW cube fields as my import parameters, not sure if I am going in the right direction.
So please anyone who has faced similar scenario are more than welcome to give their input.
Thanks in advance.
Nikki
Hi Nikki!
I would recommend you to have a look at the possibility to provide the query data using a web service. You will not need to do any coding or MDX. The query data is provided in XML format. Information regarding this (and all other Open Analysis Interfaces) can be found here:
http://help.sap.com/saphelp_nw04/helpdata/en/d9/ed8c3c59021315e10000000a114084/frameset.htm
Kind Regards
Andreas
Similar Messages
-
Error connecting MDM system from XI through Java proxies-standard component
Dear Friends
We are trying to connect to the MDM system from XI through Java proxies(i.e standard components),in relation to that we have done the following:
1)registered the interfaces
a)http://XIserver:port/ProxyServer/register?ns=http://sap.com/xi/GDSConsole&interface=GDS_Data_Import_In&bean=localejbs/sap.com/GDS/DataImport&method=gDSDataImportIn
b)http://XIserver:port/ProxyServer/register?ns=http://sap
.com/xi/GDSConsole&interface=GDS_DP_In&bean=localejbs/sap.com/GDS/Dat
aPoolIn&method=gDSDPIn
2)Deployed the ears within Build10.zip, i.e
a)GDS_1.0.6.1_Build10.ear and
b)GDS_ExternalValidations_1.0.6.1_build10.ear
3)set the sap.application.global.properties file inside the GDS_1.0.6.1_Build10.ear
as follows:
SAP application properties
#!Path to GDS folder containing the configuration files
ConfigurationFilesLocation=/usr/sap/P70/DVEBMGS00/j2ee/cluster/server0/apps/sap.com/GDS
#!External validation modules (EJB names) delimited by semicolon character.
ExternalValidationModules=ExternalValidations_EJBs
#!IP or server name of MDM server
MDM.server=172.18.139.200
#!MDM repository port as appears in MDM console
MDM.port=2000
#!MDM repository name as appears in MDM console
MDM.repositoryName=GDS_1
#!version of MDM server and connector
MDM.version=5.5.42.103
#? secure=true
#! MDM Admin user password
MDM.AdminPassword=
#!Data pool name - should match a remote system defined in MDM console
DestinationDataPoolName=
#!Data pool 13 digits GLN
DestinationDataPoolGln=
#!Provider 13 digits GLN
ProviderGln=
#!Provider time zone e.g. EST
ProviderTimeZone=
#!Data pool schema URL
SchemaLocation=
#!Message Timeout
MessageTimeout=10
#!Backend import client system - should match a remote system defined in MDM console.
ImportData.ClientSystem.Name=R3
!# The format that dates will appear in the UI
#Available date formats: MM/dd/yyyy
# dd/MM/yyyy
# MM-dd-yyyy
# dd-MM-yyyy
# dd-MMM-yyyy
# dd/MMM/yyyy
# MMM dd, yyyy
Where MM=1-12, MMM=Jan,Feb,Mar,etc.
Note: Extreme caution should be taken when choosing to use month names,
# since different regional settings on the client and server machines
# will cause dates to be uninterpretable.
# It is strongly advised to use numeric month format, eg. MM-dd-yyyy, etc.
DateFormat=dd/MM/yyyy
DEBUG.SaveIncomingMessagesToFile=false
#!defines if incoming message will be saved in arc folder
DEBUG.ImportData.SaveArchive=false
#!defines if outgoing message will be saved
DEBUG.SaveOutgoingMessagesToFile=false
But still we are getting errors as:
a)com.sap.aii.af.ra.ms.api.MessagingException: com.sap.mdm.gds.proxy.dataimport.GDSConsole_Message_Exception: : com.sap.aii.proxy.xiruntime.core.ApplicationFaultException: com.sap.mdm.gds.proxy.dataimport.GDSConsole_Message_Exception
inside SXMB_MONI
when we trigger an Idoc and try to send the data inside the MDM GDS system.
and
b)Failed to send message,reason:Exception on method gDSDPOut
when we try to register something,even after the data is validated by the system.
Can anybody help??
It is of urgent requirement.
Edited by: Arjun Ghose on Jul 15, 2008 4:36 PMHi ,
I found a document which says that MDM4J is the legacy API and is considered deprecated .The MDM Java API is the new one .I have both of them in the java build path . I am not sure if this is that cause of the problem .
Now I had a look at the javadoc for the new API but I am not able to locate the class to obtain a connection to the MDM server from a custom application being built in Netweaver Developer Studio . Can someone help me out with the same ?What would be the code to obtain the connection to the MDM server with the new JAVA API ?
Regards
DeepaK Singh -
How to pass a HTTP request from a simple java class
Is it possible to pass an HTTP request from a simple java class.if yes how?
Is it possible to pass an HTTP request from a simple
java class.if yes how?If you're talking about creating a HttpRequest object and passing it to a servlet, that would be a red flag to me that your design is flawed. You shouldn't have to do that - the application server (Tomcat, Weblogic, etc) should be the only thing that has to worry about creating that kind of object and passing it to you. -
Calling SAP BAPI Interface from PL/SQL
Hi,
How can i call BAPI Interface from PL/SQL.
If you have any documents or examples please send me.
Thanks in Advance
Best Regards,
SreekanthHi !
declare
req utl_http.req;
resp utl_http.resp;
v_txt clob;
begin
req := UTL_HTTP.begin_request ('http://rp.yoc.de/http/test/mbInfo/1.0/?smsbalance=total','GET','HTTP/1.1');
resp := UTL_HTTP.get_response (req);
dbms_output.put_line(resp.status_code);
dbms_output.put_line(resp.reason_phrase);
utl_http.read_text(resp,v_txt);
dbms_output.put_line(v_txt);
UTL_HTTP.end_response(resp);
end;I'm not exactly sure what are you looking for .. but that response from your post you can get with my code ( it's tested ).
T
Edited by: ttt on 12.3.2010 5:10
My code is very "poor" , there is no error checks no header setup's no basic authentication no proxy settings ..... -
Http post to a url from a WebDynpro (Java) application
Hi,
I want to send http post parameters to a url from a WebDynpro (Java) component. I need to do this to send OCI catalog data back to SAP SRM.
I found this thread:
HTTP Post
which suggests to use the the Suspend plug for this purpose.
<quote>
Sending POST parameters with Web Dynpro Suspend Plugs
1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map
</quote>
After adding the postParams parameter of type java.util.Map to the Suspend-plug the WebDynpro gives the following error during build:
Outbound plug (of type 'Suspend') 'suspend_plug' may have at most two parameters: 'url' of type 'string' and 'postParams' of type 'Map'.
I use SAP NetWeaver Developer Studio version 7.0.16.
Does someone know a solution? I would highly appreciate it.
Thanks in advance.
EricHi,
Please have a look at this thread,
Pass Table as Input to Adaptive RFC
Regards,
Saravanan K -
Error While sending infopackages from OLTP to BI/urgent
Hi BW friends
im workin on production support and im new to it.while
running infopackage X ,it is throwing a error
error:While sending infopackages from OLTP to BI/urgent
In status tab it shows traingular yellow colour
and diagnosis says that No idocs could be sent to bi using rfc.
so if u know please reply me
Thank you
Amarnath kwhile loading data into the target we got this message and the solution is do manual update for that.
-
Running a "heavy" program from within a java class
Dear Java programmers,
I 'm trying to run a software called surflex from within a java class, using the following java command:
Runtime.getRuntime().exec( new String[ { "/bin/bash", "docking_script_2.bash"} );
For convenience I've created the following simple bash script but for some strange reason surflex is not executed:
#!/bin/bash
surflex-dock-v211-linux.exe proto drug.mol2 receptor_hydro.mol2 p1;
surflex-dock-v211-linux.exe dock drug.mol2 p1-protomol.mol2 receptor_hydro.mol2 >& 1OHR_A_output.txt;
Can anybody help me on that (ignore the arguments, they are correctly set)? I'll try to find another, more generic example, but so far I've noticed that the same thing happens with unix grep command.
thanks,
TomI think if you want to invoke a bash shell and give it a command to execute, you need to do
/bin/bash -c commandrather than
/bin/bash commandAccordingly, your call to exec should look like
exec( new String[ { "/bin/bash", "-c" "docking_script_2.bash"} );Beyond, that, I'd suggest the following as general debugging tips and best practices:
* As the first line of the bash script, include a line that does something simple, like touch a file, so you can see if the script is executing at all.
* In Java, call Process.waitFor(). Its return value is the process' exit value.
* Make sure you're gobbling stdout and stderr from the process, and giving stdin any input it needs. You'll have to do this for the process to run correctly, and you can also use what you read from stdout and stderr to debug the execution of the process. [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]
* You may wan to look into ProcessBuilder, rather than Runtime.exec. I haven't used it myself yet, but apparently it's supposed to be the preferred way to execute external processes. -
To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?
have you out.flush() and out.close() before you call connection.getInputStream()?
-
Problem with creation of a jar file from inside a java program
Hi,
I am trying to create a jar file at runtime from within a java program.
I am able to create a jar file just fine using:
String[] jarArgs = new String[3];
jarArgs[0] = "cvf";
jarArgs[1] = "C:\temp\myjar.jar";
jarArgs[2] = "C:\temp\this";
sun.tools.jar.Main main1 = new sun.tools.jar.Main(System.out, System.err, "jar");
main1.run(jarArgs);However, when I look at the jar it puts the absolute path to the files inside such as:
C:\temp\this\is\my\package\Class.class
instead of only this\is\my\package\Class.class
When running the jar command from the command line it works just fine and I have the relative paths in my jar file.
Does anyone have any experience with this and could help me out?
Thanks in advance
Edited by: mruf on Apr 11, 2008 1:51 AMShouldn't jarArgs[2] = "-C C:\temp\this"
-
How to access a file in Unix server from windows using java
I want to access a file in unix server from windows using java program.
I have the following code. I am able to open the url in a web browser.
String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
URL url = new URL(urlStr);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
String inputLine;
while((inputLine=in.readLine()))!=null){
System.out.println(inputLine);
in.close();
I get the following error
java.io.FileNotFoundException: /javatest/test.csv
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
at java.net.URL.openStream(URL.java:960)
at com.test.samples.Test.main(Test.java:45)urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file. -
BAPI Access from Excel using VBA
Im writing an excel macro (VBA) to call a bapi that populates a spreadsheet.
The user will then do some manipulation of the data collected, and then it must be sent back to sap.
The Bapi in question is BAPI_GET_USER_DETAIL
*" IMPORTING
*" VALUE(USERNAME) LIKE BAPIBNAME-BAPIBNAME
*" EXPORTING
*" VALUE(LOGONDATA) LIKE BAPILOGOND STRUCTURE BAPILOGOND
*" VALUE(DEFAULTS) LIKE BAPIDEFAUL STRUCTURE BAPIDEFAUL
*" VALUE(ADDRESS) LIKE BAPIADDR3 STRUCTURE BAPIADDR3
*" VALUE(COMPANY) LIKE BAPIUSCOMP STRUCTURE BAPIUSCOMP
*" VALUE(SNC) LIKE BAPISNCU STRUCTURE BAPISNCU
*" VALUE(REF_USER) LIKE BAPIREFUS STRUCTURE BAPIREFUS
*" VALUE(ALIAS) LIKE BAPIALIAS STRUCTURE BAPIALIAS
*" TABLES
*" PARAMETER STRUCTURE BAPIPARAM OPTIONAL
*" PROFILES STRUCTURE BAPIPROF OPTIONAL
*" ACTIVITYGROUPS STRUCTURE BAPIAGR OPTIONAL
*" RETURN STRUCTURE BAPIRET2
*" ADDTEL STRUCTURE BAPIADTEL OPTIONAL
*" ADDFAX STRUCTURE BAPIADFAX OPTIONAL
*" ADDTTX STRUCTURE BAPIADTTX OPTIONAL
*" ADDTLX STRUCTURE BAPIADTLX OPTIONAL
*" ADDSMTP STRUCTURE BAPIADSMTP OPTIONAL
*" ADDRML STRUCTURE BAPIADRML OPTIONAL
*" ADDX400 STRUCTURE BAPIADX400 OPTIONAL
*" ADDRFC STRUCTURE BAPIADRFC OPTIONAL
*" ADDPRT STRUCTURE BAPIADPRT OPTIONAL
*" ADDSSF STRUCTURE BAPIADSSF OPTIONAL
*" ADDURI STRUCTURE BAPIADURI OPTIONAL
*" ADDPAG STRUCTURE BAPIADPAG OPTIONAL
*" ADDCOMREM STRUCTURE BAPICOMREM OPTIONAL
*" GROUPS STRUCTURE BAPIGROUPS OPTIONAL
Ive Managed to glean from various sources on the internet, the various basics on doing a bapi call from VBA
Here is what i have so far.
Private Sub Fetch_User_details_Click()
'Take username in cell 2,2 and check to see it it exists.
'Display the First and Last name of the user
'Get list of all roles and their expiry dates and populate list
Dim R3, MyFunc, App As Object
Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
Dim Result As Boolean
Dim iRow, iColumn, iStart, iStartRow As Integer
'RFC Paramaters
Dim Pusername As Variant
Dim Preturn As Variant
Dim copyFromc As String
'Clear Table Section of Spreadsheet
Worksheets("Sheet1").Select
For x = 9 To 200
For y = 1 To 8
Worksheets("Sheet1").Cells(x, y).ClearContents
Next y
Next x
'Create Server object and Setup the connection
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = ""
R3.Connection.client = ""
R3.Connection.user = ""
R3.Connection.Password = ""
R3.Connection.Language = "EN"
'Logon to SAP
If R3.Connection.logon(0, False) <> True Then
Exit Sub
End If
'R3.loglevel = 9
'R3.logfilename = "c:guilog.txt"
Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
copyFromc = Worksheets("Sheet1").Cells(3, 2).Text
Set Pusername = MyFunc.exports("USERNAME")
Pusername.Value = copyFromc
'Call the BAPI
If MyFunc.call Then
' ok now what ?
' Process the returned data into the spreadsheet
Else
MsgBox ("Call returned FALSE")
End If
'Close Connection to SAP
R3.Connection.logoff
End Sub
To update the data ( User Role Assignements ) i will be using bapi BAPI_USER_ACTGROUPS_ASSIGN
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(USERNAME) LIKE BAPIBNAME-BAPIBNAME
*" TABLES
*" ACTIVITYGROUPS STRUCTURE BAPIAGR
*" RETURN STRUCTURE BAPIRET2
* Dieser Baustein ist gleichgestellt mit der Pflege eines Benutzers
* über die Pflegetransaktion, gepflegt werden die Felder, für die die
* Pflege erlaubt ist
I need help deciphering the data received from the bapi and then repackaging it using VBA.
I know writing this in ABAP would take less than 30 mins, but that is not an option for me.Ok, Ive made some headway
I can now Read all the data i need from SAP
Now comes the bit to write it back again. Will Update when i have a solution
Private Sub copydata_Click()
Dim x1 As Integer, x2 As Integer
'copy all data from "Copy From" to "Copy To"
'first determine how many rows contain roles
'before copying the roles, check that the destination user has no roles assigned
If Cells(9, 6).Text <> "" Then
MsgBox ("Error. Destination User already has Roles assigned.")
Exit Sub
End If
For x1 = 0 To 1000
If Cells(9 + x1, 1).Text = "" Then
Exit For
End If
Next
Worksheets("Sheet1").Range(Cells(9, 1), Cells(9 + x1 - 1, 4)).Copy _
Destination:=Worksheets("Sheet1").Range(Cells(9, 6), Cells(9 + x1, 9))
For x2 = 1 To x1
Worksheets("Sheet1").Cells(9 + x2 - 1, 8).Value = Date
Next
End Sub
Sub Mail_small_Text_Outlook()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
strbody = "User " & Worksheets("Sheet1").Cells(3, 7).Text & _
" Has Been Moddelled off of User " & _
Worksheets("Sheet1").Cells(3, 2).Text & " in system " & _
Worksheets("Connection").Cells(1, 2).Text & vbNewLine & vbNewLine & _
"Please Adjust Mitigating Controls Accordingly"
On Error Resume Next
With OutMail
.To = Worksheets("Connection").Cells(10, 2).Text
.CC = ""
.BCC = ""
.Subject = "User Modelled"
.Body = strbody
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Private Sub Fetch_CopyTo_User_Click()
'Take username in cell 3,7 and check to see it it exists.
'Display the First and Last name of the user
'Get list of all roles and their expiry dates and populate list
Dim R3, MyFunc, App As Object
Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
Dim Result As Boolean
Dim iRow, iColumn, iStart, iStartRow As Integer
'RFC Paramaters
Dim Pusername As Object
Dim PAddress As Object
Dim PTable As Object
Dim Preturn As Object
Dim copyFromc As String
'Clear Table Section of Spreadsheet
Worksheets("Sheet1").Cells(5, 8).ClearContents
Worksheets("Sheet1").Cells(6, 8).ClearContents
'Create Server object and Setup the connection
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = Worksheets("Connection").Cells(1, 2).Text
R3.Connection.SystemNumber = Worksheets("Connection").Cells(2, 2).Text
R3.Connection.Destination = Worksheets("Connection").Cells(3, 2).Text
R3.Connection.HostName = Worksheets("Connection").Cells(4, 2).Text
R3.Connection.client = Worksheets("Connection").Cells(5, 2).Text
R3.Connection.user = Worksheets("Connection").Cells(6, 2).Text
R3.Connection.Password = Worksheets("Connection").Cells(7, 2).Text
R3.Connection.Language = Worksheets("Connection").Cells(8, 2).Text
'Logon to SAP
If R3.Connection.Logon(0, -1) <> True Then
MsgBox ("We Had a Logon Error")
Exit Sub
End If
'R3.loglevel = 9
'R3.logfilename = "c:\guilog.txt"
Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
Set Pusername = MyFunc.exports("USERNAME")
Set PAddress = MyFunc.imports("ADDRESS")
Set Preturn = MyFunc.tables("RETURN")
Set PTable = MyFunc.tables("ACTIVITYGROUPS")
Pusername.Value = Worksheets("Sheet1").Cells(3, 7).Text
'Call the BAPI
If MyFunc.call Then
Dim xxx As String
Worksheets("Sheet1").Cells(5, 7).Value = PAddress.Value("FIRSTNAME")
Worksheets("Sheet1").Cells(6, 7).Value = PAddress.Value("LASTNAME")
'Get Assigned Roles
Dim datarec As Object
Dim datafld As Object
x = 9
For Each datarec In PTable.Rows
Worksheets("Sheet1").Cells(x, 6).Value = datarec("AGR_NAME")
Worksheets("Sheet1").Cells(x, 7).Value = datarec("AGR_TEXT")
Worksheets("Sheet1").Cells(x, 8).Value = datarec("FROM_DAT")
Worksheets("Sheet1").Cells(x, 9).Value = datarec("TO_DAT")
x = x + 1
Next
copydata.Enabled = True
Else
MsgBox ("Error Calling Function - Probably Authorizations")
End If
'Close Connection to SAP
R3.Connection.logoff
End Sub
Private Sub Fetch_User_details_Click()
'Take username in cell 3,2 and check to see it it exists.
'Display the First and Last name of the user
'Get list of all roles and their expiry dates and populate list
Dim R3, MyFunc, App As Object
Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
Dim Result As Boolean
Dim iRow, iColumn, iStart, iStartRow As Integer
'RFC Paramaters
Dim Pusername As Object
Dim PAddress As Object
Dim PTable As Object
Dim Preturn As Object
Dim copyFromc As String
'Clear Table Section and other areas of Spreadsheet
Worksheets("Sheet1").Select
For x = 9 To 1000
For y = 1 To 9
Worksheets("Sheet1").Cells(x, y).ClearContents
Next y
Next x
Worksheets("Sheet1").Cells(5, 2).ClearContents
Worksheets("Sheet1").Cells(6, 2).ClearContents
Worksheets("Sheet1").Cells(5, 7).ClearContents
Worksheets("Sheet1").Cells(6, 7).ClearContents
copydata.Enabled = False
'Create Server object and Setup the connection
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = Worksheets("Connection").Cells(1, 2).Text
R3.Connection.SystemNumber = Worksheets("Connection").Cells(2, 2).Text
R3.Connection.Destination = Worksheets("Connection").Cells(3, 2).Text
R3.Connection.HostName = Worksheets("Connection").Cells(4, 2).Text
R3.Connection.client = Worksheets("Connection").Cells(5, 2).Text
R3.Connection.user = Worksheets("Connection").Cells(6, 2).Text
R3.Connection.Password = Worksheets("Connection").Cells(7, 2).Text
R3.Connection.Language = Worksheets("Connection").Cells(8, 2).Text
'Logon to SAP
If R3.Connection.Logon(0, -1) <> True Then
MsgBox ("We Had a Logon Error")
Exit Sub
End If
'R3.loglevel = 9
'R3.logfilename = "c:\guilog.txt"
Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
Set Pusername = MyFunc.exports("USERNAME")
Set PAddress = MyFunc.imports("ADDRESS")
Set Preturn = MyFunc.tables("RETURN")
Set PTable = MyFunc.tables("ACTIVITYGROUPS")
Pusername.Value = Worksheets("Sheet1").Cells(3, 2).Text
'Call the BAPI
If MyFunc.call Then
Dim xxx As String
Worksheets("Sheet1").Cells(5, 2).Value = PAddress.Value("FIRSTNAME")
Worksheets("Sheet1").Cells(6, 2).Value = PAddress.Value("LASTNAME")
'Get Assigned Roles
Dim datarec As Object
Dim datafld As Object
x = 9
For Each datarec In PTable.Rows
Worksheets("Sheet1").Cells(x, 1).Value = datarec("AGR_NAME")
Worksheets("Sheet1").Cells(x, 2).Value = datarec("AGR_TEXT")
Worksheets("Sheet1").Cells(x, 3).Value = datarec("FROM_DAT")
Worksheets("Sheet1").Cells(x, 4).Value = datarec("TO_DAT")
x = x + 1
Next
Else
MsgBox ("Error Calling Function - Probably Authorizations")
End If
'Close Connection to SAP
R3.Connection.logoff
End Sub
Private Sub UpdateSap_Click()
End Sub -
Is it possible to call the SQL Server DB from jsp to java?
im doing a configurable system where you can create your own table using the system. i can do the creation of table by running the statement CREATE TABLE...........(with attributes) in java.
Let's say i have created tblST1 with attributes st_ID, st_Name, st_Description.
My problem is i dont know if it's possible to retrieve all the attributes from jsp to java.jverd: i need your help. Iv read all the links u posted but im having a hard time in understanding them.
For the site http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html , there's a code there which is...
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
boolean b = rsmd.isSearchable(1);
what i did was, i inserted it in my java code which is :
public boolean checkFieldTable2()
boolean checked = false;
try
IRMS_DBConnect db = new IRMS_DBConnect();
db.openCon();
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
boolean b = rsmd.isSearchable(1);
db.closeCon();
checked = true;
catch (Exception ex)
System.out.println("Error on Execution: " + ex);
return checked;
and i compiled it and there was an error that the variable stmt was not initialized. Am i doing the right way?
Can anyone help me pls? pls pls pls -
Creating simple Web Services from Plain Old Java Objects (PoJo)
This post is with reference to a sun web page at URL - http://developers.sun.com/appserver/reference/techart/ws_mgmt.html
It is a crisply written tutorial on creating a simple Java class and deploy the class as a JAX-WS 2.0 Web service.
Requires -
a) Sun Application Server - I got App Server Platform Edition 9.0_01
b) Also requires Java_Home to JDK 1.5.0 - this was something i did even though my App Server i believe is using jdk 1.6.
[The reason i know that is because when i removed jdk 1.6. directory from my C:\Java location, my app server asadmin commands would not be found. While i dont remember configuring the App Server to point to JDK 1.6. specifically, i am assuming the app server version i downloaded and installed auto installs it and uses it]
I wrote up the class as described in the tutorial.
Initially i had difficulty compiling the class, and it would error out as being unable to find the javax.jws package.
I researched the problem a little and included the jaxws-tools.jar in the classpath and that error went away.
According to the tutorial the presence of the @WebService annotation will tell the App Server to process it as such and also auto deploy it to the App Server.
However while the class file is created, the autodeploy part fails completely.
I have the entries in server.log corresponding to this javac execution stored in a separate file. Didnt know how best to attach it here.
Please help.
Best regards,Just inline the appropriate pieces of the server log.
-
Questions/answers from jsp to java bean
Hi
This is what i need to do .
I am showing some questions, say 4 of them , and radio buttons(yes/no) as answers in the JSP.
Now how do i transfer these questions and their answers from jsp to java bean .
I did try hashmap ,but not quite working .
any help?
thanksName each radiobutton differently, and then provide 1 property and accessor methods for each of your four answers in the JavaBean, with the same name as specified in the HTML FORM.
So in the HTML:
<input type="radio" name="answerOne" value="true"...>
and then have a property named answerOne with accessor methods in the javaBean... -
BPM 10.3 Studio how to use PAPI from stand alone java client
Would you help me ...., the search for the relevant information in this forum or documentation has not helped!
I'm running the BPM process via studio and trying to call it from the standalone java program.(According documentation
I need ... fuegopapi-client.jar and directory.xml )
Well, of course I could find somewhere directory.xml but it is not the right one .. What are the values(related to directory Service) which are needed to run this
java code agains the process started from the studio... ? So what I should do...? to setup and configure in BPM10.3 Studio to be able to run this code agains the
BPM process ...?
thanks a lot
Tomas
..otherwise the java code look like this ...
public static void main(String[] args) {
/////////////////// API Initialization ///////////////////
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "directory.xml");
configuration.setProperty(ProcessService.WORKING_FOLDER, "c:\tmp");
try {
ProcessService processService = ProcessService.create(configuration);
/////////////////// Establish a session ///////////////////
ProcessServiceSession session = processService.createSession("test", "test", "localhost");
/////////////////// Operate with PAPI ///////////////////
for (String processId : session.processesGetIds()) {
System.out.println("\n Process: " + processId);
for (InstanceInfo instance : session.processGetInstances(processId)) {
System.out.println(" -> " + instance.getId());
/////////////////// Close the session ///////////////////
session.close();
/////////////////// Release API Resources ///////////////////
processService.close();
} catch (CommunicationException e) {
System.out.println("Could not connect to Directory Service");
e.printStackTrace();
} catch (OperationException e) {
System.out.println("Could not perform the requested operation");
e.printStackTrace();
}Would you help me ...., the search for the relevant information in this forum or documentation has not helped!
I'm running the BPM process via studio and trying to call it from the standalone java program.(According documentation
I need ... fuegopapi-client.jar and directory.xml )
Well, of course I could find somewhere directory.xml but it is not the right one .. What are the values(related to directory Service) which are needed to run this
java code agains the process started from the studio... ? So what I should do...? to setup and configure in BPM10.3 Studio to be able to run this code agains the
BPM process ...?
thanks a lot
Tomas
..otherwise the java code look like this ...
public static void main(String[] args) {
/////////////////// API Initialization ///////////////////
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "directory.xml");
configuration.setProperty(ProcessService.WORKING_FOLDER, "c:\tmp");
try {
ProcessService processService = ProcessService.create(configuration);
/////////////////// Establish a session ///////////////////
ProcessServiceSession session = processService.createSession("test", "test", "localhost");
/////////////////// Operate with PAPI ///////////////////
for (String processId : session.processesGetIds()) {
System.out.println("\n Process: " + processId);
for (InstanceInfo instance : session.processGetInstances(processId)) {
System.out.println(" -> " + instance.getId());
/////////////////// Close the session ///////////////////
session.close();
/////////////////// Release API Resources ///////////////////
processService.close();
} catch (CommunicationException e) {
System.out.println("Could not connect to Directory Service");
e.printStackTrace();
} catch (OperationException e) {
System.out.println("Could not perform the requested operation");
e.printStackTrace();
}
Maybe you are looking for
-
My iphone 4 wont sync because it "cannot save to computer" HELP!
Whenever i plug in my iphone and try to add music it comes up with a message that says that it cannot sync becasue it cannot be saved on the computer. i know this is probably really stupid but i cant figure it out!!!
-
I need "synchronize" my music and videos from my ipod to my new laptop
I buy a new computer but I don't have my music there. Can I copy all music and videos from my iPod to the new laptop?
-
Red border around bottom of audio clip?
I added an .aif audio clip to a PR timeline (from a tutorial DVD). When I click on the clip, a thin red border appears across the bottom and left and right sides of the clip: There were some clicks in the audio. So I rendered it as a .wav file but th
-
After upgrade to ios7 my camera is gone ...How do i get it back?? HELP
-
Unable to open CR2 files in PSE8 or Bridge CS4?
Unable to open CR2 files in PSE8 or Bridge CS4? Any help would be appreciated.