1、OSBOracle Service Bus安装配置手册Oracle Service Bus安装配置手册目 录1 Oracle Service Bus 安装 42 Oracle Service Bus域配置 113 开发环境准备 163.1 Server配置 163.2 建立Oracle Service Bus 配置项目及项目 173.3 建立记Log的Java项目 203.4 配置WebLogic Server的连接池(记Log要用) 223.5 配置Queue(对帐交易中用到) 233.6 建立对Socket Transport的支持 293.7 电子支付平台与码头接口配置 344 接口说明
2、 414.1 接口需求文档 414.2 Oracle Service Bus接口描述 415 服务配置过程及测试 425.1 工行实时扣费及划帐服务配置(ICBCServices) 425.2 工行对帐服务配置(BatchServices) 615.3 电子支付平台到码头服务配置(SCTService) 646 使用和对接 711 Oracle Service Bus 安装点击osb103_weblogic103_win32.exe建立BEA Home选择Custom方式,并选择所有选择安装JDK2 Oracle Service Bus域配置启动配置向导configuration wizard
3、(program-Oracle WebLogic-WebLogic Server 10gr3-Tools-Configuration Wizard)选择Create a new WebLogic domain,然后Next选择Workshop for WebLogic10.3和Oracle Service Bus,然后Next输入WebLogic管理控制台用户名密码(weblogic/weblogic),然后Next选择域的运行模式,缺省开发模式,然后选择相应的JDK,然后Next选择Next输入域名称和所在目录,选择Create,直到完成,选择DoneOracle Service Bus的域
4、配置完成.3 开发环境准备3.1 Server配置打开workshop(Program - Oracle WebLogic - Workshop for WebLogic 10gr3),在Servers的视图中选择新建选择Oracle WebLogic Server v10.3,然后Next配置域路径直到出现配置server过程完成3.2 建立Oracle Service Bus 配置项目及项目选择File-New-Oracle Service Bus Configuration Project输入项目名,比如EPSProject1选择EPSProject1,右键建立Oracle Servic
5、e Bus项目输入项目名称,然后Finish在新建立的Oracle Service Bus项目下如图建立以下目录(Folder),分别是BusinessServices,ProxyServices,ServiceAccount,Tranformation,WSDL,Jar分别作为以下用途BusinesssServices:用于存放定义的Business Services,接入后端服务ProxyServices:用于定义Proxy Services,提供前端调用接口ServiceAccount:用于定义ftp的访问需要的用户名密码Transformation:用于存放和定义在过程中发生的数据转换
6、WSDL:用于存放WSDL文件Jar:用于Java Callout,主要是通过Java Callout方式来记日志3.3 建立记Log的Java项目 首先先在数据库表中建立osblog表Create table osblog(Transno varchar(20),Message varchar(200),Transdate date); 在WebLogic console中建立到数据库的连接池,JNDI设置为XE 建立Java Project,注意在build路径下加入weblogic.jar 先建立一个osbutility的package,然后新建OsbLogMessage类,代码如下:p
7、ackage osbutility;import java.sql.Connection;import java.sql.SQLException;import java.sql.Statement;import java.util.*;import javax.naming.Context;import javax.naming.InitialContext;public class OsbLogMessage /* * param args */ /*public static void main(String args) / TODO Auto-generated method stub
8、 */ public static boolean log(String transno,String mess) Connection con = null; Statement stmt = null; int val = 1; try Context ctx = null; Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,weblogic.jndi.WLInitialContextFactory); ht.put(Context.PROVIDER_URL,t3:/localhost:7001);
9、 ht.put(Context.SECURITY_PRINCIPAL, weblogic); ht.put(Context.SECURITY_CREDENTIALS, weblogic); ctx = new InitialContext(ht); javax.sql.DataSource ds= (javax.sql.DataSource) ctx.lookup(XE); con = ds.getConnection(); String sql = insert into osblog values(+transno+,+mess+,sysdate); System.out.println(
10、sql); stmt = con.createStatement(); val = stmt.executeUpdate(sql); catch (Exception e) System.out.println(e.getMessage(); finally try if (stmt != null) stmt.close(); if (con != null) con.close(); catch (SQLException e) System.out.println(e.toString(); if (val != 0) return false; return true; 3.4 配置W
11、ebLogic Server的连接池(记Log要用)打开WebLogic Server管理控制台http:/localhost:7001/console新建Services-JDBC-DataSource其他选择缺省设置,并且设置用户名密码,测试通过部署到AdminServer就可3.5 配置Queue(对帐交易中用到)1) 选择Services-Messaging-JMS Modules,建立CHModule选择部署到AdminServer2) 新建JMS Servers同时部署到AdminServer3) 在CHModule中建立ConnectionFactory4) 然后新建Queue5
12、) 选择新建Subdeployment如图完成3.6 建立对Socket Transport的支持1) 先在cmd下转到需要部署的Oracle Service Bus domain目录(如E:beauser_projectsdomainsCH_domainbin),运行SetDomainEnv.cmd2) 在cmd下转到相应的Socket Transport的安装目录(如E:beaosb_10.3samplesservicebussample-transport),修改在E:beaosb_10.3samplesservicebussample-transportsrccombeaalsbtra
13、nsportssock中的SocketTransportUIBinding.java,主要修改方法为: (蓝色)public boolean isServiceTypeSupported(BindingTypeInfo bindingType) return true; /* try BindingTypeInfo.BindingTypeEnum type = bindingType.getType(); if (type.equals(BindingTypeInfo.BindingTypeEnum.MIXED) BindingTypeInfo.MessageTypeEnum response
14、MessageType = bindingType.getResponseMessageType(); if (responseMessageType != null) if (!( BindingTypeInfo.MessageTypeEnum.TEXT.equals(responseMessageType) | BindingTypeInfo.MessageTypeEnum.XML .equals(responseMessageType) return false; BindingTypeInfo.MessageTypeEnum requestMessageType = bindingType.getRequestMessageType(); if (requestMessageType != null) return BindingTypeInfo.MessageTypeEnum.TEXT.equals(requestMessageType) | BindingTypeInfo.MessageTypeEnum.XML.equals(requestM
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1