CN102970378A - Binary data optimized transmission system - Google Patents

Binary data optimized transmission system Download PDF

Info

Publication number
CN102970378A
CN102970378A CN2012105402401A CN201210540240A CN102970378A CN 102970378 A CN102970378 A CN 102970378A CN 2012105402401 A CN2012105402401 A CN 2012105402401A CN 201210540240 A CN201210540240 A CN 201210540240A CN 102970378 A CN102970378 A CN 102970378A
Authority
CN
China
Prior art keywords
call function
soap
file
service
processing unit
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
Application number
CN2012105402401A
Other languages
Chinese (zh)
Inventor
张家超
傅永财
朱春玲
郑扬飞
吴瑜
何岩
贾晓霞
刘毅
张勇
李聂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN2012105402401A priority Critical patent/CN102970378A/en
Publication of CN102970378A publication Critical patent/CN102970378A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a binary data optimized transmission system. After being loaded, a client-side module generates a simple object access protocol (SOAP) request message according to information which is acquired by a user in advance and input by an application service description file, and outputs the SOAP request message to a server-side module; the client-side module receives an SOAP request response message output by the server-side module, analyzes the SOAP request response message to obtain the binary data in the attachment of the SOAP request response message, and presents the binary data; the server-side module is used for presetting the application service description file, and issuing the preset application service description file, receiving the SOAP request message sent by the client-side module, inquiring to obtain the application service corresponding to the SOAP request message, processing the obtained application service information to generate the SOAP request response message, and outputting the SOAP response message to the client-side module. With the binary data optimal transmission system provided by the invention, the binary data optimized transmission function can be provided for a Web service quickly, the compatibility of binary data transmission of different application services is improved, and the data transmission efficiency is improved.

Description

