CN103595695A - Method and system for providing services by service bus - Google Patents
Method and system for providing services by service bus Download PDFInfo
- Publication number
- CN103595695A CN103595695A CN201210290553.6A CN201210290553A CN103595695A CN 103595695 A CN103595695 A CN 103595695A CN 201210290553 A CN201210290553 A CN 201210290553A CN 103595695 A CN103595695 A CN 103595695A
- Authority
- CN
- China
- Prior art keywords
- service
- message
- unit
- module
- response message
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000006243 chemical reaction Methods 0.000 claims abstract description 50
- 230000006978 adaptation Effects 0.000 claims description 7
- 230000003044 adaptive effect Effects 0.000 claims description 7
- 239000000344 soap Substances 0.000 claims 7
- 230000001737 promoting effect Effects 0.000 abstract 1
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005111 flow chemistry technique Methods 0.000 description 1
- 238000003032 molecular docking Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Computer And Data Communications (AREA)
- Bus Control (AREA)
Abstract
The invention provides a method and a system for providing services by a service bus. The method comprises the steps that the service bus receives various protocol types of service request messages sent by client units and carries out format conversion on the service request messages; the service request messages, which are converted in format, are sent to service units required by the service request messages; the service bus receives response messages returned by the service units, carries out format conversion on the response messages, and sends the converted response messages to the client units. According to the invention, the format conversion is carried out on the received various protocol types of service request messages, the converted service request messages are sent to the corresponding service units, format conversion is carried out on the response messages returned by the service units, and the converted response messages are sent to the client units, thereby expanding the accessing and publishing modes of the services, and promoting user experiences.
Description
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and a system for providing services through a service bus.
Background
A service bus is a connection center of a client system, and is an essential element for constructing an enterprise information system based on a Service Oriented Architecture (SOA), and the service bus can be simply defined as: a set of infrastructures implemented by middleware technology and supporting SOA support services, messages and event-based interactions in heterogeneous environments with appropriate service levels and manageability. The quick access of the client system is realized through the service bus, and the enterprise information system and the actual service can be well coordinated through higher-level event and flow processing capacity, so that the more flexible and agile reconstruction of the enterprise information system is realized under the condition of ensuring the original investment.
Most Service buses are based on HyperText transfer protocol (HTTP), and only support the distribution of services in a Web Service (Web Service) manner, but cannot support the distribution Service manner in HTTP post and the access manner of other services, so that the manners of Service access and distribution are greatly limited.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and a system for providing services by a service bus, which can expand the service range and improve the user experience.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of providing services by a service bus, the method comprising:
the service bus receives service request messages of various protocol types sent by a client unit and carries out format conversion on the service request messages;
sending the service request message after format conversion to a service unit requested by the service request message;
and the service bus receives a response message returned by the service unit, converts the format of the response message and then sends the response message to the client unit.
Wherein, the service bus receives the service request messages of multiple protocol types sent by the client unit as follows:
the service bus receives a service request message of a Java Message Service (JMS) protocol type or a Remote Method Invocation (RMI) protocol type from a client unit.
Wherein the service bus performs format conversion on the service unit request message to:
the service bus converts a service request message of a JMS protocol type or an RMI protocol type into a service request message of a Simple Object Access Protocol (SOAP) type.
Wherein, the response message returned by the service unit received by the service bus is:
and the service bus receives a response message of the SOAP type returned by the service unit.
Wherein the sending of the response message to the client unit after format conversion is:
and the service bus converts the response message of the SOAP type into the response message of the JMS protocol type or the RMI protocol type according to the protocol type of the client unit corresponding to the destination address in the response message and sends the response message to the corresponding client unit.
A system for providing services by a service bus, comprising a client unit, a service unit, the system further comprising: a service bus; wherein,
the service bus is used for receiving service request messages of various protocol types sent by the client unit and converting the format of the service request messages; sending the service request message after format conversion to a service unit requested by the service request message; and receiving a response message returned by the service unit, converting the format of the response message and then sending the response message to the client unit.
Wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module and a conversion module; wherein,
the receiving module is used for receiving the service request message of the JMS protocol type or the RMI protocol type sent by the client unit and sending the service request message to the conversion module through the unified message routing module.
Wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module, a conversion module and a sending module; wherein,
the conversion module is used for converting the service request message of the JMS protocol type or the RMI protocol type sent by the receiving module through the unified message routing module into a service request message of a SOAP type;
and the sending module is used for sending the SOAP type service request message sent by the conversion module through the unified message routing module to the corresponding service unit.
Wherein the service bus comprises: an adaptation unit comprising a receiving module; wherein,
and the receiving module is used for receiving the response message of the SOAP type returned by the service unit.
Wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module, a conversion module and a sending module; wherein,
the receiving module is used for receiving a response message returned by the service unit;
the conversion module is used for converting the response message of the SOAP type into the response message of the JMS protocol type or the RMI protocol type according to the protocol type of the client corresponding to the destination address in the response message sent by the receiving module through the unified message routing module;
and the sending module is used for sending the response message sent by the conversion module through the unified message routing module to the corresponding client unit.
The invention carries out format conversion on the received service request messages of various protocol types through the service bus, then sends the service request messages to the corresponding service unit, carries out format conversion on the response messages returned by the service unit, and then sends the response messages to the client unit, thereby expanding the modes of service access and release and improving the user experience.
Drawings
FIG. 1 is a schematic flow chart illustrating an implementation of a method for providing services by a service bus according to the present invention;
FIG. 2 is a schematic diagram of a system for providing services via a service bus according to the present invention;
fig. 3 is a schematic structural diagram of an adaptation unit in the system for providing services by the service bus according to the present invention.
Detailed Description
The basic idea of the invention is as follows: the service bus receives service request messages of various protocol types sent by a client unit and carries out format conversion on the service request messages; a service unit for sending the service request message after format conversion to a service request message request; and the service bus receives a response message returned by the service unit, converts the format of the response message and then sends the response message to the client unit.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings by way of examples.
Fig. 1 shows a flow of implementing the method for providing services by using the service bus of the present invention, and as shown in fig. 1, the method includes the following steps:
here, when a user needs to access a certain application, a service request message is input through the client unit, and the client unit sends the service request message input by the user to the service bus;
the Service bus receives a Service request Message of a Java Message Service (JMS) protocol type or a Remote Method Invocation (RMI) protocol type sent by a client unit; converting the service request message of the JMS Protocol type or the RMI Protocol type into a service request message of a Simple Object Access Protocol (SOAP) type; specifically, the message format, communication mode, encoding format, etc. of the service request message are converted into the protocol type supported by the respective requested service unit.
102, the service bus sends the service request message after format conversion to a service unit requested by the service request message;
specifically, in this step, the service bus sends the service request message to a corresponding specific service unit according to a service unit requested by the service request message after format conversion;
and after receiving the service request message, the service unit performs message verification and returns a specific response message to the service bus according to the content of the service request message.
103, the service bus receives a response message returned by the service unit, performs format conversion on the response message, and sends the response message to the client unit;
here, the service bus converts the SOAP type response message into a JMS protocol type or RMI protocol type response message according to the protocol type of the client corresponding to the destination address in the response message, and sends the response message to the corresponding client unit; in particular, the message format, communication mode, encoding format, etc. of the response message are converted into the protocol type applied by the client unit.
The conversion among different protocol types of the service request message is specifically as follows: when the service request message is converted between the JMS protocol type and the SOAP type, because the messages of the JMS protocol type and the SOAP type are based on HTTP and only have different message formats, a simpler mode is to encapsulate the SOAP type message into the message body of the JMS protocol type message, and when the message is converted back, the encapsulation of the JMS protocol type message can be directly removed, so that the SOAP type message is obtained; certainly, in order to improve the working efficiency, the conversion between the message types can be performed by a conversion mode which is more complicated than the above conversion mode, for example, the form XML over JMS Service transmitted inside the Service can be packaged into Web Service, so that the partner or the client can call the Service from the outside; further, when the JMS Service can differentiate the priority of the Service request, the packaged Web Service also needs to support the capability of differentiating the priority of the Service request;
here, the JMS Service prioritizes the Service request by the JMS _ Priority attribute in the JMS header. Correspondingly, defining an element for identifying the priority in the SOAP message header of the Web service, so that the SOAP type service request message is correspondingly complex; specifically, when a message header for indicating that the service Priority is 2 is added to the SOAP message, when the SOAP message is converted into the JMS protocol type message, it is necessary to first extract the value of the service Priority, set the value in JMS _ Priority in the message header of the JMS protocol type message to 2, and then encapsulate the field in the SOAP message body in the JMS message body, so that seamless docking of the SOAP type message and the JMS protocol type message is achieved.
It will be appreciated that there are other ways of converting between the service request message types described above, such as introducing a unified standard data object that can be equivalently interchanged with any regular data or object, by intermediating this data object for format conversion between the various different message types.
Fig. 2 shows a structure of a system for providing a service by a service bus according to the present invention, fig. 3 is a schematic structural diagram of an adaptation unit included in the service bus in the system shown in fig. 2, and as shown in fig. 2 and fig. 3, the system for providing a service by a service bus includes a client unit and a service unit, and further includes: a service bus; the client unit in fig. 2 is schematically illustrated by a Web client unit supporting a Web service related protocol, an RMI client unit supporting an RMI protocol, and a JMS client unit supporting a JMS protocol; correspondingly, the service unit is a Web service unit supporting Web service related protocols, an RMI service unit supporting RMI protocols and a JMS service unit supporting JMS protocols;
it should be understood that the client unit and the service unit may also include client units and service units, respectively, that support other protocol types.
The service bus is used for receiving service request messages of various protocol types sent by the client unit and converting the format of the service request messages; sending the service request message after format conversion to a service unit requested by the service request message; and receiving a response message returned by the service unit, converting the format of the response message and then sending the response message to the client unit.
Wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module and a conversion module; the receiving module in fig. 3 is illustrated by a SOAP receiving module supporting SOAP, an RMI receiving module supporting RMI protocol, and a JMS receiving module supporting JMS protocol; it should be understood that the receiving modules may also include receiving modules supporting other protocol types, respectively.
The receiving module is used for receiving the service request message of the JMS protocol type or the RMI protocol type sent by the client unit and sending the service request message to the conversion module through the unified message routing module.
Wherein the adaptation unit comprises a further transmission module; the sending module in fig. 3 is illustrated by a SOAP sending module supporting SOAP, an RMI sending module supporting RMI protocol, and a JMS sending module supporting JMS protocol; it should be understood that the sending modules may also include sending modules supporting other protocol types, respectively.
The conversion module is used for converting the service request message of the JMS protocol type or the RMI protocol type sent by the receiving module through the unified message routing module into a service request message of a SOAP type;
and the sending module is used for sending the SOAP type service request message sent by the conversion module through the unified message routing module to the corresponding service unit.
And the receiving module of the adaptation unit is used for receiving the response message of the SOAP type returned by the service unit.
Further, the receiving module is configured to receive a response message returned by the service unit;
the conversion module is used for converting the response message of the SOAP type into the response message of the JMS protocol type or the RMI protocol type according to the protocol type of the client corresponding to the destination address in the response message sent by the receiving module through the unified message routing module;
and the sending module is used for sending the response message sent by the conversion module through the unified message routing module to the corresponding client unit.
It should be understood that, in the present invention, all messages interacted between the receiving module and the conversion module and all messages interacted between the sending module and the conversion module of the adaptation unit are transmitted to the unified message routing module through the transmission channel, and then transmitted to the other party for interaction through the transmission channel by the unified message routing module. Therefore, by using the unified message routing module as the entrance and exit of the aggregated message, all messages can have the same entrance and exit, the reusability of each functional module is well improved, and unnecessary complexity can be avoided.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.
Claims (10)
1. A method for providing services by a service bus, the method comprising:
the service bus receives service request messages of various protocol types sent by a client unit and carries out format conversion on the service request messages;
sending the service request message after format conversion to a service unit requested by the service request message;
and the service bus receives a response message returned by the service unit, converts the format of the response message and then sends the response message to the client unit.
2. The method of claim 1, wherein the service bus receives the service request message of the plurality of protocol types from the client unit as:
the service bus receives a service request message of a Java message service JMS protocol type or a remote method invocation RMI protocol type sent by a client unit.
3. The method of claim 1, wherein the service bus formats the service unit request message by:
the service bus converts a service request message of a JMS protocol type or an RMI protocol type into a service request message of a simple object access protocol SOAP type.
4. The method of claim 1, wherein the receiving, by the service bus, the response message returned by the service unit is:
and the service bus receives a response message of the SOAP type returned by the service unit.
5. The method of claim 1, wherein the format converting the response message and sending the response message to the client unit comprises:
and the service bus converts the response message of the SOAP type into the response message of the JMS protocol type or the RMI protocol type according to the protocol type of the client unit corresponding to the destination address in the response message and sends the response message to the corresponding client unit.
6. A system for providing service by a service bus comprises a client unit and a service unit, and is characterized by further comprising: a service bus; wherein,
the service bus is used for receiving service request messages of various protocol types sent by the client unit and converting the format of the service request messages; sending the service request message after format conversion to a service unit requested by the service request message; and receiving a response message returned by the service unit, converting the format of the response message and then sending the response message to the client unit.
7. The system of claim 6, wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module and a conversion module; wherein,
the receiving module is used for receiving the service request message of the JMS protocol type or the RMI protocol type sent by the client unit and sending the service request message to the conversion module through the unified message routing module.
8. The system of claim 6, wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module, a conversion module and a sending module; wherein,
the conversion module is used for converting the service request message of the JMS protocol type or the RMI protocol type sent by the receiving module through the unified message routing module into a service request message of a SOAP type;
and the sending module is used for sending the SOAP type service request message sent by the conversion module through the unified message routing module to the corresponding service unit.
9. The system of claim 6, wherein the service bus comprises: an adaptation unit comprising a receiving module; wherein,
and the receiving module is used for receiving the response message of the SOAP type returned by the service unit.
10. The system of claim 6, wherein the service bus comprises: the adaptive unit comprises a receiving module, a unified message routing module, a conversion module and a sending module; wherein,
the receiving module is used for receiving a response message returned by the service unit;
the conversion module is used for converting the response message of the SOAP type into the response message of the JMS protocol type or the RMI protocol type according to the protocol type of the client corresponding to the destination address in the response message sent by the receiving module through the unified message routing module;
and the sending module is used for sending the response message sent by the conversion module through the unified message routing module to the corresponding client unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210290553.6A CN103595695A (en) | 2012-08-15 | 2012-08-15 | Method and system for providing services by service bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210290553.6A CN103595695A (en) | 2012-08-15 | 2012-08-15 | Method and system for providing services by service bus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103595695A true CN103595695A (en) | 2014-02-19 |
Family
ID=50085678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210290553.6A Pending CN103595695A (en) | 2012-08-15 | 2012-08-15 | Method and system for providing services by service bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103595695A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105991564A (en) * | 2015-02-05 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN108449312A (en) * | 2018-01-31 | 2018-08-24 | 北京奇艺世纪科技有限公司 | A kind of method for converting protocol, device, system and gateway |
CN109120684A (en) * | 2018-08-01 | 2019-01-01 | 武汉索雅信息技术有限公司 | Informatization management method, device, ESB bus platform and storage medium |
CN112769812A (en) * | 2020-12-31 | 2021-05-07 | 天津浪淘科技股份有限公司 | Service architecture and method based on ESB |
CN113973105A (en) * | 2021-10-18 | 2022-01-25 | 湖南大学 | System and method for simplifying SOAP message on service bus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101373428A (en) * | 2007-08-24 | 2009-02-25 | 上海全成通信技术有限公司 | System for integrating intermediate parts |
CN101459609A (en) * | 2008-11-27 | 2009-06-17 | 北京思普科科技开发有限公司 | Enterprise service bus implementing method |
CN102082771A (en) * | 2009-11-30 | 2011-06-01 | 中国移动通信集团福建有限公司 | Service management middleware based on ESB (enterprise service bus) technology |
CN102143195A (en) * | 2010-07-29 | 2011-08-03 | 华为技术有限公司 | Method, device and service system providing service information |
US8095670B2 (en) * | 2007-09-11 | 2012-01-10 | International Business Machines | Protocol for enabling dynamic and scalable federation of enterprise service buses |
-
2012
- 2012-08-15 CN CN201210290553.6A patent/CN103595695A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101373428A (en) * | 2007-08-24 | 2009-02-25 | 上海全成通信技术有限公司 | System for integrating intermediate parts |
US8095670B2 (en) * | 2007-09-11 | 2012-01-10 | International Business Machines | Protocol for enabling dynamic and scalable federation of enterprise service buses |
CN101459609A (en) * | 2008-11-27 | 2009-06-17 | 北京思普科科技开发有限公司 | Enterprise service bus implementing method |
CN102082771A (en) * | 2009-11-30 | 2011-06-01 | 中国移动通信集团福建有限公司 | Service management middleware based on ESB (enterprise service bus) technology |
CN102143195A (en) * | 2010-07-29 | 2011-08-03 | 华为技术有限公司 | Method, device and service system providing service information |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105991564A (en) * | 2015-02-05 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN108449312A (en) * | 2018-01-31 | 2018-08-24 | 北京奇艺世纪科技有限公司 | A kind of method for converting protocol, device, system and gateway |
CN109120684A (en) * | 2018-08-01 | 2019-01-01 | 武汉索雅信息技术有限公司 | Informatization management method, device, ESB bus platform and storage medium |
CN109120684B (en) * | 2018-08-01 | 2021-10-01 | 武汉索雅信息技术有限公司 | Information management method and device, ESB (Enterprise service bus) platform and storage medium |
CN112769812A (en) * | 2020-12-31 | 2021-05-07 | 天津浪淘科技股份有限公司 | Service architecture and method based on ESB |
CN113973105A (en) * | 2021-10-18 | 2022-01-25 | 湖南大学 | System and method for simplifying SOAP message on service bus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106131213B (en) | Service management method and system | |
CN101022431B (en) | Interface gateway and interface gateway data processing method | |
CN101923485B (en) | JACA remote invocation method in CORBA (Common Object Request Breaker Architecture) system | |
US10063703B2 (en) | Intermediary device for data message network routing | |
CN112671697B (en) | Data processing method, device and system of comprehensive monitoring system | |
Groba et al. | Web services on embedded systems-a performance study | |
CN108769017B (en) | Data communication method and device | |
CN103595695A (en) | Method and system for providing services by service bus | |
CN101567861B (en) | Data synchronization method and application system between heterogeneous application systems | |
CN104580073B (en) | A kind of method and apparatus for realizing message transmission between heterogeneous system | |
CN111294235A (en) | Data processing method, device, gateway and readable storage medium | |
CN102946425A (en) | Uniform communication platform service integration frame based on OSGi (Open Service Gateway Initiative) | |
CN114070833A (en) | Multi-protocol service compatible method, system, device, medium, and program product | |
JP6169662B2 (en) | API conversion adapter, API conversion system, and API conversion program | |
Azzara et al. | The icsi m2m middleware for iot-based intelligent transportation systems | |
CN110166485B (en) | Protocol scheduling and using method and device | |
CN110582757A (en) | Intermediate device for network routing of data messages | |
CN105827672A (en) | Remote call method and remote call device | |
CA2543557A1 (en) | System and method for producing notification based web services | |
CN117176633A (en) | Bus cross-device communication method, device, equipment and storage medium | |
CN103533001A (en) | Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server | |
CN114501347A (en) | Information interaction method, device and system between heterogeneous systems | |
CN114050986B (en) | Signaling tracking method, device, equipment and storage medium | |
CN113918245A (en) | Data calling method, device, equipment and computer readable storage medium | |
CN111371823B (en) | Method for client to access micro-service in non-WEB scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140219 |