Using COM from java
hi all,
I'm trying to find a way to call functions from a C++ COM object (.tlb).
Since I don't have a clue about C++ I thought about using an API or Tool that will help me to generate the appropriate wrappers and stubs to use with java.
Does someone have any idea of an API or Tool which is suitable for the above scenario?
many thanks in advance..........
See
http://simtel.net/product.php[id]60701[sekid]0[SiteID]simtel.net
Similar Messages
-
Hi,
I already tested a sample program for calling EJB from COM.
But, I wanna test calling COM from JAVA.
Where can I get a sample for this?
Thanks in advance.attached is an example that demonstrates calling a COM
object from a JSP page.
damon
"YI Kim" <[email protected]> wrote in message
news:3be7a4a3$[email protected]..
>
Hi,
I already tested a sample program for calling EJB from COM.
But, I wanna test calling COM from JAVA.
Where can I get a sample for this?
Thanks in advance.
[JSPtoCOM.zip] -
Calling a Visual C++ COM from java
Hi all, I have a problem very strange:
I have developed , using JNI, a java class wich interacts with a COM Interface.
When I use the java class that implements jni connection form the main method in my java app, it works fine, but when I try to access this class in a different class outside main, I obtain an error creating the Com instance. Anyone knows why?
//C++ Com initialize
BOOL CECardIdWorks::Initialize()
CUtilLog oUtilLog = CUtilLog();
try
// Get our instance of the PrintServer's IDataInput interface:
HRESULT hr = m_pDataInput.CreateInstance(__uuidof(PrintServer::DataInput2));
if (FAILED(hr))
oUtilLog.NuevoLog("CECardIdWorks","InitCard","Fallo en m_pDataInput.CreateInstance.");
return TRUE;
catch (_com_error& ce)
oUtilLog.NuevoLog("CECardIdWorks","Initialize","Excepcion , Initialize exception.");
LogComError(ce);
AfxMessageBox("Initialize Exception. Exit");
return FALSE;
}This is the C++ code part.
// extract of code in ECard.cpp
//class intance
CECardIdWorks* oECardIdWorks = new CECardIdWorks();
// Initialize
JNIEXPORT jint JNICALL Java_ECard_Initialize(JNIEnv *env, jobject obj)
CUtilLog oUtilLog = CUtilLog();
oUtilLog.NuevoLog("CECard","Java_ECard_Initialize","Begining Initialize.");
if (oECardIdWorks->Initialize())
return EC_SUCCESS;
else
return EC_ERROR_NOT_INITIALIZED;
// extract of code in ECardIdWorks.cpp
BOOL CECardIdWorks::Initialize()
CUtilLog oUtilLog = CUtilLog();
try
// Get our instance of the PrintServer's IDataInput interface:
HRESULT hr = m_pDataInput.CreateInstance(__uuidof(PrintServer::DataInput2));
if (FAILED(hr))
oUtilLog.NuevoLog("CECardIdWorks","InitCard","Fallo en m_pDataInput.CreateInstance.");
return TRUE;
catch (_com_error& ce)
oUtilLog.NuevoLog("CECardIdWorks","Initialize","Excepcion , Initialize exception.");
LogComError(ce);
AfxMessageBox("Initialize Exception. Exit");
return FALSE;
// extract of code in ECardIdWorks.h
class CECardIdWorks : public CWinApp
public:
// Print Server IDataInput
PrintServer::IDataInput2Ptr m_pDataInput;
DECLARE_MESSAGE_MAP()
// Extract of code from StdAfx.h
#import "D:\Archivos de programa\Datacard\ID Works\bin\PrintServer.DLL"This is the java code part
public class ECard {
// Load the dll that exports functions callable from java
static {System.loadLibrary("ECard");}
// Imported function declarations
public native int Initialize();
public void ECard()
public static void main(String [] args)
ECard t = new ECard();
int intResult=0;
// Initialize
intResult = t.Initialize();
System.out.println("->Initialize. Return value:" + intResult);
}My problem is that, if this code
ECard t = new ECard();
int intResult=0;
// Initialize
intResult = t.Initialize();
System.out.println("->Initialize. Return value:" + intResult);is outside main method, for example, in a method of another class, I get an error like this:
Com error 80004005
Source: PrintServer.IDataInput.2
Description: Error creating instance of card object
Please help me I�m desperate... -
I've heard that you can use XPath from within Java instead of having to use it within XSLT, but I'm not sure what the syntax is?
Does anyone know?
Thanks,
Oodiimport org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
DOMParser parser = new DOMParser();
parser.parse(inputFile);
doc = parser.getDocument();
/* Search using XPATH */
String xpath = "/XpathToSearch";
NodeIterator nl = XPathAPI.selectNodeIterator(doc, xpath);
HTH,
Joe -
Accessing COM from Java using JCOM
When I tried to access a simple COM component with the com2java generated files,
I got the following error. Can someone help me with this?
<Nov 8, 2001 3:37:24 PM CST> <Error> <HTTP> <[WebAppServletContext(366665,Defaul
tWebApp,/DefaultWebApp)] Servlet failed with IOException
AutomationException: 0x80070005 - General access denied error
at com.bea.jcom.bm.b(bm.java)
at com.bea.jcom.Rpc.a(Rpc.java)
at com.bea.jcom.bf.a(bf.java)
at com.bea.jcom.Dispatch.createDispatch(Dispatch.java)
at com.bea.jcom.Dispatch.<init>(Dispatch.java)
at com.ak.jcomtest._JComTestProxy.<init>(_JComTestProxy.java:33)
at com.ak.jcomtest.JComTest.<init>(JComTest.java:105)
at com.ak.jcomtest.JComTest.<init>(JComTest.java:77)
at jsp_servlet.__jcom._jspService(__jcom.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>I did everything earlier except the second point you mentioned. Everything started
working as soon as I added a line to call com.bea.jcom.AuthInfo.setDefault() method.
I didn't think this was necessary since I already gave permissions to that user
using DCOMCNFG. Thanks for you help.
"BEA jCOM Support" <[email protected]> wrote:
>
Your jcom.log indicates you are trying to access the COM object with
Authentication
"BXDOMAIN/akumar". Add this user to the default access/launch permissions
(using
DCOMCNFG) on the machine hosting the COM object.
Also, make sure you put this in your Java code:
com.bea.jcom.AuthInfo.setDefault("BXDOMAIN", "akumar", "<password>");
"Anil Kumar" <[email protected]> wrote:
Here's the log
jCOM checkconfig 6.1 Beta - Copyright (C) 2001 BEA Systems, Inc. Copyright
(C)
1999-2001 Linar Ltd. and Intrinsyc Software, Inc. http://www.bea.com/jcom/
--- Checking OS ---
Microsoft Windows NT 5.0 (Build: 2195) Service Pack 2
--- Checking Time ---
Time: 15:20:49
Date: 11/13/01
--- opening typelib: JComTestProject.exe ---
Class Name = JComTest
Class Id = 742db055-77df-404a-a579-e0cbfd3007a7
Class Name = JComTestProject.JComTest
AppID = {742DB055-77DF-404A-A579-E0CBFD3007A7}
{742DB055-77DF-404A-A579-E0CBFD3007A7} = JComTestProject.JComTest
Implemented Categories = no value(259)
{40FC6ED5-2438-11CF-A3DB-080036F12502} = no value(259)
LocalServer32 = D:\Program Files\Microsoft Visual Studio\VB98\Projects\JCom\JComTestProject.exe
("D:\Program Files\Microsoft Visual Studio\VB98\Projects\JCom\JComTestProject.exe"
file exists)
ProgID = JComTestProject.JComTest
Programmable = no value(259)
TypeLib = {E0BF28D6-6347-4017-8D2E-52B145CE47DA}
VERSION = 2.0
--- Checking Username ---
USER:WARANGAL\akumar
GROUP:WARANGAL\None
GROUP:\Everyone
ALIAS:WARANGAL\ORA_DBA
ALIAS:BUILTIN\Administrators
ALIAS:BUILTIN\Users
ALIAS:BUILTIN\Power Users
GROUP:\LOCAL
GROUP:NT AUTHORITY\INTERACTIVE
GROUP:NT AUTHORITY\Authenticated Users
--- Checking DCOM settings ---
DCOM version supports accessing Java from COM
EnableDCOM = Y
DefaultLaunchPermission:
Access enabled for NT AUTHORITY\SYSTEM
Access enabled for NT AUTHORITY\INTERACTIVE
Access enabled for BUILTIN\Administrators
--- Connecting to SCM ---
Connecting to SCM on localhost
Connect successful
--- IP configuration ---
Hostname = warangal.bxsys.com
Address 0 = 172.18.32.102
Connecting to SCM on 172.18.32.102
Connect successful
Address 1 = 169.254.25.129
Connecting to SCM on 169.254.25.129
Connect successful
--- Winsock Information ---
Version: 202
Description: WinSock 2.0
--- Environment Variables ---
ALLUSERSPROFILE=C:\WINNT\Profiles\All Users
APPDATA=C:\WINNT\Profiles\anil\Application Data
BOOKSHELF=D:\ifor\WIN\BIN\EN_US
CLASSPATH=.;d:\mystuff\javastuff\jarz;d:\weblogic\lib\weblogic510sp6boot.jar;d:/jdk122/javamail112/mail.jar;d:/jdk122/jaf-1.0.1/activation.jar;d:/jdk122/jsdk2.1/server.jar;d:/jdk122/jsdk2.1/servlet.jar;D:\WebLogicCommerceServer3.2\classes;D:\Oracle\Ora81\jdbc\lib\classes111.zip;D:\weblogic\lib\WebLogic_RDBMS.jar;D:\Oracle\Ora81\orb\classes\yoj.jar;D:\Oracle\Ora81\orb\classes\share.zip
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=WARANGAL
ComSpec=C:\WINNT\system32\cmd.exe
HELP=D:\IBMVJava3.0\eab\;D:\IBMVJava20\eab\;D:\ifor\WIN\BIN
HOMEDRIVE=C:
HOMEPATH=\
I4_INSTALL_DRIVE=D:
I4_LANG=EN_US
IPF_PATH32=D:\ifor\WIN\BIN\EN_US
J2EE_CLASSPATH=D:\j2ee121\lib\cloudscape\cloudspace.jar;
JAVA_HOME=d:\jdk13
LOGONSERVER=\\WARANGAL
NLSPATH=D:\ifor\LS\MSG\%L\%N
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Os2LibPath=C:\WINNT\system32\os2\dll;
Path=d:\jdk13\bin;D:\Oracle\Ora81\bin;D:\Oracle\Ora81\orb\bin;C:\WINNT;C:\WINNT\system32;C:\WINNT\system32\WBEM;d:\jdk13\bin;D:\CVS;D:\ifor\WIN\BIN;D:\ifor\WIN\BIN\EN_US;D:\JavaStuff\jakarta-ant-1.3\bin;D:\BEA\wlserver6.1\jcom\bin;D:\WebGain\VisualCafe\Java2\Bin;C:\Program
Files\Common Files\WebGain Shared;D:\WebGain\VisualCafe\Bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0803
ProgramFiles=C:\Program Files
PROMPT=$P$G
StarTeam=D:\StarTeam 4.0\StarTeam.ini
StarTeamApp=D:\StarTeam 4.0
STLicense=D:\StarTeam 4.0
SystemDrive=C:
SystemRoot=C:\WINNT
TEMP=D:\TEMP
TMP=D:\TEMP
USERDOMAIN=WARANGAL
USERNAME=akumar
USERPROFILE=C:\WINNT\Profiles\anil
windir=C:\WINNT
WorkstationID=D:\StarTeam 4.0\ConnectionManager.ini
"Damon Hon" <[email protected]> wrote:
hi anil,
can you run the checkconfig tool as well
checkconfig /typelib <path to tlb> config.log
and post the log
thanks
damon
"Anil Kumar" <[email protected]> wrote in message
news:[email protected]...
Hi Damon,
I am just calling the default constructor of the com2Java generatedclass(in this
case, it is JComTest.class) from a simple JSP. I am not calling anymethods on
this component. Here are the contents of the log file.
jCOM version 6.1 Beta logger started in immediate mode at Tue Nov
13
12:32:41
CST 2001 at level 3 (VERBOSE)
License:
Classloader is bootstrap
java.version is 1.3.1
java.vendor is Sun Microsystems Inc.
java.class.path is..;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;D:\BEA\wlserver6.1\jcom\lib\jcom.
jar;D:\Projects\JCom\src
java.library.path isD:\BEA\jdk131\bin;.;C:\WINNT\System32;C:\WINNT;.\bin;d:\jdk13\bin;D:\Oracle\
Ora81\bin;D:\Oracle\Ora81\orb\bin;C:\WINNT;C:\WINNT\system32;C:\WINNT\system
32\WBEM;d:\jdk13\bin;D:\CVS;D:\ifor\WIN\BIN;D:\ifor\WIN\BIN\EN_US;D:\JavaStu
ff\jakarta-ant-1.3\bin;D:\BEA\wlserver6.1\jcom\bin;D:\WebGain\VisualCafe\Jav
a2\Bin;C:\Program
Files\Common Files\WebGain Shared;D:\WebGain\VisualCafe\Bin;
os.name/os.arch/os.version is Windows 2000/x86/5.0
1005676361251 +: New RemOxidResolver initialised for Net={{ 0x7,127.0.0.1[135]}}
Sec={}
1005676361271 +: Looking for free connection handler to 127.0.0.1[135]for
BXDOMAIN/akumar
1005676361311 : OXID Resolver started. Listening on port 3895
1005676361321 : Object Exporter binding is Net={{ 0x7,172.18.32.102[3896]},
{ 0x7, 169.254.25.129[3896]}} Sec={{ 0xa, 0xffff, }, { 0x0, 0x0,
OXID
is 1005676361311
1005676361331 +: Opening a TCP/IP connection to 127.0.0.1[135] withauth
BXDOMAIN/akumar
1005676361361 : Sending RemoteActivation request to Net={{ 0x7,127.0.0.1[135]}}
Sec={} to activate cls/iid742db055-77df-404a-a579-e0cbfd3007a7/fbcd1246-3557-4b95-8046-cfec093310b5
1005676361832 : Sending IRemoteActivation::RemoteActivation request,with
RPC
call id 2 on ipid null
1005676361892 : Received the response toIRemoteActivation::RemoteActivation
request, with RPC call id 2
1005676361902 +: Remote server's version: 5.1
1005676361942 *: Error activating742db055-77df-404a-a579-e0cbfd3007a7/fbcd1246-3557-4b95-8046-cfec093310b5:
AutomationException: 0x80070005 - General access denied error
"Damon Hon" <[email protected]> wrote:
hi anil,
can you post the snippet of java code that is calling the methods
from your COM object and post the following logs
jcom.log
- In your java code, add the following line to the start of your
initialization code.
com.bea.jcom.Log.logImmediately(3, "c:\\temp\\jcom.log");
config.log
- Run the checkconfig utility to generate this log
checkconfig /typelib <path to tlb> config.log
thanks
damon
"Anil Kumar" <[email protected]> wrote in message
news:[email protected]...
Thanks for the info. I had already done this before. I checked
everything
a dozen
times. I am not sure why this is happening. Please let me know,
if
there
are any
other ideas.
"Damon Hon" <[email protected]> wrote:
hi anil,
The exception you are getting, indicates that your java client
does
not
have
sufficient permissions to access your com component.
if you are running your java code and com component on the same
machine,
- make sure that your jcom/bin directory is in your path environment
variable
- run the DCOMCNFG tool to configure accesss for the interactiveuser
or the
user you are logged in as.
if you are not running your java code under windows, add this
call
in
your
java code:
com.bea.jcom.AuthInfo.setDefault("nt domain", "user", "password");
- use the DCOMCNFG tool to configure has dcom access to the
com
component for this user
let me know if this helps
damon
"Anil Kumar" <[email protected]> wrote in message
news:[email protected]...
When I tried to access a simple COM component with the com2java
generated
files,
I got the following error. Can someone help me with this?
<Nov 8, 2001 3:37:24 PM CST> <Error> <HTTP><[WebAppServletContext(366665,Defaul
tWebApp,/DefaultWebApp)] Servlet failed with IOException
AutomationException: 0x80070005 - General access denied error
at com.bea.jcom.bm.b(bm.java)
at com.bea.jcom.Rpc.a(Rpc.java)
at com.bea.jcom.bf.a(bf.java)
at com.bea.jcom.Dispatch.createDispatch(Dispatch.java)
at com.bea.jcom.Dispatch.<init>(Dispatch.java)
at
com.ak.jcomtest._JComTestProxy.<init>(_JComTestProxy.java:33)
at com.ak.jcomtest.JComTest.<init>(JComTest.java:105)
at com.ak.jcomtest.JComTest.<init>(JComTest.java:77)
at jsp_servlet.__jcom._jspService(__jcom.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> -
Using ByteBuffer from java.nio package
Hi,
I have a java.nio.ByteBuffer object that is returned from the C++ code, created using NewDirectByteBuffer. I would like to use this ByteBuffer object in my java code to create a WritableRaster object. I would like to avoid an array copy here as the data may be huge.
Could someone please let me know if there is a solution to this?
Thanks in advance for any help.Warning: I know almost nothing about the java.awt.image package - so please take what Im going to suggest as the throw away, off the top of my head random rambling that it is......
Could you implement a custom DataBuffer which sits on top of a NIO ByteBuffer? Already, custom DataBuffers provide access for certain data types (e.g. theres a DataBufferByte, DataBufferDouble which wrap arrays) - so I guess you could write a NIODataBufferByte - or what ever - which sits on top of a ByteBuffer.
Im not sure how this would tie in with the SampleModel though (again, I dont know anything about this area).
Hopefully someone who knows this stuff will come across this thread and actually give you some decent advice :o)
~D -
Hi there, i have an assignment for university, part of it is to send data to a perl script through a Java applet. My perl script works, as i have tested it with a HTML form, however when i try it with java, i get nothing, nothing, no errors or warnings. Im using JBuilder6.
I am convinced that there is a problem with my code and a connection is not being opened, my lecturer cant see what the problem is (im not too impressed!) so i come to you.
All the perl does is create a file called test.txt and print within it the name, email..etc from the applet.
Thanks in Advance, Dave Williams.
JAVA:
void btnSendPosting_actionPerformed(ActionEvent e) { //Send Posting Event
name = txtName.getText();
email = txtEmail.getText();
message = txtareaText.getText();
path = txtFilePath.getText();
String url = "http://localhost/cgi-bin/diag.pl";
System.out.println("Url entered");
try
theURL = new URL(url);
System.out.println("Url prepaired");
catch (MalformedURLException f)
System.out.println("Bad URL: " + theURL);
try
System.out.println("Beggining Connection...");
URLConnection connection = theURL.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.print("txtName="+name +"&txtEmail="+ email +"&txtMessage="+ message +"&txtPath="+path);
out.close();
System.out.println("End of Connection");
catch (IOException f)
System.out.println("Error Opening Connection");
} //Send Posting Close bracketHi All heres the code with the propper tags i think, as for smorgasbords comment, I realise the security issue with java, but my lecturer seems to think its a good idea. Now the java applet opens a stream to my perl script and sends it parameters which the perl script uses to create the file. So java isnt making the file on any computer, perl is creating it on the server (EasyPHP actually). The example code given by my lecturer does actually work however for reasons which neither myself or the lecturer cannot see, it just doesnt create the file (or even open the perl script for that matter, as i used a file monitor to check if the 'diag.pl' file was accessed). I hope ive cleared up any questions.
Thanks
Dave
void btnSendPosting_actionPerformed(ActionEvent e) { //Send Posting Event
name = txtName.getText();
email = txtEmail.getText();
message = txtareaText.getText();
path = txtFilePath.getText();
String url = "http://localhost/cgi-bin/diag.pl";
System.out.println("Url entered");
try
theURL = new URL(url);
System.out.println("Url prepaired");
catch (MalformedURLException f)
System.out.println("Bad URL: " + theURL);
try
System.out.println("Beggining Connection...");
URLConnection connection = theURL.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.print("txtName="+name +"&txtEmail="+ email +"&txtMessage="+ message +"&txtPath="+path);
out.close();
System.out.println("End of Connection");
catch (IOException f)
System.out.println("Error Opening Connection");
} //Send Posting Close bracket -
How can i use twain from java servlet?
dear all
iam a web developer ,iam haviving now a task to search in point pf scanning image through web (Intranet) using java
can any one tell where can i find resources how to deal with Twain using java (On web specially not from a desktop application)
i hope u can help me
Thanks in advance
Yours,
Amr
Senior Java Web developerHi,
You can try a package named: JTwain, which is available at http://asprise.com/product/jtwain.
JTwain supports all kinds of digital cameras and scanners. You can use Java to access, contorl digital cameras and scanners, and of course, to acquire images with flexible settings.
The developers' guide is available @ http://asprise.com/product/jtwain/devGuide.php
In the simplest case, one line of Java code can solve your problem.
Good luck! -
Using JNDI from Java Stored Procedures
Hi,
we want to call external services (mostly via middle tier/J2EE) from within the database (9i Rel. 2) using Java Stored Procedures and JNDI.
Does anybody have some hints/samples how to do this? Will we have to use oc4jclient.jar? If yes, how? Where can I find some more detailed documentation?
Lot's of questions...
Thank
MatthiasUh, not JNI but JNDI you asked. And use of JNI should be generally discouraged unless there is absolutely no other way (like co-located CORBA code for decoupling+speed). Can you direct me to a HOW-TO Oracle DB JVM configuration page? I want to know how to configure the internal DB JVM in a hurry.
Thank you,
Bryan -
I wanted to access the com components of Visio using java. Can anyone help me with the source code as the code will help me in understanding how it does muh better.
Hope some one has worked on this problem and have the solution ready, if so please help me.
Thanks for all the help in advance.
SandyYou need to use a java-com bridge like
Jacob -
http://users.rcn.com/danadler/jacob/
jcom - http://sourceforge.net/projects/jcom
bridge2java - ibm alpha/developerworks(i am not sure)
Hope this helps,
Ramkumar -
Connecting to AW using AWConnection from java
Hi all,
I have some java code which performs some AW manipulation based on relational tables, the code works perfectly both inside the database and externally.
The problem I have is that I don't want to have to pass the username, password, and connectstring into the java procedure. I want to take advantage of the "kprb" type connection, i.e. I want to be able to use the defaultConnection method of the Oracle driver like I would with jdbc: the session has already been connected by sqlplus
I can't work work out if this is possible via the AWConnection method, I guess it must be using a loopback type connection based on the tnsnames.
Anyone know if it can be done?
Cheers,
Mark...Hi Mark,
The AWXML api has a mode which does exactly what you want, you should create an Interaction object which contains a set of actions you want to perform. This object can then be serialized into xml by calling the writeToXML method on it. At this point, you can use the returned string to create a clob which is then passed to a pl/sql procedure called sys.interactionexecute. This procedure takes the xml as a clob and executes it in the internal jvm using the connection information from the envoker of the pl/sql procedure. -
I need to use tc/wd/webdynpro (default) DC in a Java DC. I add it in Used DCs with Build Time (and I also try with build, design, run time...), compile and deploy successfull but when I run web dynpro DC that use Java DC (deployed with J2EE DC), the class IWDNodeNotificationListener is not found.
¿What option I need to use tc/wd/webdynpro DC in runtime?Hi Sebastian,
I guess this is the problem with required class or package not defined. check this link once.
http://www.petsounds.org/sapjavadocs/webdynpro/com/sap/tc/webdynpro/progmodel/api/IWDNodeNotificationListener.html
Regards,
Anil. -
JNI : Unsatisfied Link Error using C++ from Java
Am using JNI to call a C Function which in turn creates a new C++ object and calls a method on it.
When I run the java program that calls this native method, I get a UnsatisfiedLinkError : No <lib> in java.library.path.
If I change the C function to do a simple printf instead of creating a new object , it works fine.
I am printng out the java.library.path before calling the loadLibrary method, the path is correct.
Am using Java 1.2.2 and compiling with gcc 2.7 on solaris 2.6 (Sun OS 5.6)
Any help would be appreciated. I have seen some other folks having similar problems but haven't seen any replies that seem to solve the problem.Thanks for the ldd suggestion :
This is the output from ldd
ldd -sir liba.so
find library=./liba.so; required by /usr/lib/lddstub
find library=libe.so; required by ./liba.so
search path=/user/ajax/jni (LD_LIBRARY_PATH)
trying path=/user/ajax/jni/libe.so
libe.so => /user/ajax/jni/libe.so
symbol not found: strcpy (/user/ajax/jni/libe.so)
symbol not found: strcpy (/user/ajax/jni/libe.so)
symbol not found: printf (/user/ajax/jni/libe.so)
symbol not found: printf (/user/ajax/jni/libe.so)
symbol not found: __builtin_new (/user/ajax/jni/libe.so)
symbol not found: printf (/user/ajax/jni/libe.so)
init library=/user/ajax/jni/libe.so
init library=./liba.so
libe.so is in the LD_LIBRARY_PATH
The 'man' pages for ldd say this :
Using the -d or -r option with shared objects can give misleading results. ldd does a "worst case" analysis of the shared objects. However, in practice some or all of the symbols reported as unresolved can be resolved by the executable file referencing the shared object.
Most of them seem ok, but I am wondering about "__builtin_new", anyone know what shared lib that's supposed to be in ? -
Example code for Trigering a workflow using WAPI from JAVA based tool
Hi Experts,
I am the newest guy in SAP workFlow and BAPI world. I need to trigger a workflow defined in WebFlow engine from a Java client. I know i can use JCo and to use WAPI to get workflow information but i am not sure how it works. Can you give me some example code to trigger one workflow defined in WebFlow using WAPI? If there is any alternative i am interested to know that as well.
Thanks in advance.
Regards,
RiyadhUse Function Module SWE_EVENT_CReate top trigger event that is linked with a Workflow.
<b>Please reward points if useful</b>
INCLUDE <cntn01> .
DATA:i_emp_details TYPE STANDARD TABLE OF p0001, "Employee Details
wa_request TYPE p0001, "Workarea for Employee details
v_country_grp TYPE molga, "Country SubGrouping
v_object_key TYPE sweinstcou-objkey. "Key for the buisness object ZWOBUSTRIP
CONSTANTS: c_bo_trip TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
c_event_trip TYPE swo_event VALUE 'TripCreate',
c_infy_type_1 TYPE infty VALUE '0001'.
Event Container declaration
swc_container i_event_cont.
swc_create_container i_event_cont.
Reading the INFO TYPE 0001 to obtain the
Employee details
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = i_emp_number
infty = c_infy_type_1
begda = sy-datum
endda = sy-datum
TABLES
infty_tab = i_emp_details
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SY-SUBRC check is not required as the error
handelling will be done by WorkFlow rule
resolution.
CLEAR wa_request.
READ TABLE i_emp_details INTO wa_request INDEX 1.
IF sy-subrc = 0.
Retrieving the Country SubGrouping for the employee
SELECT SINGLE molga
FROM t001p
INTO v_country_grp
WHERE werks = wa_request-werks
AND btrtl = wa_request-persk.
ENDIF.
Sending the relevant data to event container
swc_set_element i_event_cont 'EmpId' i_emp_number.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'PersonnelArea' wa_request-werks.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpSubGrp' wa_request-persk.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpTripId' i_emp_trip.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
Raising the event to trigger the workflow
v_object_key = i_emp_number.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = c_bo_trip
objkey = v_object_key
event = c_event_trip
TABLES
event_container = i_event_cont
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Thanks
Arghadip -
I cannot link my new MacMini with my TV's sound system. It's a Pioneer screen & receiver with an independent Pioneer Amp. The Mac Mini does not pick up the sound through the hdmi cable, so how do I get sound going through the MacMini so I can appreciate the music and films I want to hear. Do I need another piece of Apple kit? I have seen 'Express' on Apples web site. Surely I dont have to pay for this as well?
I used to have an Apple TV box which had a seperate audio connection from my Pioneer Amp and it worked great.
Help will be appreciatedThe Mac Mini is going to be used for an Internet connection on the Pioneer Plasma/receiver so I can also play stored films from a seperate hard drive. The receiver has an HDMI connection which I have connected the Mac Mini too. the picture is fine, but there is no sound. I have checked the 'sound' settings on the Mac Mini and it registers the Pioneer PDP receiver is connected but states it has no audible connection?
Maybe you are looking for
-
Can 2 users on one computer share 1 itunes music folder?
There must be a way to do this, I just can't seem to find the answer. The reason I need to do this is my ancient PowerBook only recognizes my new iPhone on one userid, not the one where all my music is loaded. Thanks in advance for any help you can p
-
Editing a XML file with PHP and HTML or AS2
Hi webmates... I have been looking for a good tutorial on managing an XML file through Flash (AS2) or HTML and PHP... but all of what I have found at the moment are very confusing and incomplete... the examples actually do not work ok... Would anyone
-
Payment Medium Workbench Variants (SAPFPAYM)
Hello all, We have been succesfully using the PMW for some months now, so I am familiar wih the customizing. However, due to new customer requirements, we need the user to be able to select the variant for SAPFPAYM in F110. I know that it is maintain
-
How do I count entries in contacts?
In old contacts, the space bar in contacts search gave the number of contacts in that subset. How to I do this in Mavericks?
-
Duplicating a record and writable once setting
Hi, In my vendor repository we have a field that is set to writable once which should mean that once you have saved the record the first time you can not edit this field anymore. When I duplicate a record, to make a new vendor and need to change this