Binary data optimized transmission system
Technical field
The present invention relates to Computer Applied Technology, relate in particular to the binary data optimized transmission system under a kind of Web Service environment.
Background technology
Web service (Web Service) is the distributed computing technology pattern of a kind of increasingly extensive application under the Internet technology environment.Because towards open procotol, adopt general technology and infrastructure, make its have loose couplings, with the irrelevant characteristics of language platform, open characteristics make Web Service development, thereby contain the fields such as ecommerce, enterprise's application integration (EAI, Enterprise Application Integration), middleware and Web technology.But the performance issue of Web Service is just becoming and is hindering key factor, especially Web Service that Web Service further develops show poor efficiency when the binary files such as transmission of video, audio frequency, image technological deficiency.
Existing binary data transmission plan based on Web Service, normally binary data is converted to the Base64 coding, be embedded in based on extend markup language (XML, Extensible Markup Language) Simple Object Access Protocol (SOAP of text, Simple Object Access Protocol) transmits in the message, wherein, SOAP is the standard transmission protocol of Web Service technological accumulation and inheritance.The text attribute of XML requires to convert binary file to the Base64 coding and embeds wherein.Because the coding rule of Base64, that per three 8bit byte conversion are become four 6bit bytes (3*8=4*6=24), then 6bit is added two high positions 0 again, therefore this XML serializing meeting to binary data causes the soap message volume that 33% expansion is arranged approximately.The expansion of soap message volume is not only so that efficiency of transmission is low, also so that a large amount of time and the resources of corresponding transmission course and serializing/unserializing process consumption.
Lower and transmission course and serializing/unserializing process consumes for fear of efficiency of transmission time and resource, academia and industrial quarters have proposed MTOM (MTOM, Message Transmission Optimization Mechanism), based on binary system optimization packing (XOP, XML-binary Optimized Packaging), it is external by binary data directly is encapsulated in soap message, add sign in the position that originally belongs to the Base64 coding and quote, point to the binary system accessory information.Thereby avoided the message volumetric expansion that causes because of the XML serializing, and serializing/antitone sequence process.
In present environment, although proposed the MTOM Optimization Mechanism, but the realization of MTOM is also immature, need Web Service developer for different application services, select corresponding exploitation engine, customization is issue application service method also, lacks versatility, is unfavorable for for application service provides fast, binary data transmission optimization function easily.For example, if the developer needs rapidly for finishing exploitation, the Web Service application service of disposing provides the MTOM optimized transmission of binary file, at first need in different Web Service exploitation engines, select required engine, for example, CXF, Xfire, JAX-WS, Axis, Axis2 etc., afterwards, need the developer again to write or rewrite code for the transfer function of dissimilar binary files, configuration WSDL (WSDL, Web Services Description Language) or XML organization definition (XSD, XML Schemas Definition) file, the customize services parameter is revised client-side program etc.For instance, selecting JAX-WS is that Web Service adds the binary file transfer function, at first should revise code in service end, add or revise in a large number and read, encode, generate the relevant code such as message, transmission, reception for dissimilar binary files; Afterwards, revise XSD file and wsdl document, function newly-increased to the service of using or that upgrade is stated, and is again issued application service according to XSD file and the wsdl document revised; At last, in the program segment of client, by the code segment editor, add the program relevant with reception application service file etc.
In addition, for the performance test of Web Service, often need to be by external professional tool, but some professional test instruments, such as LoadRunner etc., Web Service test function and inadequate bottom, the bottom soap message that can't directly serve for difference carries out obtaining of performance data.
As seen by above-mentioned, prior art adopts the Base64 coding that binary data is carried out the method for XML serializing transmission binary data, causes that soap message expands, efficiency of transmission is lower, has affected the performance performance of Web Service; And adopt improved MTOM Optimization Mechanism to transmit binary data, also lacking to provide quick realization, convenient general optimum solution of disposing for the different application service, need to for different application services carry out XSD file and wsdl document modification, issue and write the program code segments of client, so that the transmission of the binary data of application service is compatible low, cause data transmission efficiency not high.
Summary of the invention
Embodiments of the invention provide a kind of binary data optimized transmission system, fast for Web service provides binary data optimized transmission function, improve compatibility, the improving data transmission efficiency of the binary data transmission of different application service.
For achieving the above object, a kind of binary data optimized transmission system that the embodiment of the invention provides comprises: client modules and service end module, wherein,
Client modules is used for after loading, and the information of the application service description document input of obtaining in advance according to the user generates the simple object access protocol request message, exports the service end module to; Receive the SOAP request response of service end module output, resolve, obtain the binary data that comprises in the SOAP request response annex, show;
The service end module is used for setting in advance the application service description document and issuing; Receive the SOAP request message that client modules sends, application service corresponding to SOAP request message obtained in inquiry, and the application service information of obtaining is processed, and generates the SOAP request response, exports client modules to.
Preferably, described client modules comprises: soap message processing unit, File Upload processing unit and file are downloaded receiving element, wherein,
The soap message processing unit is used for receiving the user according to the information of the application service description document of obtaining in advance in the bottom input, and the information of File Upload processing unit output, generates the SOAP request message, exports the service end module to; Receive file and download the SOAP request response of receiving element output, resolve, obtain the metadata and the binary data that comprise in the SOAP request response, document No. in the expandable mark language XML is reduced into the binary stream file that binary file or direct construction receive, and shows;
The File Upload processing unit is used for according to application service to be uploaded, reads binary data stream corresponding to uploading pictures, audio frequency, video that sets in advance, and exports the soap message processing unit to;
File is downloaded receiving element, is used for receiving the SOAP request response that the service end module issues, and passes to the soap message processing unit.
Preferably, described soap message processing unit generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
Preferably, described binary data comprises: image data, video data and voice data, wherein,
The File Upload processing unit is by call function getImage uploading pictures data, and by call function getVideo uploaded videos data, getAudio uploads voice data by call function.
Preferably, described file is downloaded receiving element and is further used for after the soap message processing unit obtains the metadata and binary data that comprises in the SOAP request response, create the image data store path by call function creatImage, create the Video Data Storage path by call function creatVideo, create the voice data store path by call function creatAudio.
Preferably, described client modules further comprises:
The service parameter customization units is used for the service parameter that customization is used for the performance test function, is used for the SOAP request message that comprises binary data of test according to the service parameter transmission of customization;
The performance data acquiring unit is used for reading the flow monitoring data that third party's instrument provides, and the timestamp information additional according to the SOAP request response obtains performance data.
Preferably, described service parameter comprises: parameter, Thread Count parameter, every thread request are counted a kind of or combination in any in parameter, action type parameter, binary message genre parameters, file type parameters, file size parameter, the buffer size parameter in limited time.
Preferably, described service parameter customization units is by call function setType setting operation type parameter, by call function setFsize the file size parameter is set, setFtype arranges file type parameters by call function, by call function setBuffer the buffer size parameter is set, by call function setThread the Thread Count parameter is set.
Preferably, described performance data acquiring unit obtains the throughput performance data by call function getThroughout; Obtain the average response performance data by call function calAverage; Process the number performance data by the request that call function calCnt obtains in the statistics restriction duration; Obtain daily record write performance data by call function writeLog.
Preferably, described service end module comprises: soap message processing unit, File Upload receiving element, file download processing unit, WSDL WSDL dispensing unit and end points release unit, wherein,
The soap message processing unit is used for receiving the SOAP request message at bottom, if comprise the inquiry sign, exports the File Upload receiving element to, if comprise and upload sign, resolves the SOAP request message, obtains binary data, exports the file download processing unit to; Obtain the binary implementation service data of file download processing unit output, be encapsulated in the SOAP request response, export client modules to;
The File Upload receiving element is used for receiving the SOAP request message that the soap message processing unit is exported, and the application service data that comprise metadata and binary data corresponding to SOAP request message are obtained in inquiry, export the soap message processing unit to;
The file download processing unit is used for receiving the binary data that the soap message processing unit is exported, and stores;
The WSDL dispensing unit, for the application service of reading announced Web Service WSDL is described, obtain the application service description document, make amendment and the statement of new function, and will make amendment and the application service description document of new function statement exports the end points release unit to;
The end points release unit is used for receiving the application service description document that the WSDL dispensing unit is exported, and carries out end points and creates and dispose, and issue the application service description document by the end points of configuration.
Preferably, described soap message processing unit generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
Preferably, described File Upload receiving element obtains the image data of binary data stream corresponding to SOAP request message by call function getImage, obtain video data corresponding to SOAP request message by call function getVideo, obtain voice data corresponding to SOAP request message by call function getAudio.
Preferably, described file download processing unit creates the image data store path by call function creatImage, creates the Video Data Storage path by call function creatVideo, creates the voice data store path by call function creatAudio.
Preferably, described File Upload receiving element and file download processing unit are shared call function getRawbytes, are used for obtaining binary data byte stream information.
Preferably, described WSDL dispensing unit obtains the application service wsdl document of configuration by call function getWSDL; By call function editWSDL editing application service wsdl document; By call function setWSDL configuration application service wsdl document.
Preferably, described end points release unit creates end points by call function creatEndpoint; By call function configEndpoint configuration end points; By call function publish publishing side dot information.
Preferably, described this service end module further comprises:
The service parameter dispensing unit is used for the service parameter of client modules customization is configured.
Preferably, described service parameter dispensing unit can obtain the action type parameter by call function getType, obtain the file size parameter by call function getFsize, getFtype obtains file type parameters by call function, obtain the buffer size parameter by call function getBuffer, obtain the Thread Count parameter by call function getThread.
As seen from the above technical solution, a kind of binary data optimized transmission system that the embodiment of the invention provides, client modules is used for after loading, the information of the application service description document input of obtaining in advance according to the user, generate the simple object access protocol request message, export the service end module to; Receive the SOAP request response of service end module output, resolve, obtain the binary data that comprises in the SOAP request response annex, show; The service end module is used for setting in advance the application service description document and issuing; Receive the SOAP request message that client modules sends, application service corresponding to SOAP request message obtained in inquiry, and the application service information of obtaining is processed, and generates the SOAP request response, exports client modules to.Like this, by realizing general binary file upload and download function, automatically read service describing, the newly-increased method of interpolation, automatically end points issue, can fast for Web service provides binary data optimized transmission function, improve compatibility, the improving data transmission efficiency of the binary data transmission of different application service.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art.Apparently, the accompanying drawing in below describing only is some embodiments of the present invention, for those of ordinary skills, can also obtain according to these accompanying drawing illustrated embodiments other embodiment and accompanying drawing thereof.
Fig. 1 is embodiment of the invention binary data optimized transmission system configuration schematic diagram.
Fig. 2 is embodiment of the invention client modules structural representation.
Fig. 3 is embodiment of the invention service end modular structure schematic diagram.
Fig. 4 is the performance parameter schematic diagram that the embodiment of the invention is obtained.
Fig. 5 is the method idiographic flow schematic diagram that the embodiment of the invention is optimized the binary data transmission.
Embodiment
Below with reference to accompanying drawing the technical scheme of various embodiments of the present invention is carried out clear, complete description, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are resulting all other embodiment under the prerequisite of not making creative work, all belong to the scope that the present invention protects.
The improved MTOM Optimization Mechanism the transmission of data of existing employing, need to for different application services carry out XSD file and wsdl document modification, issue and write the program code segments of client, shortage can provide quick realization, convenient general optimum solution of disposing for the difference service, so that the binary data transmission of different application service is compatible low.
In the embodiment of the invention, consider that WSDL is the language of an XML-based, be used for describing Web service and function, parameter and return value, can generate wsdl document according to Web service, can import wsdl document again, generate the code that calls corresponding Web service.Thereby, transmission optimization principle based on WSDL and MTOM, a kind of general binary data optimized transmission system of similar plug and play assembly effect is provided, utilize JAVA language and JAX-WS bottom operation soap message, realize general binary file upload and download function, automatically read service describing, the newly-increased method of interpolation, automatically end points issue, can be quoted by existing Web Service, thereby realize easily and quickly plug and play for the uploading/download function of binary file, i.e. binary data transmission optimization; Further, cooperate by targetedly cooperation, for example, upload operation receives with uploading reception, down operation and download, and the design that namely separates by module has guaranteed the versatility of system and the quick realization that MTOM optimizes; And, the embodiment of the invention has realized the customization of client to service parameter, design and Implement the module of obtaining Web Service transmission performance data, bottom, accurate performance test function are provided, thereby quick, general, easily Web Service binary data transmission optimization and testing tool are provided.
Fig. 1 is embodiment of the invention binary data optimized transmission system configuration schematic diagram.Referring to Fig. 1, this system comprises: client modules (Client Module) and service end module (Server Module), and client modules and the work of service end module cooperative are uploaded/download function for Web Service provides general binary file, wherein
Client modules is used for after loading, and the information of the application service description document input of obtaining in advance according to the user generates the SOAP request message, exports the service end module to; Receive the SOAP request response of service end module output, resolve, obtain the binary data that comprises in the SOAP request response annex, show;
In the embodiment of the invention, the user inputs keyword to be checked by client modules, and client modules generates the SOAP request message according to the keyword of user's input.
The SOAP request message comprises source body and annex, and wherein, source body comprises: the parameter name of the application service title of request, the application service of request and the incidence relation of parameter name and annex; Annex comprises: the binary data that annex metadata information and attachment files comprise.About detailed construction and the description of SOAP request message, identical with existing soap message, specifically can referring to the correlation technique document, not repeat them here.
The application service description document comprises: wsdl document is described in application service and the XSD file is described in application service.In the embodiment of the invention, describe wsdl document take application service and describe as example.
The service end module is used for setting in advance the application service description document and issuing; Receive the SOAP request message that client modules sends, application service corresponding to SOAP request message obtained in inquiry, and the application service information of obtaining is processed, and generates the SOAP request response, exports client modules to.
In the embodiment of the invention, after setting in advance the application service description document and issue in the service end module, the user can obtain the associated description information of application service, for example, and the function that application service comprises, modification or the renewal carried out using service function.
With the application service information of the metadata that comprises application service obtained and the binary data annex as the SOAP request response.
Fig. 2 is embodiment of the invention client modules structural representation.Referring to Fig. 2, this client modules comprises: soap message is processed (SOAPHandler) unit, File Upload processing unit and file and is downloaded receiving element, wherein,
The soap message processing unit is used for receiving the user according to the information of the application service description document of obtaining in advance in the bottom input, and the information of File Upload processing unit output, generates the SOAP request message, exports the service end module to; Receive file and download the SOAP request response of receiving element output, resolve, obtain the metadata and the binary data that comprise in the SOAP request response, document No. in the expandable mark language XML is reduced into the binary stream file that binary file or direct construction receive, and shows;
In the embodiment of the invention, the soap message processing unit is used in the bottom generation, sends, receives, resolves soap message.Wherein, soap message comprises: SOAP request message and SOAP request response.
The soap message processing unit is encoded data waiting for transmission (data to be uploaded of user's input or the output of File Upload processing unit) at bottom, to comprise the application service information of the metadata of application service and binary data as the annex of SOAP request message, generate the SOAP request message, export the service end module to; Receive file and download the SOAP request response of receiving element output, resolve, obtain the binary data in the annex in the SOAP request response, and show.Detailed description about the generation of soap message processing unit, transmission, reception, parsing soap message specifically can referring to the correlation technique document, not repeat them here.
In the embodiment of the invention, the soap message processing unit generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
File Upload is processed (uploadOpera) unit, is used for according to application service to be uploaded, reads the binary data stream that sets in advance, and exports the soap message processing unit to;
In the embodiment of the invention, the File Upload processing unit is used for the binary data that the user arranges is uploaded, and shares realizing.
Binary data comprises: image data, video data and voice data, wherein,
By call function getImage uploading pictures data, by call function getVideo uploaded videos data, getAudio uploads voice data by call function.
File is downloaded and is received (downloadRece) unit, is used for receiving the SOAP request response that the service end module issues, and passes to the soap message processing unit.
In the embodiment of the invention, file is downloaded receiving element and is used for downloading application service corresponding to SOAP request message from the service end module, call the getRawbytes(String name in the downloadRece class) and createImage() method, corresponding JPG format-pattern generated.
File is downloaded receiving element and is further used for after the soap message processing unit obtains the metadata and binary data that comprises in the SOAP request response, the metadata of storing and resolving and binary data, specifically,
Create the image data store path by call function creatImage, create the Video Data Storage path by call function creatVideo, create the voice data store path by call function creatAudio.
File Upload processing unit and file download receiving element can be shared call function getRawbytes and obtain binary data byte stream information.
Preferably, client modules further comprises:
Service parameter (setPara) customization units is used for the service parameter that customization is used for the performance test function, is used for the SOAP request message that comprises binary data of test according to the service parameter transmission of customization;
In the embodiment of the invention, service parameter comprises: parameter, Thread Count parameter, every thread request are counted a kind of or combination in any in parameter, action type parameter, binary message genre parameters, file type parameters, file size parameter, the buffer size parameter in limited time.
By call function setType setting operation type parameter, by call function setFsize the file size parameter is set, setFtype arranges file type parameters by call function, by call function setBuffer the buffer size parameter is set, by call function setThread the Thread Count parameter is set.
Table 1 is the service parameter table of embodiment of the invention customization.
Table 1
Parameter Value
In limited time [300s,600s,...,1800s]
Thread Count 1~20
Every thread request number 1~5
Action type Download, upload
The binary message style Base64,MTOM
File type Text, binary system (picture, video, audio frequency)
File size 10KB~30M
Buffer size (512,1024,2048)KB
In the table 1, the value of parameter can be 300,600,900,1200,1500 or 1800 seconds in limited time; The value of Thread Count parameter can be 1~20; Every thread request is counted parameter can be 1~5; The action type parameter comprises upload operation and down operation; The binary message genre parameters comprises Base64 coded format and MTOM coded format; File type parameters comprises text (text) file and binary file; The file size parameter can be set to 10KB~30M; The buffer size parameter can be set to 512KB, 1024KB or 2048KB.
Performance data is obtained (getPerform) unit, is used for reading the flow monitoring data that third party's instrument provides, and timestamp (Timestamp) information additional according to the SOAP request response is obtained performance data.
In the embodiment of the invention, the performance data acquiring unit plays a leading role in the performance test function.The timestamp information that the performance data acquiring unit is additional according to the SOAP request response calculates average response time, and the performance datas such as number are processed in the request that statistics limits in the duration.
Obtain the throughput performance data by call function getThroughout; Obtain the average response performance data by call function calAverage; Process the number performance data by the request that call function calCnt obtains in the statistics restriction duration; Obtain daily record write performance data by call function writeLog.
Service parameter shown in the table 1 that provides by client modules, Web Service client modules user can to transmission in limited time, the buffer size of request thread number, action type (download or upload), message style, file type, transmission of messages etc., the timestamp (Timestamp) that adds by by bottom transmitting-receiving soap message the time calculates average response time, and passes through getThroughout() method reads the flow monitoring of third party's instrument.
Fig. 3 is embodiment of the invention service end modular structure schematic diagram.Referring to Fig. 3, this service end module comprises: soap message processing unit, File Upload receiving element, file download processing unit, WSDL dispensing unit and end points release unit, wherein,
The soap message processing unit is used for receiving the SOAP request message at bottom, if comprise the inquiry sign, exports the File Upload receiving element to, if comprise and upload sign, resolves the SOAP request message, obtains binary data, exports the file download processing unit to; Obtain the binary implementation service data of file download processing unit output, be encapsulated in the SOAP request response, export client modules to;
In the embodiment of the invention, the soap message processing unit is used in the bottom generation, sends, receives, resolves soap message.
Similar with the soap message processing unit in the client modules, soap message processing unit in the service end module generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
File Upload receives (uploadRece) unit, be used for receiving the SOAP request message of soap message processing unit output, the application service data that comprise metadata and binary data corresponding to SOAP request message are obtained in inquiry, export the soap message processing unit to;
In the embodiment of the invention, obtain voice data corresponding to SOAP request message with function getAudio.
File download process (downloadOpera) unit is used for receiving the binary data that the soap message processing unit is exported, and stores;
In the embodiment of the invention, the file download processing unit creates the image data store path by call function creatImage, create the Video Data Storage path by call function creatVideo, create the voice data store path by call function creatAudio.
File Upload receiving element and file download processing unit can be shared call function getRawbytes and obtain binary data byte stream information.
The WSDL dispensing unit, for the application service of reading announced Web Service WSDL is described, obtain the application service description document, make amendment and the statement of new function, and will make amendment and the application service description document of new function statement exports the end points release unit to;
In the embodiment of the invention, the WSDL dispensing unit obtains the application service wsdl document of configuration by call function getWSDL; By call function editWSDL editing application service wsdl document; By call function setWSDL configuration application service wsdl document, namely information on services is made amendment and new function statement to using.Specifically,
The WSDL dispensing unit calls the getWSDL function by the getWSDL method, reads pre-configured service describing wsdl document;
In the embodiment of the invention, for instance, if the service uniform resource locator (URL of the pre-configured service describing wsdl document of disposing operation, Uniform Resource Locator) be http: // 192.168.101.63:9876/TestService, then getWSDL method (getWSDL function) will be downloaded http automatically: schemaLocation field TestService.xsd file pointed among // 192.168.101.63:9876/TestService wsdl and the wsdl, and the two is saved among the temporary folder/temp that sets in advance.
The WSDL dispensing unit passes through the editWSDL method, and the API according to do4j provides resolves and edits wsdl file and xsd file, upload resolving and edit the file that obtains/method for down loading is stated and the service parameter of customization disposes.
The end points release unit is used for receiving the application service description document that the WSDL dispensing unit is exported, and carries out end points and creates and dispose, and issue the application service description document by the end points of configuration.
In the embodiment of the invention, the end points release unit creates end points by call function creatEndpoint; By call function configEndpoint configuration end points; By call function publish publishing side dot information.
Preferably, this service end module can further include:
Service parameter configuration (configurePara) unit is used for the service parameter of client modules customization is configured.
In the embodiment of the invention, similar with the service parameter customization units, the service parameter dispensing unit can obtain the action type parameter by call function getType, obtain the file size parameter by call function getFsize, getFtype obtains file type parameters by call function, obtain the buffer size parameter by call function getBuffer, obtain the Thread Count parameter by call function getThread.
Fig. 4 is the performance parameter schematic diagram that the embodiment of the invention is obtained.Referring to Fig. 4, first classifies binary message style (style) as, comprises MTOM and Base64; (in limited time, t-limit), the 3rd binary file size (size) of classifying transmission as, the 4th classifies average response time (average) as to the second restriction duration of classifying test as; The 5th classifies Best-case Response Time (min) as; The 6th classifies maximum response time (max) as; The 7th classifies successful number of request (success) as; The 8th classifies the number of request (failure) of failure as; The 9th classifies throughput (bytes) as.Wherein, throughput is the flow monitoring information of third party's instrument of reading by getThroughout () method.In the practical application, the performance parameter of obtaining (performance data) can write in the log.txt file that sets in advance.By the performance data that analysis is obtained, can obtain accurate Web Service transmission performance optimization effect.For example, based on base64 and MTOM dual mode, corresponding performance data of picture that size is 1445K in the statistical chart 4 respectively, it is as shown in table 2 to obtain respectively number of request successful in time in limited time.
Table 2
? 600s 1200s 1800s
base64 2845 5636 8372
MTOM 3722 7472 11148
Performance boost 30.83% 32.58% 33.16%
By as seen from Table 2, be the picture transmission performance data of 1445K for size, within 600 seconds, 1200 seconds, 1800 seconds three groups of time, transmission performance corresponding to MTOM mode obviously is better than transmission performance corresponding to base64 mode, in limiting time, process successful transmission number of request as basis, adopt the MTOM optimal way, than adopting the base64 mode, within 600 seconds, 1200 seconds, 1800 seconds three groups of time, obtained respectively 30.83%, 32.58%, 33.16% transmission performance optimization.
By as seen above-mentioned, in the embodiment of the invention, take the effect of plug and play assembly as target, employing JAVA is development language, the bottom SOAP operation A PI that provides take JAX-WS is the basis, and all functions and function, method all center on the bottom operation (generate, send, receive and parsing) of SOAP and launch.
Below take the picture of downloading the JPG form as example, the optimization method of the embodiment of the invention is elaborated.
Fig. 5 is the method idiographic flow schematic diagram that the embodiment of the invention is optimized the binary data transmission.Referring to Fig. 5, this flow process comprises:
Step 501, loading service end module and client modules;
In this step, in the Web Service service end of having disposed, by the mode of plug and play, quote the service end module that the embodiment of the invention provides, in Web Service client, quote the client modules that the embodiment of the invention provides.For instance, if the Web Service service end of having disposed adopts the Java language exploitation, can by directly introducing Java archive file (JAR, the Java Archive) packet form of (import) embodiment of the invention tool-class, can possess the intact various application service methods of encapsulation.
Step 502, client modules are called parameters (setPara) method, the customization performance parameter of customized application service.
In this step, the customization parameter of service has important function for performance test function of the present invention.This step is optional step, can skip, if there is not customized parameter, can carry out the binary file transmission that MTOM optimizes according to default parameters.
Step 503, the service end module is called the configureWSDL method, finishes application service and describes automatically reading, dispose and setting of wsdl document.
This step comprises:
The WSDL dispensing unit calls the getWSDL function by the getWSDL method, reads pre-configured application service and describes wsdl document;
In this step, for instance, if the service uniform resource locator (URL of the pre-configured service describing wsdl document of disposing operation, Uniform Resource Locator) be http: // 192.168.101.63:9876/TestService, then getWSDL method (getWSDL function) will be downloaded http automatically: schemaLocation field TestService.xsd file pointed among // 192.168.101.63:9876/TestService wsdl and the wsdl, and the two is saved among the temporary folder/temp that sets in advance;
The WSDL dispensing unit passes through the editWSDL method, and the API according to do4j provides resolves and edits wsdl file and xsd file, upload resolving and edit the file that obtains/method for down loading is stated and the service parameter of customization disposes;
In this step, the service parameter configuration can be base64 or MTOM coded system.For example, in the xsd file, add the getImage method statement of transmitting for image file base64 mode, specifically, in the xsd file, add following xml fragment:
Figure BDA00002579684400141
The WSDL dispensing unit is preserved wsdl and xsd file after editing by the setWSDL method, calls end points issue (endpointPublish) method.
In this step, wsdl and xsd file behind the editor are kept among temporary folder/temp, and call the endpointPublish method.
Step 504, the service end module is called the endpointPublish method, issue application service description document information.
In this step, the service end module is called the endpointPublish method, by creating port (createEndpoint), configured port (configEndpoint), issue (publish), is responsible for respectively establishment, configuration and the issue of serve port.In the embodiment of the invention, be dependent on/the temp file in amended wsdl and xsd file create service, for example, designated port is 9876, service TestService by name, the URL that then comprises in the application service description document information of Web Service issue is http: // 192.168.101.63:9876/TestService.
Step 505, client modules generate bottom SOAP request message, are sent to the service end module.
In this step, the user generates the SOAP request message by client modules, is used for obtaining the picture of JPG form.
Step 506, the service end module receives the SOAP request message, and resolves, and obtains the binary data stream of the image of request, generates the SOAP request response, exports client modules to.
In this step, the service end module receives the SOAP request message, call getImage(String name in the file down operation downloadOpera class according to the file type of asking) and getRawBytes(String name) method, obtain the binary data stream of the image of request, and go to generation, transmission that SOAPHandler carries out the SOAP request response.
Step 507, client modules receive the SOAP request response, resolve, and call the getRawbytes(String name in the downloadRece class) and createImage() method, corresponding JPG format-pattern generated.
In the embodiment of the invention, can be applied to the binary file transmitting scene of project team's information system, make fast existing Web Service use the binary data transfer function of realizing that MTOM optimizes, and integrated accurate Web Service transmission performance test function, be a kind of effective current techique scheme.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also comprises these changes and modification interior.

Claims (18)

1. binary data optimized transmission system is characterized in that this system comprises: client modules and service end module, wherein,
Client modules is used for after loading, and the information of the application service description document input of obtaining in advance according to the user generates the simple object access protocol request message, exports the service end module to; Receive the SOAP request response of service end module output, resolve, obtain the binary data that comprises in the SOAP request response annex, show;
The service end module is used for setting in advance the application service description document and issuing; Receive the SOAP request message that client modules sends, application service corresponding to SOAP request message obtained in inquiry, and the application service information of obtaining is processed, and generates the SOAP request response, exports client modules to.
2. system according to claim 1 is characterized in that, described client modules comprises: soap message processing unit, File Upload processing unit and file are downloaded receiving element, wherein,
The soap message processing unit is used for receiving the user according to the information of the application service description document of obtaining in advance in the bottom input, and the information of File Upload processing unit output, generates the SOAP request message, exports the service end module to; Receive file and download the SOAP request response of receiving element output, resolve, obtain the metadata and the binary data that comprise in the SOAP request response, document No. in the expandable mark language XML is reduced into the binary stream file that binary file or direct construction receive, and shows;
The File Upload processing unit is used for according to application service to be uploaded, reads binary data stream corresponding to uploading pictures, audio frequency, video that sets in advance, and exports the soap message processing unit to;
File is downloaded receiving element, is used for receiving the SOAP request response that the service end module issues, and passes to the soap message processing unit.
3. system according to claim 2, it is characterized in that, described soap message processing unit generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
4. system according to claim 3 is characterized in that, described binary data comprises: image data, video data and voice data, wherein,
The File Upload processing unit is by call function getImage uploading pictures data, and by call function getVideo uploaded videos data, getAudio uploads voice data by call function.
5. system according to claim 4, it is characterized in that, described file is downloaded receiving element and is further used for after the soap message processing unit obtains the metadata and binary data that comprises in the SOAP request response, create the image data store path by call function creatImage, create the Video Data Storage path by call function creatVideo, create the voice data store path by call function creatAudio.
6. according to claim 2 to 5 each described systems, it is characterized in that described client modules further comprises:
The service parameter customization units is used for the service parameter that customization is used for the performance test function, is used for the SOAP request message that comprises binary data of test according to the service parameter transmission of customization;
The performance data acquiring unit is used for reading the flow monitoring data that third party's instrument provides, and the timestamp information additional according to the SOAP request response obtains performance data.
7. system according to claim 6, it is characterized in that described service parameter comprises: parameter, Thread Count parameter, every thread request are counted a kind of or combination in any in parameter, action type parameter, binary message genre parameters, file type parameters, file size parameter, the buffer size parameter in limited time.
8. system according to claim 7, it is characterized in that, described service parameter customization units is by call function setType setting operation type parameter, by call function setFsize the file size parameter is set, setFtype arranges file type parameters by call function, by call function setBuffer the buffer size parameter is set, by call function setThread the Thread Count parameter is set.
9. system according to claim 8 is characterized in that, described performance data acquiring unit obtains the throughput performance data by call function getThroughout; Obtain the average response performance data by call function calAverage; Process the number performance data by the request that call function calCnt obtains in the statistics restriction duration; Obtain daily record write performance data by call function writeLog.
10. system according to claim 1 is characterized in that, described service end module comprises: soap message processing unit, File Upload receiving element, file download processing unit, service description language (sdl) WSDL dispensing unit and end points release unit, wherein,
The soap message processing unit is used for receiving the SOAP request message at bottom, if comprise the inquiry sign, exports the File Upload receiving element to, if comprise and upload sign, resolves the SOAP request message, obtains binary data, exports the file download processing unit to; Obtain the binary implementation service data of file download processing unit output, be encapsulated in the SOAP request response, export client modules to;
The File Upload receiving element is used for receiving the SOAP request message that the soap message processing unit is exported, and the application service data that comprise metadata and binary data corresponding to SOAP request message are obtained in inquiry, export the soap message processing unit to;
The file download processing unit is used for receiving the binary data that the soap message processing unit is exported, and stores;
The WSDL dispensing unit, for the application service of reading announced Web Service WSDL is described, obtain the application service description document, make amendment and the statement of new function, and will make amendment and the application service description document of new function statement exports the end points release unit to;
The end points release unit is used for receiving the application service description document that the WSDL dispensing unit is exported, and carries out end points and creates and dispose, and issue the application service description document by the end points of configuration.
11. system according to claim 10, it is characterized in that, described soap message processing unit generates soap message by call function creatSoap, send soap message by call function sendSoap, receive soap message by call function receiveSoap, resolve soap message by call function encodeSoap.
12. system according to claim 11, it is characterized in that, described File Upload receiving element obtains the image data of binary data stream corresponding to SOAP request message by call function getImage, obtain video data corresponding to SOAP request message by call function getVideo, obtain voice data corresponding to SOAP request message by call function getAudio.
13. system according to claim 12, it is characterized in that, described file download processing unit creates the image data store path by call function creatImage, create the Video Data Storage path by call function creatVideo, create the voice data store path by call function creatAudio.
14. system according to claim 13 is characterized in that, described File Upload receiving element and file download processing unit are shared call function getRawbytes, are used for obtaining binary data byte stream information.
15. system according to claim 14 is characterized in that, described WSDL dispensing unit obtains the application service wsdl document of configuration by call function getWSDL; By call function editWSDL editing application service wsdl document; By call function setWSDL configuration application service wsdl document.
16. system according to claim 15 is characterized in that, described end points release unit creates end points by call function creatEndpoint; By call function configEndpoint configuration end points; By call function publish publishing side dot information.
17. to 16 each described systems, it is characterized in that according to claim 10 described this service end module further comprises:
The service parameter dispensing unit is used for the service parameter of client modules customization is configured.
18. system according to claim 17, it is characterized in that, described service parameter dispensing unit can obtain the action type parameter by call function getType, obtain the file size parameter by call function getFsize, getFtype obtains file type parameters by call function, obtain the buffer size parameter by call function getBuffer, obtain the Thread Count parameter by call function getThread.
CN2012105402401A 2012-12-13 2012-12-13 Binary data optimized transmission system Pending CN102970378A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105402401A CN102970378A (en) 2012-12-13 2012-12-13 Binary data optimized transmission system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105402401A CN102970378A (en) 2012-12-13 2012-12-13 Binary data optimized transmission system

Publications (1)

Publication Number Publication Date
CN102970378A true CN102970378A (en) 2013-03-13

Family

ID=47800257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105402401A Pending CN102970378A (en) 2012-12-13 2012-12-13 Binary data optimized transmission system

Country Status (1)

Country Link
CN (1) CN102970378A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546553A (en) * 2013-10-18 2014-01-29 深圳市金立通信设备有限公司 File sharing method and related equipment
CN103701773A (en) * 2013-11-29 2014-04-02 金蝶软件(中国)有限公司 File transmission and service calling methods and systems based on Web Service
CN104079656A (en) * 2014-07-07 2014-10-01 用友软件股份有限公司 Efficiency optimization device and method for soap messages in webService
CN104869026A (en) * 2014-02-24 2015-08-26 大唐软件技术股份有限公司 Method, access equipment and gateway equipment for LAN (Local Area Network) background flow detection
CN106101219A (en) * 2016-06-08 2016-11-09 杭州迪普科技有限公司 The data transmission method of sing on web Service and device
CN108370385A (en) * 2015-11-13 2018-08-03 微软技术许可有限责任公司 Pass through network transmission container file
CN109299059A (en) * 2018-11-16 2019-02-01 北京锐安科技有限公司 File storage, search method, device, storage medium and server
CN109862095A (en) * 2019-01-30 2019-06-07 新华三大数据技术有限公司 Data processing method and device based on Web service
CN110557378A (en) * 2019-08-02 2019-12-10 西安飞机工业(集团)有限责任公司 network boundary security isolation and information one-way transmission system and transmission method
CN113065049A (en) * 2021-03-19 2021-07-02 深圳市腾讯网域计算机网络有限公司 Data capture method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645785A (en) * 2009-04-30 2010-02-10 中国科学院声学研究所 Data-intensive multimedia service calling method based on extended SOAP
CN102710460A (en) * 2012-05-14 2012-10-03 南京邮电大学 Frame-based automatic generating method for Web service test data
US20120265992A1 (en) * 2010-02-26 2012-10-18 Nec Europe Ltd. Method for processing a soap message within a network and a network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645785A (en) * 2009-04-30 2010-02-10 中国科学院声学研究所 Data-intensive multimedia service calling method based on extended SOAP
US20120265992A1 (en) * 2010-02-26 2012-10-18 Nec Europe Ltd. Method for processing a soap message within a network and a network
CN102710460A (en) * 2012-05-14 2012-10-03 南京邮电大学 Frame-based automatic generating method for Web service test data

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546553A (en) * 2013-10-18 2014-01-29 深圳市金立通信设备有限公司 File sharing method and related equipment
CN103701773A (en) * 2013-11-29 2014-04-02 金蝶软件(中国)有限公司 File transmission and service calling methods and systems based on Web Service
CN104869026B (en) * 2014-02-24 2019-08-23 大唐软件技术股份有限公司 Method, access device and gateway for the detection of local area network background traffic
CN104869026A (en) * 2014-02-24 2015-08-26 大唐软件技术股份有限公司 Method, access equipment and gateway equipment for LAN (Local Area Network) background flow detection
CN104079656B (en) * 2014-07-07 2018-08-31 用友网络科技股份有限公司 The efficiency optimizing apparatus and method of soap message in webService
CN104079656A (en) * 2014-07-07 2014-10-01 用友软件股份有限公司 Efficiency optimization device and method for soap messages in webService
CN108370385A (en) * 2015-11-13 2018-08-03 微软技术许可有限责任公司 Pass through network transmission container file
CN108370385B (en) * 2015-11-13 2021-06-15 微软技术许可有限责任公司 System, method and computer readable medium for transmitting container file over network
CN106101219A (en) * 2016-06-08 2016-11-09 杭州迪普科技有限公司 The data transmission method of sing on web Service and device
CN109299059A (en) * 2018-11-16 2019-02-01 北京锐安科技有限公司 File storage, search method, device, storage medium and server
CN109862095A (en) * 2019-01-30 2019-06-07 新华三大数据技术有限公司 Data processing method and device based on Web service
CN110557378A (en) * 2019-08-02 2019-12-10 西安飞机工业(集团)有限责任公司 network boundary security isolation and information one-way transmission system and transmission method
CN113065049A (en) * 2021-03-19 2021-07-02 深圳市腾讯网域计算机网络有限公司 Data capture method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN102970378A (en) Binary data optimized transmission system
CN106685942B (en) Video live broadcast playback system and video live broadcast playback method
CN103002274B (en) A kind of mobile multimedia real-time transcoding Play System and method of downloading based on off-line
CN101719902B (en) Remote procedure calling (PRC) method and system
CN103583008B (en) To the expansion of the trigger parameter list for interactive television
KR102040623B1 (en) Apparatus and method for processing an interactive service
US8543646B2 (en) Subscriber device and subscription management that supports real-time communication
CN101405723B (en) Estimation of initial dynamic rendering control data
JP6251181B2 (en) Reception device, reception method, transmission device, transmission method, and program
KR20100085725A (en) Method and apparatus for providing and reproducing content information
CN103531218B (en) A kind of online multimedia file editing method and system
CN107566477B (en) Method and device for acquiring files in distributed file system cluster
JP6338709B2 (en) Streaming apparatus and method thereof, streaming service system using the same, and computer-readable recording medium (streaming apparatus and method thereof, streaming service system using the streaming medium and computer readable)
CN101510898A (en) Method for uploading and downloading data, network node and communication system
CN102868707A (en) Method and system for downloading and transcoding file
CN102111437A (en) Simple object access protocol (SOAP) extension-based WEB service transmission compression method
JP5414792B2 (en) Method and apparatus for providing rich media service
US20040064481A1 (en) Structured data receiving apparatus, receiving method, reviving program, transmitting apparatus, and transmitting method
KR20050094372A (en) System and method for servicing multimedia contents and recording medium thereof
CN110677443A (en) Data transmitting and receiving method, transmitting end, receiving end, system and storage medium
WO2014203745A1 (en) Content provision device, content provision method, program, terminal device, and content provision system
CN116684703A (en) Streaming media data transmission method and related equipment based on proximity service communication protocol
US8515467B2 (en) Adapter for synchronizing data over different networks
KR20000059600A (en) Device for generating broadcast interoperable protocol message and method for broadcast interoperable protocol message using the same
KR101324393B1 (en) Method and system for RESTful web service composition

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130313