CN105049519A - Message routing method and system base on SOAP protocol - Google Patents
Message routing method and system base on SOAP protocol Download PDFInfo
- Publication number
- CN105049519A CN105049519A CN201510484642.8A CN201510484642A CN105049519A CN 105049519 A CN105049519 A CN 105049519A CN 201510484642 A CN201510484642 A CN 201510484642A CN 105049519 A CN105049519 A CN 105049519A
- Authority
- CN
- China
- Prior art keywords
- message
- soap
- routing
- destination server
- keyword
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to a message routing method and system base on an SOAP protocol. The method comprises the following steps: loading a route configuration file and reading route data in the route configuration file into an internal memory; monitoring and receiving an SOAP request message from a client; locating a routing keyword in the SOAP request message; searching in the route data read into the internal memory according to the routing keyword to obtain a target server URL corresponding to the routing keyword; and establishing connection between the current server and a target BSS system according to the corresponding relation of the routing keyword to the target server URL. In the message routing method, route distribution and service semanteme separation to the SOAP protocol are unrelated to the service; the message routing method is suitable for any service scene and capable of realizing the distribution of different SOAP communication messages or the configurability of routing rules; besides, the message routing method is flexible in route configuration and supports a plurality of routing modes.
Description
Technical field
The present invention relates to the communications field, particularly a kind of message route method based on soap protocol and system.
Background technology
In moving communicating field, BSS (the BusinessSupportSystem of telecom operators, business support system) system upgrade project time, consider that area has the stability of region characteristic and whole system, system project cutover is in most of the cases repeatedly cutover, for the first time cutover area.At this moment, repeatedly the scheme of cutover can cause same SOAP (SimpleObjectAccessProtocol, Simple Object Access Protocol) interface, BSS system has 2 URL addresses: new system address and legacy system address, therefore one is needed based on the Message routing program of soap protocol, realize basis section as routed keyword, carry out message distribution.The districts and cities of cutover are belonged to for a number section, forwards the packet to new system; Number section is belonged to the business of non-cutover districts and cities, forward the packet to legacy system.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of message route method based on soap protocol and system, solve client, the service end interface called or service have multiple, and the URL address of externally issuing has multiple, and URL address needs the problem by routed keyword identification.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of message route method based on soap protocol, comprises the following steps
Step 1, loads routing configuration file, the route data in routing configuration file is read in internal memory;
Step 2, monitors and receives the SOAP request message from client;
Step 3, locates routed keyword in described SOAP request message;
Step 4, retrieves in the route data reading in internal memory, obtains the destination server URL that routed keyword is corresponding;
Step 5, according to the corresponding relation of routed keyword and destination server URL, sets up the connection of current server and destination server.
The invention has the beneficial effects as follows: the route distribution of the present invention to soap protocol is separated with business semantics, with business have nothing to do, be suitable for any business scenario, realize different SOAP communication message distribution or routing rule configurable, routing configuration is flexible, supports multiple routing mode.
In order to solve the technical problem, the present invention also provides a kind of message routing system based on soap protocol, comprises configuration file load-on module, for loading routing configuration file, the route data in routing configuration file is read in internal memory;
Monitor module, for monitoring and receiving the SOAP request message from client;
Keyword locating module, for locating routed keyword in described SOAP request message;
Retrieval module, for retrieving in the route data reading in internal memory, obtains the destination server URL that routed keyword is corresponding;
Link connection module, for the corresponding relation according to routed keyword and destination server URL, sets up the connection of current server and destination server.
Accompanying drawing explanation
Fig. 1 is a kind of message route method flow chart of steps based on soap protocol of the present invention;
Fig. 2 is a kind of message routing system based on soap protocol of the present invention and external system relation schematic diagram.
Fig. 3 is a kind of message routing system internal module relation schematic diagram based on soap protocol of the present invention.
Embodiment
Be described principle of the present invention and feature below in conjunction with accompanying drawing, example, only for explaining the present invention, is not intended to limit scope of the present invention.
This technological invention based on soap protocol exploitation, for based on the servlet application program on http protocol stack.
Fig. 1 is a kind of message route method flow chart of steps based on soap protocol of the present invention;
As shown in Figure 1, a kind of message route method based on soap protocol, comprises the following steps
Step 1, loads routing configuration file, the route data in routing configuration file is read in internal memory;
Step 2, monitors and receives the SOAP request message from client.In servlet application program, can dopost method be passed through, monitor servlet request, receive the SOAP request message from client.
Step 3, locates routed keyword in described SOAP request message, in servlet application program, locate routed keyword according to xmlpath.
Step 4, according to the routed keyword of location, retrieves, obtains the destination server URL that routed keyword is corresponding in the route data reading in internal memory.
Step 5, according to the corresponding relation of routed keyword and destination server URL, set up the connection of current server and destination server, in servlet application program, HttpURLConnection can be utilized to set up iostream, thus realize the connection of setting up current server and destination server.
Also comprise after step 5
Step 6, sends SOAP request message to destination server, and accepts the response message from destination server;
Step 7, sends described response message to client, and closes connection.
Described routing configuration file describes the corresponding relation of routed keyword and destination server URL.
Also comprise before step 3, judge whether the SOAP request message received is empty, if so, then returns default-error message to client, if not, then performs step 3;
Also comprised before step 5, judge whether the destination server URL obtained is empty, if so, then returns default-error message to client, if not, then performs step 5.
In steps of 5, a thread is distributed separately, multiple thread concurrence performance for each connects.
In steps of 5, be the connect hours setting threshold of each connection, when exceeding described threshold value when attached, then automatically disconnect current connection.
Fig. 2 is a kind of message routing system based on soap protocol of the present invention and external system relation schematic diagram.As shown in Figure 2, SOAP request message is sent to the server at the message routing system place based on soap protocol by client by unified interface, after receiving SOAP request message based on the message routing system of soap protocol by unified interface, this SOAP request message is distributed in the server at target BS S system place by the message distribution mechanisms according to inside definition.
Fig. 3 is a kind of message routing system internal module relation schematic diagram based on soap protocol of the present invention.As shown in Figure 3, a kind of message routing system based on soap protocol, comprises configuration file load-on module, for loading routing configuration file, the route data in routing configuration file is read in internal memory; Monitor module, for monitoring and receiving the SOAP request message from client, can dopost method be passed through, monitor servlet request, receive the SOAP request message from client; Keyword locating module, for locating routed keyword in described SOAP request message, locates routed keyword according to xmlpath in servlet application program; Retrieval module, for retrieving in the route data reading in internal memory, obtains the destination server URL that routed keyword is corresponding; Link connection module, for the corresponding relation according to routed keyword and destination server URL, set up the connection of current server and destination server, in servlet application program, HttpURLConnection can be utilized to set up iostream, thus realize the connection of setting up current server and destination server.
Based on the message routing system of soap protocol, described routing configuration file describes the corresponding relation of routed keyword and destination server URL.
Based on the message routing system of soap protocol, also comprise request message authentication module and URL authentication module, request message authentication module is for judging whether the SOAP request message received is empty, if, then return default-error message to client, if not, then described SOAP request message is sent to keyword locating module; URL authentication module judges whether the destination server URL obtained is empty, if so, then returns default-error message to client, if not, then destination server URL is sent to link connection module.
Based on the message routing system of soap protocol, link connection module is also for distributing a thread separately, multiple thread concurrence performance for each connects.Link connection module, also for the connect hours setting threshold for each connection, when exceeding described threshold value when attached, then disconnects current connection automatically.
Embodiment one:
In Shandong UNICOM BSS system upgrade, because system project cutover is repeatedly cutover, cutover districts and cities for the first time.This project cutover, causes same SOAP interface, and BSS system has 2 URL addresses: the new URL address of system and the URL address of legacy system.Therefore, need a distributing programs based on soap protocol, realize basis section as routed keyword, the URL address that client sends is sent in target BS S system, such as, the districts and cities of cutover is belonged to for a number section, forward the packet to new BSS system; Number section is belonged to the business of non-cutover districts and cities, forward the packet to old BSS system.
For SOAP interface, increase the message routing system based on soap protocol of the present invention in the front end of BSS system side, and configure route data, routing file rt.xml sample is as follows:
By number section of cutover to new system, under being configured in <URLnew> node, as nodal value.All the other number sections do not configured, acquiescence is number section of legacy system, and a number section puts into map container.
Key position is had to be /USERSTATREQUEST/MSGBODY/MSISDN in SOAP message.First 7 that get number, whether there is value by map.get, have value then to represent and belong to new system, otherwise belong to legacy system.
Beneficial effect of the present invention is, the route distribution of soap protocol is separated with business semantics, have nothing to do with business, be suitable for any business scenario, realize different SOAP communication message distribution or routing rule configurable, routing configuration is flexible, supports multiple routing mode, as a number section route, job number route, business business etc.Use thread pool, distribution efficiency is higher.Timeouts is arranged to connection simultaneously, improve thread utilization rate, ensure thread Recycle mechanism.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. based on a message route method for soap protocol, it is characterized in that, comprise the following steps
Step 1, loads routing configuration file, the route data in routing configuration file is read in internal memory;
Step 2, monitors and receives the SOAP request message from client;
Step 3, locates routed keyword in described SOAP request message;
Step 4, retrieves in the route data reading in internal memory according to routed keyword, obtains the destination server URL that routed keyword is corresponding;
Step 5, according to the corresponding relation of routed keyword and destination server URL, sets up the connection of current server and destination server.
2. a kind of message route method based on soap protocol according to claim 1, it is characterized in that, described routing configuration file describes the corresponding relation of routed keyword and destination server URL.
3. a kind of message route method based on soap protocol according to claim 1, is characterized in that, also comprise before step 3, judge whether the SOAP request message received is empty, if so, then returns default-error message to client, if not, then step 3 is performed;
Also comprised before step 5, judge whether the destination server URL obtained is empty, if so, then returns default-error message to client, if not, then performs step 5.
4. a kind of message route method based on soap protocol according to claim 1, is characterized in that, in steps of 5, is that each connects and distributes a thread separately, multiple thread concurrence performance.
5. a kind of message route method based on soap protocol according to claim 1, it is characterized in that, in steps of 5, be the connect hours setting threshold of each connection, when exceeding described threshold value when attached, then automatically disconnects current connection.
6. based on a message routing system for soap protocol, it is characterized in that, comprise
Configuration file load-on module, for loading routing configuration file, reads in internal memory by the route data in routing configuration file;
Monitor module, for monitoring and receiving the SOAP request message from client;
Keyword locating module, for locating routed keyword in described SOAP request message;
Retrieval module, for retrieving in the route data reading in internal memory according to routed keyword, obtains the destination server URL that routed keyword is corresponding;
Link connection module, for the corresponding relation according to routed keyword and destination server URL, sets up the connection of current server and destination server.
7. a kind of message routing system based on soap protocol according to claim 6, it is characterized in that, described routing configuration file describes the corresponding relation of routed keyword and destination server URL.
8. a kind of message routing system based on soap protocol according to claim 6, it is characterized in that, also comprise request message authentication module, for judging whether the SOAP request message received is empty, if, then return default-error message to client, if not, then described SOAP request message is sent to keyword locating module;
URL authentication module, for judging whether the destination server URL obtained is empty, if so, then returns default-error message to client, if not, then destination server URL is sent to link connection module.
9. a kind of message routing system based on soap protocol according to claim 6, is characterized in that, link connection module, also for being that each connects and distributes a thread separately, multiple thread concurrence performance.
10. a kind of message routing system based on soap protocol according to claim 6, is characterized in that, link connection module, also for the connect hours setting threshold for each connection, when exceeding described threshold value when attached, then automatically disconnects current connection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510484642.8A CN105049519B (en) | 2015-08-07 | 2015-08-07 | A kind of message route method and system based on soap protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510484642.8A CN105049519B (en) | 2015-08-07 | 2015-08-07 | A kind of message route method and system based on soap protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105049519A true CN105049519A (en) | 2015-11-11 |
CN105049519B CN105049519B (en) | 2018-07-17 |
Family
ID=54455722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510484642.8A Active CN105049519B (en) | 2015-08-07 | 2015-08-07 | A kind of message route method and system based on soap protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105049519B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112769698A (en) * | 2021-01-06 | 2021-05-07 | 网宿科技股份有限公司 | Method and device for realizing routing |
CN113098792A (en) * | 2021-02-07 | 2021-07-09 | 北京思特奇信息技术股份有限公司 | Interface data communication method and system based on token binding |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1625146A (en) * | 2003-12-02 | 2005-06-08 | 华为技术有限公司 | Method and system for realizing sharing intelligent route |
CN101355492A (en) * | 2007-07-27 | 2009-01-28 | 华为技术有限公司 | Routing method and system for access protocol of simple objects as well as relevant equipment |
CN101754165A (en) * | 2008-12-01 | 2010-06-23 | 华为技术有限公司 | Routing method, system and device |
US20120016996A1 (en) * | 2010-07-16 | 2012-01-19 | Sai Samavedam | Sip-based call session server and message-routing method |
-
2015
- 2015-08-07 CN CN201510484642.8A patent/CN105049519B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1625146A (en) * | 2003-12-02 | 2005-06-08 | 华为技术有限公司 | Method and system for realizing sharing intelligent route |
CN101355492A (en) * | 2007-07-27 | 2009-01-28 | 华为技术有限公司 | Routing method and system for access protocol of simple objects as well as relevant equipment |
CN101754165A (en) * | 2008-12-01 | 2010-06-23 | 华为技术有限公司 | Routing method, system and device |
US20120016996A1 (en) * | 2010-07-16 | 2012-01-19 | Sai Samavedam | Sip-based call session server and message-routing method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112769698A (en) * | 2021-01-06 | 2021-05-07 | 网宿科技股份有限公司 | Method and device for realizing routing |
CN113098792A (en) * | 2021-02-07 | 2021-07-09 | 北京思特奇信息技术股份有限公司 | Interface data communication method and system based on token binding |
CN113098792B (en) * | 2021-02-07 | 2022-11-18 | 北京思特奇信息技术股份有限公司 | Interface data communication method and system based on token binding |
Also Published As
Publication number | Publication date |
---|---|
CN105049519B (en) | 2018-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101009662B (en) | Message processing method, system and device based on the load balance technology | |
CN106230896B (en) | A kind of information push method, apparatus and system | |
CN101442493B (en) | Method for distributing IP message, cluster system and load equalizer | |
CN101656765B (en) | Address mapping system and data transmission method of identifier/locator separation network | |
CN101488928B (en) | Internet enterprise group communication device and internet enterprise group communication method | |
US9319241B2 (en) | Flow-based packet transport device and packet management method thereof | |
US20130041943A1 (en) | Distribution system, distribution control device, and distribution control method | |
CN102301648A (en) | Scaled ethernet OAM for mesh and hub-and-spoke networks | |
GB2589211A (en) | Methods and systems of using remote subscriber identification modules at device | |
CN106713378B (en) | Method and system for providing service by multiple application servers | |
CN103067359A (en) | System and method based on connection multiplexing and capable of improving server concurrent processing capacity | |
CN108234422B (en) | Resource scheduling method and device | |
EP2439881B1 (en) | Cluster system and request message distribution method for processing multi-node transaction | |
US10069715B2 (en) | Method for deploying resource in cloud computing environment | |
CN105049519A (en) | Message routing method and system base on SOAP protocol | |
CN111600929B (en) | Transmission line detection method, routing strategy generation method and proxy server | |
CN103796191A (en) | Method, device and terminal for sending data to user terminal | |
CN101753561B (en) | Business cluster processing method and cluster system | |
CN108243170A (en) | Data access system and method based on socket frames | |
CN105743772A (en) | Message processing method and system | |
US20100075700A1 (en) | Flexible capacity short message service center (SMSC) | |
CN102497402B (en) | Content injection method and system thereof, and content delivery method and system thereof | |
CN106162940A (en) | A kind of multichannel data connection management method, system and mobile terminal | |
CN101945501A (en) | Method and device for realizing SIM card sharing of convergence terminal | |
CN112235413B (en) | Universal Internet of things interface management platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |