`

Invoking UCF in custom import component

阅读更多

1)I have made some changes in the component defination. This instantiated ucf session when component is initialized.
<ucfrequired>
<events>
<!-- only one supported right now -->
<event name="onInit" enabled="true"/>
</events>
<pages>
<!-- all pages are enabled by default -->
<page name="start" enabled="true"></page>
<page name="invokeucf" enabled="true"></page>
</pages>
</ucfrequired>

 


2) Following code can be used to utilize ucf session

UcfTransportManager transportManager = UcfTransportManager.getManager();

System.out.println("is UCF required"+transportManager.isUcfRequired(this));
if ( transportManager == null ) {
System.out.println("ucfSessionManager is null ");
}
UcfSessionManager ucfSessionManager = transportManager.getSessionManager();

if ( ucfSessionManager == null ) {
}

System.out.println("Is sesssion available"+ ucfSessionManager.isSessionAvailable());
IServerSession serverSession = ucfSessionManager.getSession();

if ( serverSession == null ) {
System.out.println("serverSession is null ");
}

IRequestFactory reqFactory = serverSession.getRequestFactory();

IGetFileRequest request = reqFactory.newGetFileRequest(files[0].getPath());


serverSession.addRequest(request);


IRequestResponseIterator reqRespIter = serverSession.execute();

File file = serverSession.getTempWorkingDir();
if (file != null){
System.out.println(" FIlepath "+ file.getPath());
System.out.println(" getName "+ file.getName());
}

for (;reqRespIter.hasNext();){
IRequestResponsePair pair = reqRespIter.next();
IGetFileRequest request1 = (IGetFileRequest)pair.getRequest();
IServerResponse response = pair.getResponse();
response.getAttachmentAsFile(file.getPath()+"\\"+files[0].getName());
}



ucfSessionManager.release(serverSession);

}
catch(Exception e){
System.out.println("Error in ucf "+e);
}

分享到:
评论

相关推荐

    Error in invoking target ‘install’ of makefile ‘../dbhome_1/ctx/lib/ins_ctx.mk’ …

    在Linux CentOS7 中安装oracle 11g数据库过程中弹出错误:Error in invoking target 'install' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/ctx/lib/ins_ctx.mk'. See '/home/oracle/app/...

    修复oracle安装过程中,出现的两个错位,内含有具体操作方法和脚本fix.rar

    修复oracle安装过程中,出现的两个错位,内含有具体操作方法和脚本,两键修复Error in invoking target 'install' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/ctx/lib/ins_ctx.mk'. See '/...

    Java自定义异常案例--ExceptionManager(java源码)

    import java.awt.Component; import javax.swing.JOptionPane; /** * This class &lt;code&gt;ExceptionManager&lt;/code&gt; and its subclasses are a form of * &lt;code&gt;Exception&lt;/code&gt;. It is used to wrap all the ...

    linux上安装oracle11g详细步骤和相关报错解决办法

    如果在安装过程中遇到错误(例如`error in invoking target 'mkldflags_nt_contab.onnfgt.o' of makefile`),可以通过上传安装镜像(例如`rhel-server-6.1-x86_64-dvd.iso`)并挂载至`/mnt`目录来解决问题。...

    Invoking Matlab using Jave

    import yu3.*; public class Test { public static void main(String[] args) { Object[] x = new Object[3]; // 输入 Object[] result = new Object[1]; // 输出 yu3class theMagic = null; // 对象名,对应...

    Programm atically Invoking the OLEDB Data Link Config Dialog

    Programm atically Invoking the OLEDB Data Link Config DialogOLEDB数据连接配置对话框

    Invoking web methods from a C++ console application

    "Invoking web methods from a C++ console application"这个主题旨在教导开发者如何利用C++这一强大的编程语言与Web服务进行交互。 C++ console application是指在命令行环境中运行的程序,不包含图形用户界面。...

    Centos 7静默安装oracle 11g R2

    Centos 7静默安装Oracle 11g R2 在这篇文章中,我们将详细介绍如何在Centos 7系统上静默安装Oracle 11g R2。静默安装意味着不需要图形化界面,可以在远程服务器上实现自动安装。 关闭防火墙 ...

    CSharp_invoking_CPPs_DLL.rar_cpp c# dll 继承_csharp dll

    int YourMethod([In] int param); } // 使用COM接口 IMyInterface myInstance = (IMyInterface)new MyComClass(); myInstance.YourMethod(42); ``` 在这个例子中,`MyComClass`是C++实现的COM对象,`YourMethod`...

    catkin_make编译baxter功能包报错处理(csdn)————程序.pdf

    在ROS (Robot Operating System) 开发环境中,我们经常使用catkin工具来构建和管理项目。catkin_make是一个用于编译ROS工作空间中所有CMakeLists.txt文件的命令。在本案例中,遇到的问题是当尝试编译一个名为...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part2

    B238839 - A custom button's OnCanShow event fires in response to hot-tracking tabs if the Properties.CustomButtons.Mode property is set to cbmNone or cbmActiveTab B238639 - Localization - Localized ...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part1

    B238839 - A custom button's OnCanShow event fires in response to hot-tracking tabs if the Properties.CustomButtons.Mode property is set to cbmNone or cbmActiveTab B238639 - Localization - Localized ...

    Spring.Boot.in.Action.2015.12.pdf

    repository 153 Plugging in custom health indicators 155 7.5 Securing Actuator endpoints 156 7.6 Summary 159 8 Deploying Spring Boot applications 160 8.1 Weighing deployment options 161 8.2 Deploying ...

    D6JCQo6s2iZ9fKMI7Fa.zip

    ESP8266在线升级(OTA,Over-the-Air)技术是物联网设备更新固件的一种常见方式,允许设备通过无线网络接收和安装新的固件版本,而无需物理接触或使用USB线连接到电脑。在本例程中,“D6JCQo6s2iZ9fKMI7Fa.zip”包含...

    EurekaLog_7.5.0.0_Enterprise

    1)....Added "ECC32TradeSpeedForMemory" option - defaults to 0/False, could be changed to 1 via Custom/Manual tab. This option will switch from fast-methods to slower methods, but which take less ...

    8-07-14_MegaCLI for linux_windows

    SCGCQ00445356 (CSET) - Megacli crashes after invoking any command in SGI system with one 9280-8e and 2 quad port qlogic FC cards. SCGCQ00452383 (CSET) - New version MegaCli did not show iBBU06 over ...

    servlet2.4doc

    Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. doFilter(ServletRequest, ...

Global site tag (gtag.js) - Google Analytics