cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pius Graber" <pius.gra...@ceweb.ch>
Subject Accessing ActiveX Component
Date Thu, 06 Apr 2006 09:57:56 GMT
Hi
 
I try to access an ActiveX component under Windows.
This works fine when I compile my code with javac and run it with java.
 
If I want  to use the code in an Logicsheet I get the error:
 
 
org.apache.cocoon.components.language.LanguageException: Error compiling
awix_xsp:
ERROR 1 (org\apache\cocoon\www\ojb\forms\awix_xsp.java):
...
COMClassObject.CoInitialize(); 
_DAwiX awixcomponent=new _DAwiX(); 
String application="AWIX.AwiXCtrl.1"; 
COMIPersistStreamInit init=new COMIPersistStreamInit(); 

// start error (lines 152-152) "Unhandled exception type COMException"
awixcomponent.QueryInterface(init); 

// end error
 
 
This is part of the related code:
 
 
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
 
  <xsp:structure>
    <xsp:include>java.awt.*</xsp:include>
    <xsp:include>java.util.*</xsp:include>
    <xsp:include>java.net.*</xsp:include>
    <xsp:include>com.neva.*</xsp:include>
    <xsp:include>ch.webdata.*</xsp:include>
    <xsp:include>awix.*</xsp:include>
  </xsp:structure>
 
  <page>
    <title>awix Test</title>
    <content>
      <xsp:logic>
                        COMClassObject.CoInitialize();
                        _DAwiX awixcomponent=new _DAwiX();
                        String application="AWIX.AwiXCtrl.1";
                        COMIPersistStreamInit init=new
COMIPersistStreamInit(); 
                        awixcomponent.QueryInterface(init); 
                        init.InitNew(); 
                        awixcomponent.AttachDispatch(application);
 
 
Is it possible at all to access ActiveX Coponents?
 
Thanks
 
 

Mime
View raw message