Siebel EAI: Create a account with EJB3.x using AccountAttachment Business Service
来源:互联网 发布:2016程序员有前途吗 编辑:程序博客网 时间:2024/05/20 13:07
This is a new feature in 8.1.1. And since my env is not a published release, may be you cannot achieve same thing in your env. However, may be you can approach this functional in 8.2 in future.
1. Go to Siebel Code Generator to generate EJB codes for BS:AccountAttachment. You can find this toolkit in Siebel Tools.
2. Deploy your EJB to application server
3. following is my codes of creating 1000 accounts.
package accountattachment;import com.siebel.data.SiebelException;import com.siebel.ejb.jca.accountattachment.AccountAttachmentSessionEJBRemote;import com.siebel.integration.util.JCASessionProperties;import java.util.Hashtable;import java.util.ArrayList;import javax.naming.Context;import javax.naming.InitialContext;import javax.naming.NamingException;import javax.rmi.PortableRemoteObject;import com.siebel.local.account.Account_AttachmentIC;import com.siebel.local.account.AccountIO;import com.siebel.local.account.AccountIC;import com.siebel.local.account.Document;import com.siebel.service.jca.accountattachment.QueryByExampleInput;import com.siebel.service.jca.accountattachment.QueryByExampleOutput; //.QueryPageOutput;import com.siebel.service.jca.accountattachment.InsertInput;import com.siebel.service.jca.accountattachment.InsertOutput;import com.siebel.service.jca.accountattachment.InsertInput;import com.siebel.service.jca.accountattachment.InsertOutput;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;public class AccountAttachment_Insert1000Accounts { private static InitialContext jndi ; private static void init() throws Exception { Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL, "t3://localhost:7101"); ht.put(Context.SECURITY_PRINCIPAL, "weblogic"); ht.put(Context.SECURITY_CREDENTIALS, "weblogic1"); jndi = new InitialContext(ht); } private static AccountAttachmentSessionEJBRemote getEJBHome(String EJBName) throws NamingException { AccountAttachmentSessionEJBRemote m_cf_home = (AccountAttachmentSessionEJBRemote)PortableRemoteObject.narrow(jndi.lookup(EJBName), AccountAttachmentSessionEJBRemote.class); System.out.println("m_cf_home " + m_cf_home.toString()); return m_cf_home ; } private static void createAccount(String accountName) throws NamingException { AccountAttachmentSessionEJBRemote m_cf_home = getEJBHome("yxyTest.AccountAttachmentSessionEJB") ; ArrayList<AccountIC> ioc = null; AccountIO objAccountIO = new AccountIO(); InsertInput objInsertInput = new InsertInput(); InsertOutput objInsertOutput = new InsertOutput(); objInsertInput.setfLOVLanguageMode("LIC"); objInsertInput.setfViewMode("All"); JCASessionProperties objJCAEJBStructure= new JCASessionProperties(); objJCAEJBStructure.setSessionUserName("SADMIN"); objJCAEJBStructure.setSessionPassword("SADMIN"); AccountIC objAccountIC = new AccountIC(); objAccountIC.setfName(accountName); objAccountIC.setfLocation("Beijing"); objAccountIC.setfPrimary_Organization("Default Organization"); objAccountIC.setfAccount_Status("Active"); AccountIC[] objAccountICArray = new AccountIC[1]; objAccountICArray[0] = objAccountIC; objAccountIO.setfintObjInst(objAccountICArray[0]); objAccountIO.setfdocObjInst(null); objInsertInput.setfSiebelMessage(objAccountIO); objInsertOutput = m_cf_home.Insert(objInsertInput, objJCAEJBStructure); } public static void main(String[] ars) throws Exception { init() ; for(int i=1 ; i<=1000 ; i++) { createAccount("Account_"+i) ; } }}
- Siebel EAI: Create a account with EJB3.x using AccountAttachment Business Service
- Siebel EAI: Siebel Fusion EAI Outbound Web Service
- Siebel EAI- Web Service 常见错误汇总
- Siebel Error: Unable to create the Business Service ''(SBL-DAT-00227)
- Create Siebel Inbound Web Service
- Using a Single Business Pattern with the RUP -part1
- Using a Single Business Pattern with the RUP -part2
- Using a Single Business Pattern with the RUP -part3
- Using a Single Business Pattern with the RUP -part4
- Using a Single Business Pattern with the RUP -part5 (end)
- Siebel Tools: Create Custom MiniButton Using Tools
- Siebel Exception: Method 'FieldValue' of business component 'Account Attachment' (integration component 'Account Attachment') re
- Java communicates with VRML using EAI mode
- Invoke a workflow using Siebel server script
- EAI Siebel Adapter - Query Page
- Siebel EAI: [SiebelJCAAdapterBase.invoke()] javax.resource.spi.CommException: Unable to open a connection to Siebel(SBL-JCA-0012
- Using XML with Legacy Business Applications
- Siebel Tools: Create new LOV Type and Values & Create Static Picklist Using Tools
- 关于线程同步(Lock)
- spring的控制反转
- SCCM 中的网络唤醒 (Wake on LAN)
- 两种查询数据库内第N条数据的方法
- Windows下如何将服务器目录映射到本地驱动器
- Siebel EAI: Create a account with EJB3.x using AccountAttachment Business Service
- LED
- 我们身处如此火热的一个时代--弄潮儿远远大于白领
- sprintf用法总结
- 自定义对话框java.awt.Dialog
- C++Builder中不规则窗体的快速显示
- 关于使用存储过程的一些好处以及注意事项
- 条码公司的互联网业务调查分析及展望
- 我们身处如此火热的一个时代--弄潮儿远远大于白领2