CN1767530A - adapter - Google Patents
adapter Download PDFInfo
- Publication number
- CN1767530A CN1767530A CN 200410088401 CN200410088401A CN1767530A CN 1767530 A CN1767530 A CN 1767530A CN 200410088401 CN200410088401 CN 200410088401 CN 200410088401 A CN200410088401 A CN 200410088401A CN 1767530 A CN1767530 A CN 1767530A
- Authority
- CN
- China
- Prior art keywords
- service
- message
- adapter
- module
- call
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 claims abstract description 26
- 239000000344 soap Substances 0.000 claims abstract description 16
- 230000005540 biological transmission Effects 0.000 claims abstract description 10
- 230000008569 process Effects 0.000 claims abstract description 7
- 230000003993 interaction Effects 0.000 claims abstract description 4
- 238000005538 encapsulation Methods 0.000 claims description 12
- 238000003672 processing method Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 9
- 239000002131 composite material Substances 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000010354 integration Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000000275 quality assurance Methods 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明属于应用中间件平台范畴,特别涉及一种适配器。The invention belongs to the category of application middleware platform, and in particular relates to an adapter.
背景技术Background technique
适配器主要是利用中间件技术,在遗留系统的功能组件与支撑平台之间增加一个适配器中间层,通过适配器层对遗留系统的数据、功能和协议进行统一描述,向管理平台提供统一的访问接口,从而屏蔽遗留系统之间相互访问的差异,达到不同系统之间进行互操作的目的。The adapter mainly uses middleware technology to add an adapter middle layer between the functional components of the legacy system and the supporting platform, and uniformly describe the data, functions and protocols of the legacy system through the adapter layer, and provide a unified access interface to the management platform. In this way, differences in mutual access between legacy systems are shielded, and the purpose of interoperability between different systems is achieved.
随着电信网络和技术的蓬勃发展,我国电信行业已经从高速发展的网络建设阶段逐渐转入追求网络质量保证和能够提供多种业务的良好的运营管理阶段。电信运营商们目前是采用多种电信运营管理应用软件为用户提供各种不同的服务。因此,建立能够集成多个异构的电信管理软件系统功能的电信运营管理支撑平台是十分必要的。With the vigorous development of telecommunication network and technology, my country's telecommunication industry has gradually shifted from the stage of network construction with high-speed development to the stage of pursuing network quality assurance and good operation management that can provide various services. Telecom operators currently use a variety of telecom operation management application software to provide users with various services. Therefore, it is very necessary to establish a support platform for telecom operation management that can integrate the functions of multiple heterogeneous telecom management software systems.
发明内容Contents of the invention
本发明的目的在于,为了解决了电信运营管理支撑平台在集成现有遗留的电信应用软件系统中相互访问和数据共享的异构性问题,从而提供一种适配器,以整合和集成现有的电信遗留系统。The purpose of the present invention is to solve the heterogeneity problem of mutual access and data sharing of the telecom operation management support platform in the integration of the existing legacy telecom application software system, thereby providing an adapter to integrate and integrate the existing telecom application software system legacy system.
本发明的技术方案所提供的适配器,用于实现遗留系统和新开发平台之间的交互,所述适配器,包括服务发布模块、注册模块、消息处理模块和服务调用模块;The adapter provided by the technical solution of the present invention is used to realize the interaction between the legacy system and the new development platform, and the adapter includes a service publishing module, a registration module, a message processing module and a service calling module;
所述服务发布模块,用于解析遗留系统业务组件生成相应的XML(Extensible Marked Language)格式的服务描述文件,该描述文件描述遗留系统所能提供的服务以及与该服务相关位置信息和接口参数;The service release module is used to parse the legacy system business components to generate a service description file in the corresponding XML (Extensible Marked Language) format, which describes the service that the legacy system can provide and the service-related location information and interface parameters;
所述注册模块,用于读取并解析适配器的描述文件和遗留系统的服务描述文件,并将解析得到的适配器的注册信息和遗留系统的服务信息注册到新开发平台的消息总线上;The registration module is used to read and parse the description file of the adapter and the service description file of the legacy system, and register the registration information of the adapter obtained by parsing and the service information of the legacy system on the message bus of the new development platform;
所述消息处理模块,用于根据传输协议处理消息,解析消息总线上以JMS(Java Messaging Service)协议或HTTP(HyperText TransferProtocol)协议传输的消息得到调用SOAP(Simple Object Access Protocol)消息体,和封装服务调用模块返回的调用结果的SOAP消息体;The message processing module is used to process messages according to the transport protocol, parse messages transmitted by the JMS (Java Messaging Service) protocol or the HTTP (HyperText Transfer Protocol) protocol on the message bus to obtain a SOAP (Simple Object Access Protocol) message body, and encapsulate The SOAP message body of the call result returned by the service call module;
所述服务调用模块,用于解析调用SOAP消息体,根据服务发布模块生成的服务描述文件,定位所要调用的服务并将调用结果以SOAP消息体的形式返回给消息处理模块。The service calling module is used to analyze and call the SOAP message body, locate the service to be called according to the service description file generated by the service publishing module, and return the call result to the message processing module in the form of a SOAP message body.
所述服务发布模块通过解析遗留系统业务组件的程序代码,生成服务描述文件。The service publishing module generates a service description file by analyzing the program code of the business component of the legacy system.
所述服务描述文件以XML格式描述功能组件所提供的服务的名称、服务调用类型、服务所对应的类的名称和相对位置、服务传入参数的类型和名称、返回参数的类型和名称。The service description file describes in XML format the name of the service provided by the functional component, the type of service call, the name and relative position of the class corresponding to the service, the type and name of the service input parameter, and the type and name of the return parameter.
所述服务注册模块包括适配器的注册模块和遗留系统的服务注册模块。The service registration module includes an adapter registration module and a legacy system service registration module.
所述适配器的注册信息包括适配器名称(adapterName)、适配器IP地址(addr)、适配器类型(type)、适配器编号(adapterId)、服务配置文件(Server_Config_file)。The registration information of the adapter includes an adapter name (adapterName), an adapter IP address (addr), an adapter type (type), an adapter number (adapterId), and a service configuration file (Server_Config_file).
所述遗留系统的服务注册信息包括服务的名称、服务的WSDL(Web Service Description Language)文件所在位置、服务的附加说明、服务所属的适配器的名称。The service registration information of the legacy system includes the name of the service, the location of the WSDL (Web Service Description Language) file of the service, the additional description of the service, and the name of the adapter to which the service belongs.
所述消息处理模块用于侦听来自总线上JMS协议或HTTP协议传输的消息并返回调用结果,其包括消息解析单元和消息封装单元;The message processing module is used to listen to the message transmitted from the JMS protocol or the HTTP protocol on the bus and return the call result, which includes a message parsing unit and a message encapsulation unit;
所述消息解析单元,根据消息总线的传输协议格式,选择相应的处理方式对消息进行解析获得调用SOAP消息体,并同时记录消息来源;The message parsing unit, according to the transmission protocol format of the message bus, selects a corresponding processing method to parse the message to obtain a SOAP message body, and simultaneously records the source of the message;
所述消息封装单元,根据消息总线的传输协议格式,将服务调用模块返回的调用结果的SOAP消息体封装生成消息,根据上述所记录的消息来源,通过消息总线将该消息发送到发起调用的相应业务组件或平台的相关部件相应地点。The message encapsulation unit, according to the transmission protocol format of the message bus, encapsulates the SOAP message body of the call result returned by the service call module to generate a message, and sends the message to the corresponding caller through the message bus according to the above-mentioned recorded message source Corresponding locations of business components or relevant parts of the platform.
所述接口参数包括:所要调用的服务的类名称、服务中的方法的名称、方法中输入参数的名称和类型。The interface parameters include: the class name of the service to be called, the name of the method in the service, and the name and type of the input parameter in the method.
如图1和图2所示,遗留系统或新开发组件(在此,统称为业务组件)通过适配器连接到平台的消息总线,并通过消息总线与平台的其它功能部件交互。这里,适配器的工作包含两个方面,一方面工作是将各业务组件的功能注册到消息总线以供其他组件查询;另一方面是处理消息总线对遗留系统业务组件的调用信息,并向遗留系统返回调用结果。As shown in Figure 1 and Figure 2, legacy systems or newly developed components (collectively referred to as business components here) are connected to the message bus of the platform through adapters, and interact with other functional components of the platform through the message bus. Here, the work of the adapter includes two aspects. On the one hand, the work is to register the functions of each business component to the message bus for other components to query; Return the call result.
其中,服务发布模块解析遗留系统业务组件的功能,生成相应的具有XML格式的服务描述文件。注册模块读取适配器配置文件并解析服务描述文件,将适配器信息以及其连接的业务组件的服务信息注册到消息总线上,然后等待接收总线上传来的调用信息。这样,平台上的其他业务组件可通过注册信息发现适配器连接的业务组件提供的服务。一旦总线上有SOAP信息传给适配器时,消息处理模块解析消息的内容,获取调用服务所必须的接口参数,并将这些信息传送给服务调用模块。服务调用模块按照传来的接口参数解析服务描述文件,对服务在遗留系统业务组件中的位置进行定位并调用之。最后,消息处理模块将服务调用模块返回的结果包装成总线所能传输和可识别的SOAP消息,返回给消息总线。Among them, the service release module analyzes the functions of the business components of the legacy system, and generates corresponding service description files in XML format. The registration module reads the adapter configuration file and parses the service description file, registers the adapter information and the service information of the business components connected to it on the message bus, and then waits to receive the calling information from the bus. In this way, other business components on the platform can discover the services provided by the business components connected to the adapter through the registration information. Once the SOAP information on the bus is transmitted to the adapter, the message processing module parses the content of the message, obtains the interface parameters necessary for invoking the service, and transmits the information to the service invoking module. The service invoking module parses the service description file according to the transmitted interface parameters, locates the position of the service in the business component of the legacy system and calls it. Finally, the message processing module packs the result returned by the service calling module into a SOAP message that can be transmitted and recognized by the bus, and returns it to the message bus.
由于平台的消息总线通常采用多种传输协议进行消息传输,如JMS或HTTP协议等,因此适配器需具备对这些传输协议进行自行配置的功能,以便使总线能够适应不同传输协议的需要。另外,由于各个遗留系统可能使用不同语言开发,为了屏蔽各遗留系统在传输消息格式上的异构性,消息总线上传输的消息多采用SOAP消息格式,如此,适配器需通过对遗留系统进行发布和解析等操作,以便实现对遗留系统的异构数据的不同处理方法和处理协议的统一描述,最终实现对遗留系统的集成。Since the message bus of the platform usually uses multiple transport protocols for message transmission, such as JMS or HTTP, the adapter needs to have the function of self-configuring these transport protocols so that the bus can adapt to the needs of different transport protocols. In addition, since each legacy system may be developed in different languages, in order to shield the heterogeneity of the transmission message format of each legacy system, the messages transmitted on the message bus mostly adopt the SOAP message format. Parsing and other operations, in order to achieve a unified description of the different processing methods and processing protocols for the heterogeneous data of the legacy system, and finally realize the integration of the legacy system.
本发明的优点在于,本发明采用适配器技术来屏蔽异构系统在数据、方法和协议上的差异,对遗留系统进行集成和整合,实现了异构系统之间的相互访问和协作,异构信息的共享以及支持新开发业务组件的即插即用以及动态发现,实现遗留系统与运行平台之间的互通。本发明也可应用于需要系统集成及异构系统相互访问的其他行业中。The advantage of the present invention is that the present invention uses adapter technology to shield the differences in data, methods, and protocols of heterogeneous systems, integrates and integrates legacy systems, and realizes mutual access and collaboration between heterogeneous systems, and heterogeneous information Sharing and support for plug-and-play and dynamic discovery of newly developed business components to achieve intercommunication between legacy systems and operating platforms. The invention can also be applied to other industries that require system integration and mutual access of heterogeneous systems.
附图说明Description of drawings
图1为本发明应用于电信运营管理平台的体系结构Fig. 1 is the architecture of the present invention applied to the telecom operation management platform
图2为本发明的适配器的结构示意图Fig. 2 is the structural representation of adapter of the present invention
图3为本发明的适配器的服务发布模块的工作流程图Fig. 3 is the workflow diagram of the service publishing module of the adapter of the present invention
图4为本发明的适配器的注册模块的工作流程图Fig. 4 is the workflow diagram of the registration module of the adapter of the present invention
图5为本发明的适配器的消息解析模块的工作流程图Fig. 5 is the workflow diagram of the message parsing module of the adapter of the present invention
图6为本发明的适配器的消息转发的工作流程图Fig. 6 is the working flowchart of the message forwarding of the adapter of the present invention
图7为本发明的适配器的调用SOAP消息解析的工作流程图Fig. 7 is the working flowchart of calling SOAP message analysis of the adapter of the present invention
图8为本发明的适配器的返回消息的SOAP封装的工作流程图Fig. 8 is the working flowchart of the SOAP encapsulation of the return message of the adapter of the present invention
具体实施方式Detailed ways
下面以电信运营管理支撑平台为例描述本发明的适配器。The adapter of the present invention will be described below by taking the telecom operation management support platform as an example.
该适配器主要是利用中间件技术,在遗留系统或功能组件与支撑平台之间增加一个适配器中间层,通过适配器层对遗留系统的数据、功能和协议进行统一描述,向管理平台提供统一的访问接口,从而屏蔽遗留系统之间相互访问的差异,达到不同系统之间进行互操作的目的。The adapter mainly uses middleware technology to add an adapter middle layer between the legacy system or functional components and the support platform, and uniformly describe the data, functions and protocols of the legacy system through the adapter layer, and provide a unified access interface to the management platform , so as to shield the differences in mutual access between legacy systems, and achieve the purpose of interoperability between different systems.
如图2所示,适配器主要由服务发布模块、服务调用模块、消息处理模块、注册模块四个部分组成,各部分的功能及工作机制可描述如下:As shown in Figure 2, the adapter is mainly composed of four parts: service publishing module, service calling module, message processing module, and registration module. The functions and working mechanisms of each part can be described as follows:
1、服务发布模块1. Service publishing module
服务发布模块通过解析遗留系统业务组件的程序代码,生成其服务配置文件。服务配置文件被描述成XML格式的文件。文件可描述功能组件所提供的服务的名称、服务调用类型、服务所对应的类的名称和相对位置、服务传入参数的类型和名称、返回参数的类型和名称等。一个服务配置文件描述片断如下:The service publishing module generates its service configuration file by analyzing the program code of the business component of the legacy system. Service configuration files are described as files in XML format. The file can describe the name of the service provided by the functional component, the type of service call, the name and relative position of the class corresponding to the service, the type and name of the service input parameter, the type and name of the return parameter, etc. A service configuration file description fragment is as follows:
<?xml version=″1.0″encoding=″UTF-8″?><? xml version="1.0" encoding="UTF-8"? >
<deployment xmlns=http://xml.apache.org/axis/wsdd/<deployment xmlns=http://xml.apache.org/axis/wsdd/
xmlns:java=″http://xml.apache.org/axis/wsdd/providers/java″>xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<servicename=″FaultdispatchSessionFacadeTestClient4″<servicename="FaultdispatchSessionFacadeTestClient4"
provider=″java:RPC″>provider="java:RPC">
<parameter name=″allowedMethods″value=″faultsDispatch″/><parameter name="allowedMethods" value="faultsDispatch"/>
<parameter name=″scope″value=″Request″/><parameter name="scope" value="Request"/>
<parameter name=″className″<parameter name="className"
value=″pjt_dispatch_fault.FaultdispatchSessionFacadeTestClient4″/value = "pjt_dispatch_fault.FaultdispatchSessionFacadeTestClient4"/
>>
<typeMapping<typeMapping
deserializer=″org.apache.axis.encoding.ser.BeanDeserializerFactory″deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
qname=″ns1:Status″qname="ns1:Status"
serializer=″org.apache.axis.encoding.ser.BeanSerializerFactory″serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type=″java:pjt_dispatch_fault.Status″Type = "java:pjt_dispatch_fault.Status"
xmlns:ns1=″http://pjt_dispatch_fault″/>xmlns:ns1="http://pjt_dispatch_fault"/>
</service></service>
</deployment></deployment>
其中,servicename表示服务的名称,allowedMethods表示服务中的具体方法,scope表示调用类型,className表示服务所对应的具体程序所在的位置,typeMapping表示服务方法中传入参数和返回值的类型。Among them, servicename indicates the name of the service, allowedMethods indicates the specific method in the service, scope indicates the call type, className indicates the location of the specific program corresponding to the service, and typeMapping indicates the type of the incoming parameter and return value in the service method.
如图3所示,适配器首先通过输入的遗留系统位置参数确定遗留系统所在的位置,然后解析指定位置的遗留系统。解析过程中,如果解析通过则根据解析的内容生成服务描述文件;如果由于位置信息出错或遗留系统本身的原因造成解析失败,则适配器会报出相应的错误并提示重新解析。As shown in Figure 3, the adapter first determines the location of the legacy system through the input legacy system location parameter, and then resolves the legacy system at the specified location. During the parsing process, if the parsing is passed, a service description file will be generated according to the parsed content; if the parsing fails due to errors in location information or the legacy system itself, the adapter will report a corresponding error and prompt to re-parse.
2、注册模块2. Registration module
注册模块主要用于对适配器和遗留系统业务组件提供的服务进行注册。注册模块将适配器信息以及其下挂的功能组件的服务信息注册到消息总线上,以便其它业务组件可通过查询总线上这些信息,获得所需服务的位置信息和接口信息,从而对相关服务进行调用。The registration module is mainly used to register the services provided by the adapters and legacy system business components. The registration module registers the adapter information and the service information of the functional components attached to it on the message bus, so that other business components can obtain the location information and interface information of the required services by querying the information on the bus, so as to call related services .
2.1适配器注册2.1 Adapter registration
适配器注册模块将适配器信息注册给消息总线。注册信息主要包括适配器名称(adapterName)、适配器IP地址(addr)、适配器类型(type)、适配器编号(adapterId)、服务配置文件(Server_Config_file)。适配器的名称可依照相关规定自由命名;适配器IP地址是指适配器所运行的机器的IP地址;适配器的类型用来描述是哪种类型的适配器,例如,是CORBA/SOAP适配器还是EJB/SOAP适配器等;适配器类型主要取决于遗留系统的实现语言与实现方式;适配器编号主要用来唯一标识一个适配器,以便供平台或其他功能组件查询;服务配置文件位置属性用于描述服务配置文件的位置。上述的适配器信息都是从适配器配置文件中读取的,适配器配置文件如下所示:The adapter registration module registers the adapter information to the message bus. The registration information mainly includes adapter name (adapterName), adapter IP address (addr), adapter type (type), adapter number (adapterId), and service configuration file (Server_Config_file). The name of the adapter can be freely named according to relevant regulations; the adapter IP address refers to the IP address of the machine on which the adapter runs; the adapter type is used to describe which type of adapter it is, for example, whether it is a CORBA/SOAP adapter or an EJB/SOAP adapter, etc. ;The adapter type mainly depends on the implementation language and implementation method of the legacy system; the adapter number is mainly used to uniquely identify an adapter, so as to be queried by the platform or other functional components; the service configuration file location attribute is used to describe the location of the service configuration file. The above adapter information is read from the adapter configuration file, and the adapter configuration file is as follows:
adapterName=yujiguangadapterName=yujiguang
addr=192.168.6.188addr=192.168.6.188
type=EJB/soaptype=EJB/soap
adapterId=00001adapterId=00001
Server_Config_file=server-config-locate.wsddServer_Config_file=server-config-locate.wsdd
适配器注册主要通过调用注册模块中的注册适配器(registerAdapter)方法实现,该方法包括三个参数,分别为适配器名称、适配器IP地址、适配器类型,这三个参数均为字符型。该方法的返回值是适配器信息(AdapterInfo)类型,该类型主要包括通过注册适配器而获得的连接工厂(connectionFactory)、命名和目录服务工厂(jndiFactory)、JMS地址(jmsUrl)、请求队列(requestQueue)、适配器编号(adapterId)以及注册时传入的适配器名称(adapterName)参数。通过获取这些参数,平台的消息总线可以与适配器建立消息通道,可通过该通道传输具体的消息内容。通道的成功建立表明适配器已经被挂接到平台上。The adapter registration is mainly implemented by calling the registerAdapter method in the registration module. This method includes three parameters, which are respectively the adapter name, the adapter IP address, and the adapter type. These three parameters are all character types. The return value of this method is the adapter information (AdapterInfo) type, which mainly includes the connection factory (connectionFactory), naming and directory service factory (jndiFactory), JMS address (jmsUrl), request queue (requestQueue), The adapter number (adapterId) and the adapter name (adapterName) parameters passed in during registration. By obtaining these parameters, the message bus of the platform can establish a message channel with the adapter, through which specific message content can be transmitted. Successful establishment of the channel indicates that the adapter has been attached to the platform.
2.2服务注册2.2 Service registration
服务注册模块将适配器接入的遗留系统业务组件的服务信息向消息总线注册,以便使平台或其他业务组件能够发现并调用这些服务,同时平台可对这些服务进行统一管理。服务注册信息主要通过解析服务的服务配置文件记录。服务配置文件是在服务发布模块生成的。服务注册信息包括服务的名称、服务的WSDL(Web Service DescriptionLanguage)文件所在位置、服务的附加说明、服务所属的适配器的名称。总线通过这些信息对适配器接入功能组件的服务进行管理和控制。The service registration module registers the service information of the legacy system business components connected by the adapter to the message bus, so that the platform or other business components can discover and call these services, and the platform can manage these services uniformly. The service registration information is mainly recorded by parsing the service configuration file of the service. Service configuration files are generated in the service publishing module. The service registration information includes the name of the service, the location of the WSDL (Web Service Description Language) file of the service, the additional description of the service, and the name of the adapter to which the service belongs. The bus manages and controls the services of the adapter access functional components through these information.
实现服务注册模块主要通过调用注册模块中的服务注册(registerService(SvcIf))方法。该方法向消息总线传入一个服务信息(ServiceInfo)类型的参数,该结构体主要包括服务名称(serviceName)、备注(comment)、wsdl文件位置(wsdl)、所属适配器名称(adapterName)这几个项目,其中serviceName是服务的名称,comment指对该服务的相关说明,wsdl是指服务的WSDL文件所处的位置,adapterName是指该服务所属的适配器的名称。该接口的返回值为布尔型,以判断服务注册是否成功。The service registration module is realized mainly by calling the service registration (registerService(SvcIf)) method in the registration module. This method passes a service information (ServiceInfo) type parameter to the message bus, and the structure mainly includes the service name (serviceName), comment (comment), wsdl file location (wsdl), and the name of the adapter (adapterName). , where serviceName is the name of the service, comment refers to the description of the service, wsdl refers to the location of the WSDL file of the service, and adapterName refers to the name of the adapter to which the service belongs. The return value of this interface is Boolean to determine whether the service registration is successful.
如图4所示,首先进行适配器注册,先从适配器配置文件中读取适配器信息,接着调用适配器注册接口适配器注册(registerAdapter)方法,将从配置文件中读取的适配器信息作为调用参数。如果调用失败,则报出相应错误并转回读取配置文件步骤重新开始,如果调用成功,则进行服务注册。进行服务注册时,首先要读取服务描述文件,从中读取服务描述信息,接着调用服务注册接口服务注册(registerService(SvcIf))方法,将服务描述信息作为调用参数。如果调用失败,则报出相应错误并转回读取服务描述文件步骤重新开始。如果调用成功,则服务注册流程结束。以上注册流程完成后,适配器便开始时刻侦听总线,一但有SOAP调用消息传来便可以进行服务的调用。As shown in Figure 4, first register the adapter, first read the adapter information from the adapter configuration file, then call the adapter registration interface adapter registration (registerAdapter) method, and use the adapter information read from the configuration file as a calling parameter. If the call fails, report the corresponding error and return to the step of reading the configuration file to start again. If the call succeeds, perform service registration. When performing service registration, first read the service description file, read the service description information from it, and then call the service registration interface service registration (registerService(SvcIf)) method, and use the service description information as the call parameter. If the call fails, report a corresponding error and return to the step of reading the service description file to start over. If the call is successful, the service registration process ends. After the above registration process is completed, the adapter starts to listen to the bus all the time, and once a SOAP call message comes, it can call the service.
3、消息处理模块3. Message processing module
适配器的消息处理模块主要提供适配器与消息总线之间进行交互的接口,同时侦听来自总线的消息,并返回调用结果。消息处理模块主要有消息解析和消息封装两大功能;可以接受并识别总线上JMS协议或HTTP协议传输的消息。The message processing module of the adapter mainly provides the interface for the interaction between the adapter and the message bus, listens to the messages from the bus at the same time, and returns the calling result. The message processing module mainly has two functions of message parsing and message encapsulation; it can accept and identify messages transmitted by JMS protocol or HTTP protocol on the bus.
3.1消息解析3.1 Message Analysis
消息解析模块根据消息的传输协议的不同,选择相应的处理方式对消息进行解析,以获得SOAP消息体,同时还记录消息的来源,以便能在调用结束后向消息源返回调用结果。According to the different transmission protocols of the message, the message parsing module selects the corresponding processing method to parse the message to obtain the SOAP message body, and also records the source of the message so that the call result can be returned to the message source after the call is completed.
如图5所示,消息处理模块首先获得总线传输来的服务调用消息,然后对消息进行分析,判断消息的传输协议的类型,同时记录消息的来源。如果分析对象是用JMS协议传递的消息,则调用JMS消息解析程序,获得JMS消息中的SOAP消息体。如果是HTTP协议传输的消息,则调用HTTP解析程序获得HTTP消息中的SOAP消息体。消息处理模块将所获得的SOAP消息体传送给服务调用模块以备调用。As shown in Figure 5, the message processing module first obtains the service call message transmitted by the bus, then analyzes the message, judges the type of the transmission protocol of the message, and records the source of the message at the same time. If the analysis object is a message delivered by the JMS protocol, the JMS message parsing program is invoked to obtain the SOAP message body in the JMS message. If it is a message transmitted by the HTTP protocol, the HTTP parser is invoked to obtain the SOAP message body in the HTTP message. The message processing module transmits the obtained SOAP message body to the service calling module for calling.
3.2消息转发3.2 Message Forwarding
当服务调用结束后,服务调用模块返回的结果被送至消息处理模块,消息处理模块依据总线的传输协议格式对返回结果进行封装,并根据前面消息来源的记录,通过消息总线将消息发送到相应地点。如此,服务调用的发起方可方便地获得返回结果。When the service call ends, the result returned by the service call module is sent to the message processing module. The message processing module encapsulates the returned result according to the transport protocol format of the bus, and sends the message through the message bus to the corresponding Place. In this way, the originator of the service call can conveniently obtain the returned result.
如图6所示,消息处理模块首先获得服务调用模块返回的带有调用结果的SOAP消息,并读取以前记录的消息来源,然后根据总线的传输协议格式将带有返回结果的SOAP消息封装到相应的传输协议中,最后将封装好的消息发送到消息总线上。消息总线再根据消息来源将返回结果发送到发起调用的相应业务组件或平台的相关部件。As shown in Figure 6, the message processing module first obtains the SOAP message with the call result returned by the service call module, reads the previously recorded message source, and then encapsulates the SOAP message with the returned result into the In the corresponding transport protocol, the encapsulated message is finally sent to the message bus. The message bus then sends the returned result to the corresponding business component that initiated the call or related components of the platform according to the source of the message.
4、服务调用模块4. Service call module
服务调用模块主要对消息处理模块获得的服务调用SOAP消息进行解析,并将解析结果传至服务调用模块,通过服务调用模块完成最终的服务调用;同时获得返回结果后,将结果值包装成SOAP消息返回给消息处理模块。服务调用模块主要完成对调用服务的SOAP消息的解析以及对返回结果的SOAP封装两个功能。The service call module mainly analyzes the service call SOAP message obtained by the message processing module, and transmits the analysis result to the service call module, and completes the final service call through the service call module; at the same time, after obtaining the returned result, it packs the result value into a SOAP message Return to the message processing module. The service calling module mainly completes two functions: parsing the SOAP message calling the service and encapsulating the returned result in SOAP.
4.1调用SOAP消息的解析4.1 Calling SOAP message parsing
服务调用模块对消息处理模块获得的服务调用SOAP消息进行解析,获取以下的服务调用参数:1.所要调用的服务的类名称;2.服务中的方法的名称;3.方法中输入参数的名称和类型。在解析过程中,如果调用参数是复合类型,则须对复合类型进行反序列化,如果是简单类型,则可直接解析。模块将解析获得的上述信息传给服务调用模块,服务调用模块便可以根据这些信息,对所要调用的服务的具体方法进行定位,完成最终的服务调用。调用SOAP消息示例如下所示:The service call module parses the service call SOAP message obtained by the message processing module, and obtains the following service call parameters: 1. the class name of the service to be called; 2. the name of the method in the service; 3. the name of the input parameter in the method and type. During the parsing process, if the call parameter is a composite type, the composite type must be deserialized, and if it is a simple type, it can be directly parsed. The module transmits the above information obtained by parsing to the service calling module, and the service calling module can locate the specific method of the service to be called according to the information, and complete the final service calling. An example of invoking a SOAP message is as follows:
<soapenv:Envelope<soapenv:Envelope
xmlns:soapenv=″http://schemas.xmlsoap.org/soap/envelope/″xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=″http://www.w3.org/2001/XMLSchema″xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi=″http://www.w3.org/2001/XMLSchema-instance″>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><soapenv:Body>
<ns1:startRequest<ns1:startRequest
soapenv:encodingStyle=″http://schemas.xmlsoap.org/soap/encoding/″soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1=″DPRequestEJB″/>xmlns:ns1="DPRequestEJB"/>
</soapenv:Body></soapenv:Body>
</soapenv:Envelope></soapenv:Envelope>
如图7所示,服务调用模块首先获得消息处理模块传来的SOAP调用消息,接下来对消息进行解析获得传入参数,如果参数中含有复类型则对复合类型进行反序列化,在传递给调用模块,如果是简单类型则直节传递给调用模块,通过调用模块调用服务,并返回调用结果。As shown in Figure 7, the service call module first obtains the SOAP call message from the message processing module, and then parses the message to obtain the incoming parameters. If the parameter contains multiple types, it deserializes the composite type and passes it to Call module, if it is a simple type, pass it directly to the call module, call the service through the call module, and return the call result.
4.2返回消息的SOAP封装4.2 SOAP encapsulation of returned message
当调用结束后,服务调用模块将调用返回结果以SOAP消息的形式返回给消息总线,为此,需要对返回的结果要进行SOAP封装,封装通过服务调用模块完成的。When the call ends, the service call module returns the call return result to the message bus in the form of a SOAP message. Therefore, it is necessary to perform SOAP encapsulation on the returned result, and the encapsulation is completed by the service call module.
返回结果可能存在两种情况,一种是返回结果为简单类型的数据,如字符型或整型,这时,SOAP封装的类型比较简单,只需在SOAP消息中指明返回值名称,返回值类型及具体的值。如果返回结果是复合类型,如结构体或数组,在此情况下,服务调用模块需要指明返回值中结构体的名称,结构体中各个简单类型的名称、类型、值,并将这些类型和值进行序列化。具体的编码规则遵循标准的SOAP编码规则,复合类型SOAP消息的编码示例如下:There may be two situations in the return result. One is that the return result is simple type of data, such as character or integer. At this time, the type of SOAP encapsulation is relatively simple. You only need to specify the return value name and return value type in the SOAP message. and specific values. If the return result is a compound type, such as a structure or an array, in this case, the service call module needs to indicate the name of the structure in the return value, the name, type, and value of each simple type in the structure, and set these types and values to serialize. The specific encoding rules follow the standard SOAP encoding rules. The encoding examples of composite SOAP messages are as follows:
<?xml version=”1.0”encoding=”UTF-8″?><? xml version="1.0" encoding="UTF-8"? >
<soapenv:Envelopexmlns:soapenv=″http://schemas.xmlsoap.org/soap/<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/″ xmlns:xsd=″http://www.w3.org/2001/XMLSchema″envelope/″ xmlns:xsd=″http://www.w3.org/2001/XMLSchema″
xmlns:xsi=″http://www.w3.org/2001/XMLSchema-instance″>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><soapenv:Body>
<ns1:queryFaultsResponsesoapenv:encodingStyle=″http://schemas.xm<ns1:queryFaultsResponsesoapenv:encodingStyle="http://schemas.xm
lsoap.org/soap/encoding/″lsoap.org/soap/encoding/″
xmlns:ns1=″FaultquerySessionFacadeTestClient2″>xmlns:ns1="FaultquerySessionFacadeTestClient2">
<ns1:queryFaultsReturn href=″#id0″/><ns1: queryFaultsReturn href="#id0"/>
</ns1:queryFaultsResponse></ns1:queryFaultsResponse>
<multiRefid=″id0″soapenc:root=″0″<multiRefid="id0" soapenc:root="0"
soapenv:encodingStyle=″http://schemas.xmlsoap.org/soap/encoding/″soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type=″ns2:FaultsList″xmlns:soapenc=″http://schemas.xmlsoap.org/soapxsi:type="ns2:FaultsList" xmlns:soapenc="http://schemas.xmlsoap.org/soap
/encoding/″xmlns:ns2=″http://pjt_query_fault″>/encoding/"xmlns:ns2="http://pjt_query_fault">
<DeviceFaultList xsi:type=″xsd:string″>2004-3-27 0:00:00::大运<DeviceFaultList xsi:type=″xsd:string″>2004-3-27 0:00:00::Dayun
村::TRH::大运村基站设备::shenzw::</DeviceFaultList>Village::TRH::Universiade Village Base Station Equipment::shenzw::</DeviceFaultList>
<TransportationFaultListxsi:type=″xsd:string″>2004-3-230:0 大运<TransportationFaultListxsi:type=″xsd:string″>2004-3-230:0 Universiade
村::</TransportationFaultList>Village::</TransportationFaultList>
</multiRef></multiRef>
</soapenv:Body></soapenv:Body>
</soapenv:Envelope></soapenv:Envelope>
服务调用模块将封装好的SOAP消息体作为语义描述协议发送给消息处理模块,消息处理模块按照总线既定的传输协议将SOAP消息体封装后便可发送到总线上。The service call module sends the encapsulated SOAP message body as a semantic description protocol to the message processing module, and the message processing module encapsulates the SOAP message body according to the established transmission protocol of the bus and then sends it to the bus.
如图8所示,服务调用模块获得返回结果后,首先判断返回值得类型,如果结果是复合类型,则调用对复合类型进行序列化,然后,调用模块对返回值进行封装成SOAP消息体,最后传递给消息处理模块进行传输协议的封装,如果结果是简单类型,则调用服务调用模块直接进行解析封装并生成SOPA消息体,并最终传递给消息处理模块进行传输协议的封装。As shown in Figure 8, after the service calling module obtains the returned result, it first judges the type of the returned value. If the result is a composite type, it calls to serialize the composite type. Then, the calling module encapsulates the returned value into a SOAP message body, and finally Pass it to the message processing module for encapsulation of the transport protocol. If the result is a simple type, call the service invocation module to directly parse and encapsulate and generate a SOPA message body, and finally pass it to the message processing module for encapsulation of the transport protocol.
本发明的异构系统集成适配器技术,是一种通用的适配技术,其实现和运行与具体的应用并无直接关系,上面所举的仅是其在电信领域的一个应用实例,实际上其不仅可以用于电信领域也可以用于其它需要系统集成及异构系统相互访问的行业应用当中。The heterogeneous system integration adapter technology of the present invention is a general adaptation technology, and its implementation and operation are not directly related to specific applications. The above is only an application example in the telecommunications field. It can be used not only in the telecommunications field but also in other industrial applications that require system integration and mutual access of heterogeneous systems.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100884013A CN100527735C (en) | 2004-10-29 | 2004-10-29 | Adapter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100884013A CN100527735C (en) | 2004-10-29 | 2004-10-29 | Adapter |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1767530A true CN1767530A (en) | 2006-05-03 |
CN100527735C CN100527735C (en) | 2009-08-12 |
Family
ID=36743136
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004100884013A Expired - Fee Related CN100527735C (en) | 2004-10-29 | 2004-10-29 | Adapter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100527735C (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571550A (en) * | 2010-12-30 | 2012-07-11 | 北京亿阳信通软件研究院有限公司 | General information interaction platform and method |
CN102811199A (en) * | 2011-05-30 | 2012-12-05 | 深圳市金蝶友商电子商务服务有限公司 | Interface adaptation method, device and system |
CN103428019A (en) * | 2012-05-24 | 2013-12-04 | 中兴通讯股份有限公司 | Network service message management method and system |
CN103944902A (en) * | 2010-08-13 | 2014-07-23 | 华为技术有限公司 | Method, device and equipment for aggregating Mashup service for service |
CN104753860A (en) * | 2013-12-27 | 2015-07-01 | 上海宝信软件股份有限公司 | Network service system based on middleware |
CN104808973A (en) * | 2014-01-24 | 2015-07-29 | 阿里巴巴集团控股有限公司 | Screen shooting system and method |
CN109388591A (en) * | 2017-08-07 | 2019-02-26 | 北京北斗星通导航技术股份有限公司 | A kind of MATLAB application system and STK application system interface adapter and adaptation method |
CN111478945A (en) * | 2020-03-13 | 2020-07-31 | 国家电网有限公司 | Pumped storage operation and inspection data processing system and method |
CN112181516A (en) * | 2020-09-24 | 2021-01-05 | 武汉深之度科技有限公司 | Application software execution method and computing device |
CN113051202A (en) * | 2019-12-27 | 2021-06-29 | 中国移动通信集团湖南有限公司 | Interface adaptation method, device, electronic equipment and computer readable storage medium |
-
2004
- 2004-10-29 CN CNB2004100884013A patent/CN100527735C/en not_active Expired - Fee Related
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103944902A (en) * | 2010-08-13 | 2014-07-23 | 华为技术有限公司 | Method, device and equipment for aggregating Mashup service for service |
CN103944902B (en) * | 2010-08-13 | 2017-11-24 | 华为技术有限公司 | Realize the method, apparatus and equipment of business polymerization Mashup business |
CN102571550B (en) * | 2010-12-30 | 2016-05-25 | 北京亿阳信通科技有限公司 | A kind of general information exchange platform and method |
CN102571550A (en) * | 2010-12-30 | 2012-07-11 | 北京亿阳信通软件研究院有限公司 | General information interaction platform and method |
CN102811199A (en) * | 2011-05-30 | 2012-12-05 | 深圳市金蝶友商电子商务服务有限公司 | Interface adaptation method, device and system |
CN102811199B (en) * | 2011-05-30 | 2015-10-28 | 深圳市金蝶友商电子商务服务有限公司 | A kind of method for interface adaptation, Apparatus and system |
CN103428019A (en) * | 2012-05-24 | 2013-12-04 | 中兴通讯股份有限公司 | Network service message management method and system |
CN104753860A (en) * | 2013-12-27 | 2015-07-01 | 上海宝信软件股份有限公司 | Network service system based on middleware |
CN104753860B (en) * | 2013-12-27 | 2019-06-28 | 上海宝信软件股份有限公司 | Network service system based on middleware |
CN104808973A (en) * | 2014-01-24 | 2015-07-29 | 阿里巴巴集团控股有限公司 | Screen shooting system and method |
CN109388591A (en) * | 2017-08-07 | 2019-02-26 | 北京北斗星通导航技术股份有限公司 | A kind of MATLAB application system and STK application system interface adapter and adaptation method |
CN109388591B (en) * | 2017-08-07 | 2021-07-16 | 北京北斗星通导航技术股份有限公司 | MATLAB application system and STK application system interface adapter and adaptation method |
CN113051202A (en) * | 2019-12-27 | 2021-06-29 | 中国移动通信集团湖南有限公司 | Interface adaptation method, device, electronic equipment and computer readable storage medium |
CN111478945A (en) * | 2020-03-13 | 2020-07-31 | 国家电网有限公司 | Pumped storage operation and inspection data processing system and method |
CN111478945B (en) * | 2020-03-13 | 2022-10-14 | 国家电网有限公司 | Pumped storage operation and inspection data processing system and method |
CN112181516A (en) * | 2020-09-24 | 2021-01-05 | 武汉深之度科技有限公司 | Application software execution method and computing device |
Also Published As
Publication number | Publication date |
---|---|
CN100527735C (en) | 2009-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1909685A (en) | Method and system for realizing separation of service platform and gate | |
CN1503531A (en) | Access server for web-based services | |
CN1757216A (en) | Systems and methods for creating and communicating with wireless application-based components | |
CN1564129A (en) | Method of packing member and consistent visit | |
CN1742473A (en) | General protocol layer architecture and method, and general protocol grouping for transferring data between different network protocols | |
CN102799460B (en) | A kind of business development system, method and service operation system, method | |
CN1767530A (en) | adapter | |
CN1968134A (en) | Middleware-based multimedia consolidation service realizing method and system | |
CN1238803C (en) | Apparatus and method for synthesizing web browse business | |
CN1669272A (en) | Management system and method for service subscription provisioning | |
CN101043381A (en) | System and method for collecting service grid traceback information | |
CN101051918A (en) | Method for realizing business requst and on-line instruction system | |
CN1819588A (en) | Network service providing method based on middleware platform | |
CN1722663A (en) | A proxy server system and method for realizing proxy communication thereof | |
CN1812397A (en) | Network management interface adapter and information interacting method | |
CN1791102A (en) | Network download tool | |
CN1885266A (en) | System, device, and method for cooperative processing | |
CN1704931A (en) | Method and apparatus for providing information inquiry by the network administration system | |
CN1794242A (en) | Failure diagnosis data collection and publishing method | |
CN1299200C (en) | Unified converting method for interface data in telecommunication network management system and its system | |
CN1750486A (en) | Network Measurement Architecture and Its Implementation | |
CA2559642A1 (en) | Devices, systems and methods for network device conversion | |
CN1852102A (en) | Method and system for reporting and fetching equipment information | |
CN1744594A (en) | Web Service Transport Protocol Adapter and Its Generation Method | |
CN1810009A (en) | Context management system for a network comprising a heterogeneous group of terminals |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090812 Termination date: 20111029 |