Nothing Special   »   [go: up one dir, main page]

CN105022619A - Code processing method and device - Google Patents

Code processing method and device Download PDF

Info

Publication number
CN105022619A
CN105022619A CN201410172380.7A CN201410172380A CN105022619A CN 105022619 A CN105022619 A CN 105022619A CN 201410172380 A CN201410172380 A CN 201410172380A CN 105022619 A CN105022619 A CN 105022619A
Authority
CN
China
Prior art keywords
data
rest interface
description document
interface
xml description
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
CN201410172380.7A
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.)
Wuxi Perception Gold Clothing Internet Of Things Technology Co ltd
Original Assignee
Wuxi Sensing Net Industrialization 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 Wuxi Sensing Net Industrialization Research Institute filed Critical Wuxi Sensing Net Industrialization Research Institute
Priority to CN201410172380.7A priority Critical patent/CN105022619A/en
Publication of CN105022619A publication Critical patent/CN105022619A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a code processing method and device, and is applied to electronic equipment. The electronic equipment stores an XML (Extensive Markup Language) description file of each REST interface, and the XML description file comprises the multi-term attribute information of each REST interface. The method comprises the following steps: reading the XML description file in the electronic equipment; and according to a description rule of the XML description file, coding the each-item attribute information of each REST interface in the XML description file, and obtaining the code data of each REST interface. Through the embodiment of the invention, development personnel do not need to manually compile the code data of each REST interface and only need to compile the XML description file, so that the XML description file is subsequently compiled through the code processing method and device, a code generation process of the code processing method and device is unlikely to make mistakes, code generation accuracy is improved, and the code processing method and device has the advantages of being few in process operation flows and simple in operation, shortens code generation time and improves code generation efficiency.

Description

A kind of code data disposal route and device
Technical field
The application relates to technical field of data processing, particularly a kind of code data disposal route and device.
Background technology
REST (REpresentational State Transfer, declarative state transfer) refers to: shelving structure constraint condition and a principle, and meets the application program of these constraint conditions and principle or design is exactly RESTful.In the web services of RESTful pattern, each resource node all has a resource address, and resource node itself is that user or user object are accessed by REST interface, corresponding access method can have HTTP GET, POST, PUT, DELETE, also may have HEADER and OPTIONS etc.
In current practical application, each REST interface carrying out resource access be by developer according to httpMethod and the httpHeader design parameter of this interface, data layout (as json, xml), the multinomial attribute information such as rreturn value, authentication mode (as httpBasicAuth) and manually write code corresponding to this interface, as http call flow code, identifying procedure code, Data Format Transform flow process code etc., and then just perform this codes implement to the access of respective resources node by calling.
In the scheme of above-mentioned code building, need developer to each interface all to carry out a large amount of repeat write code operation, not only easily make mistakes, reduce the accuracy rate of code, and increase the rise time of code, reduce code building efficiency.
Summary of the invention
Technical problems to be solved in this application are to provide a kind of code data disposal route and device, in order to solve in prior art when generating the code of REST interface, need developer to each interface carry out a large amount of repeat write code operation, not only easily make mistakes, reduce the accuracy rate of code, and increase the rise time of code, reduce the technical matters of code building efficiency.
This application provides a kind of code data disposal route, be applied to electronic equipment, the expandable mark language XML description document of declarative state transfer REST interface is stored in described electronic equipment, described XML description document comprises the multinomial attribute information of described REST interface, and described method comprises:
Read the XML description document in described electronic equipment;
According to the description rule of described XML description document, every attribute information of REST interface described in described XML description document is encoded, obtains the code data of described REST interface.
Said method, preferably, the XML description document in the described electronic equipment of described reading comprises:
Determine the described memory location of XML description document in described electronic equipment;
The XML description document in described electronic equipment is read according to described memory location.
Said method, preferably, the described description rule according to described XML description document, every attribute information of REST interface described in described XML description document is encoded, obtains the code data of described REST interface, comprising:
According to the data structure of described XML description document, in described XML description document, parse the attribute information of every described RESE interface of described XML description document;
According to the data layout of described REST interface, code is carried out to the attribute information of RESE interface every described and writes, generate the code data of described REST interface.
Said method, preferably, after the code data obtaining described REST interface, described method also comprises:
The code data of described REST interface is preserved according to the store path preset.
Said method, preferably, after the code data obtaining described REST interface, described method also comprises:
Receive the interface interchange instruction of described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface;
Object switching motion data are extracted in the code data of described REST interface;
According to described object switching motion data, java object data in described code data is converted to json data or xml data;
According to the http communication operation data in described code data, in the network being provided with resource node, run described json data or xml data, to realize the access to resource node corresponding to described REST interface.
Present invention also provides a kind of code data treating apparatus, be applied to electronic equipment, store the XML description document of RSET interface in described electronic equipment, described XML description document comprises the multinomial attribute information of described REST interface, and described device comprises:
Document reading unit, for reading the XML description document in described electronic equipment;
The various attribute informations of REST interface described in described XML description document, for the description rule according to described XML description document, are encoded, are obtained the code data of described REST interface by information coding unit.
Said apparatus, preferably, described document reading unit comprises:
Subelement is determined in position, for determining the described memory location of XML description document in described electronic equipment;
File reads subelement, for reading the XML description document in described electronic equipment according to described memory location.
Said apparatus, preferably, described information coding unit comprises:
Information analysis subelement, for the data structure according to described XML description document, goes out the attribute information of every described REST interface of described XML description document in described XML description document according to Ei system;
Code building subelement, for the data layout according to described REST interface, carries out code to the attribute information of REST interface every described and writes, generate the code data of described REST interface.
Said apparatus, preferably, also comprises:
Code storage unit, for obtain described REST interface at described information coding unit code data after, the code data of described REST interface is preserved according to the store path preset.
Said apparatus, preferably, also comprises:
Instruction reception unit, for receiving the interface interchange instruction of described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface;
Data extracting unit, for extracting object switching motion data in the code data of described REST interface;
Date Conversion Unit, for according to described object switching motion data, is converted to json data or xml data by java object data in described code data;
Data run unit, for according to the http communication operation data in described code data, runs described json data or xml data in the network being provided with resource node, to realize the access to resource node corresponding to described REST interface.
From such scheme, a kind of code data disposal route that the application provides and device, be applied in the electronic equipment of the XML description document storing REST interface, this XML description document comprises the multinomial attribute information of REST interface, the application is by reading the XML description document that these have the attribute information of REST interface, and then the description rule of foundation XML description document, the REST interface attributes information in XML description document is encoded, to obtain the code data of REST interface.Pass through the application, hand-coding is carried out without the need to the code data of developer to each REST interface, only need write XML description document, and XML description document is because of its specific data structure, make developer only need be filled in XML description document by the attribute information of concrete REST interface, and then follow-up this XML description document to be encoded by the application, its code generation process is not only not easily made mistakes, improve the accuracy rate of code building, and its process operation flow process is less and operate simple and easy, reduce the rise time of code, improve the formation efficiency of code.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The process flow diagram of a kind of code data disposal route embodiment one that Fig. 1 provides for the application;
The partial process view of a kind of code data disposal route embodiment two that Fig. 2 provides for the application;
The partial process view of a kind of code data disposal route embodiment three that Fig. 3 provides for the application;
The process flow diagram of a kind of code data disposal route embodiment four that Fig. 4 provides for the application;
The process flow diagram of a kind of code data disposal route embodiment five that Fig. 5 provides for the application;
The structural representation of a kind of code data treating apparatus embodiment six that Fig. 6 provides for the application;
The part-structure schematic diagram of a kind of code data treating apparatus embodiment seven that Fig. 7 provides for the application;
The part-structure schematic diagram of a kind of code data treating apparatus embodiment eight that Fig. 8 provides for the application;
The structural representation of a kind of code data treating apparatus embodiment nine that Fig. 9 provides for the application;
The structural representation of a kind of code data treating apparatus embodiment ten that Figure 10 provides for the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the application's protection.
With reference to figure 1, for the process flow diagram of a kind of code data disposal route embodiment one that the application provides, wherein, described method is applied to electronic equipment, described electronic equipment can be to run by run time version, and with the resource node in network, there is the device end etc. of data cube computation, the XML description document of REST interface is stored in described electronic equipment, described XML description document comprises the multinomial attribute information of described REST interface, as httpMethod and httpHeader design parameter, data layout is (as json, xml), rreturn value, the information such as authentication mode (as httpBasicAuth), the method of the embodiment of the present application can comprise the following steps:
Step 101: read the XML description document in described electronic equipment.
Wherein, described step 101 refers to, obtains the XML description document of the REST interface stored in described electronic equipment.
It should be noted that, described XML description document has its specific data structure, such as, is below that the several main node in XML description document illustrate:
The website of Domain: this api, i.e. reference address, support to define with variable format;
Auth: at present only support httpBasic certification, in node can the username and password of input authentication, supports to define with variable format;
Resource a: resource node of concrete REST;
Uri: the uri of resource node, domain+uri form the actual url of this REST;
Action: some operations that this resource points is carried out, such as Gains resources information, or more new resources;
Cookies: need the cookie key added in access process;
Headers: need the header key added in access process;
RequestBody: the body content of http request in access process, supports json or xml format conversion;
ResponseBody: the body content of http response in access process, supports json or xml format conversion;
Some attributes in Property:Body data structure, correspond to a specific object inside java object, itself also can be list, or another nested data structure;
Etc..
In the embodiment of the present application, the information that in described XML description document, each node stores is every attribute information of described REST interface, that is, before method is in the embodiment of the present application run, every attribute information of REST interface is filled in the corresponding node of XML by developer, to obtain the XML description document of this REST interface.
Step 102: according to the description rule of described XML description document, encodes every attribute information of REST interface described in described XML description document, obtains the code data of described REST interface.
Wherein, the description rule of described XML description document can be understood as: in XML description document, the optimum configurations of each node, langue such as to arrange at the rule, be in described step 102: every attribute information of REST interface described in described XML description document is encoded according to this description rule, to obtain the code data of described REST interface.
From such scheme, a kind of code data disposal route embodiment one that the application provides, be applied in the electronic equipment of the XML description document storing REST interface, this XML description document comprises the multinomial attribute information of REST interface, the embodiment of the present application is by reading the XML description document that these have the attribute information of REST interface, and then the description rule of foundation XML description document, REST interface attributes information in XML description document is encoded, to obtain the code data of REST interface.Pass through the embodiment of the present application, hand-coding is carried out without the need to the code data of developer to each REST interface, only need write XML description document, and XML description document is because of its specific data structure, make developer only need be filled in XML description document by the attribute information of concrete REST interface, and then follow-up this XML description document to be encoded by the embodiment of the present application, its code generation process is not only not easily made mistakes, improve the accuracy rate of code building, and its process operation flow process is less and operate simple and easy, reduce the rise time of code, improve the formation efficiency of code.
With reference to figure 2, be the process flow diagram of step 101 described in a kind of code data disposal route embodiment two that the application provides, wherein, described step 101 can comprise the following steps realization:
Step 111: determine the described memory location of XML description document in described electronic equipment.
Wherein, described memory location can be the store path information of described XML description document in described electronic equipment: relative path is as .. * * description document .xml or absolute path etc.
It should be noted that, the memory location of described XML description document can for pre-setting, and that is, is developed after personnel have filled in the XML description document of described REST interface, this XML description document is stored in electronic equipment, setting is carried out in its memory location simultaneously and fill in.
Step 112: read the XML description document in described electronic equipment according to described memory location.
Wherein, file reading manner in described step 112 can be different according to the character of this memory location, that is, when in described memory location being the relative path information of current location, in described step 112, read XML description document corresponding to its relative path information by described current location; When described memory location is absolute path information, in described step 112, directly read the XML description document under this absolute path.
With reference to figure 3, be the process flow diagram of step 102 described in a kind of code data disposal route embodiment three that the application provides, wherein, described step 102 can be realized by each step following:
Step 121: according to the data structure of described XML description document, parses the attribute information of every described REST interface of described XML description document in described XML description document.
Wherein, the data structure of described XML description document can with reference to the content above described in middle the embodiment of the present application one, in described step 121, according to the data structure of described XML description document, in described XML description document, resolve every the attribute information extracting described REST interface.
Step 122: according to the data layout of described REST interface, carries out code to the attribute information of REST interface every described and writes, generate the code data of described REST interface.
Wherein, the data layout of described REST interface refers to the data layout that described REST interface object data present, in described step 122, according to described data layout, carry out code to attribute information every described to write, to obtain the code data of described REST interface, the data layout of described code data is consistent with the data layout of described REST interface.
With reference to figure 4, be the process flow diagram of a kind of code data disposal route embodiment four that the application provides, wherein, after described step 102, described method can also comprise the following steps:
Step 103: the code data of described REST interface is preserved according to the store path preset.
Wherein, described store path can be the relative path of current location, also can be absolute path.And described store path can be arranged in advance by developer.After described step 103, developer can pass through multiple exercise the application embodiment of the method, realizes the repeatedly generation of the code data of described REST interface and repeatedly applies.
With reference to figure 5, be the process flow diagram of a kind of code data disposal route embodiment five that the application provides, wherein, after described step 102, described method can also comprise the following steps:
Step 104: the interface interchange instruction receiving described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface.
Wherein, described interface interchange instruction can need to carry out operation when code data generation or interface accessing by developer and generate, the interface identifier of REST interface needing to carry out code building or conduct interviews can be carried, to make described interface interchange instruction corresponding with the interface identifier of described REST interface in described interface interchange instruction.
Step 105: extract object switching motion data in the code data of described REST interface.
Wherein, described object switching motion data, refer to the rotational action data of java object to json data or xml data.
Step 106: according to described object switching motion data, java object data in described code data is converted to json data or xml data.
Wherein, in described code data, described REST interface exists with the data mode of java object, therefore, in order to REST interface described in protocol identification in network can be made, in described step 106, the json data or xml data that network can identify are converted to the java object data in described code data.
Step 107: according to the http communication operation data in described code data, run described json data or xml data in the network being provided with resource node, to realize the access to resource node corresponding to described REST interface.
Wherein, http communication activities data are packaged with in described code data, thus, when passing through this REST interface orientation REST client as resource node in the external world, can according to these http communication activities data as http agreement, in the network being provided with resource node (rest client), run described json data or xml data, realize the access to resource node corresponding to described REST interface thus.
With reference to figure 6, for the structural representation of a kind of code data treating apparatus embodiment six that the application provides, wherein, described application of installation is in electronic equipment, described electronic equipment can be to run by run time version, and with the resource node in network, there is the device end etc. of data cube computation, the XML description document of RSET interface is stored in described electronic equipment, described XML description document comprises the multinomial attribute information of described REST interface, as httpMethod and httpHeader design parameter, data layout is (as json, xml), rreturn value, the information such as authentication mode (as httpBasicAuth), device in the embodiment of the present application can comprise following structure:
Document reading unit 601, for reading the XML description document in described electronic equipment.
Wherein, described document reading unit 601 refers to, obtains the XML description document of the REST interface stored in described electronic equipment.
It should be noted that, described XML description document has its specific data structure, can data structure show to XML description document in REFERENCE TO RELATED embodiment of the method.
In the embodiment of the present application, the information that in described XML description document, each node stores is every attribute information of described REST interface, that is, before method is in the embodiment of the present application run, every attribute information of REST interface is filled in the corresponding node of XML by developer, to obtain the XML description document of this REST interface.
The various attribute informations of REST interface described in described XML description document, for the description rule according to described XML description document, are encoded, are obtained the code data of described REST interface by information coding unit 602.
Wherein, the description rule of described XML description document can be understood as: in XML description document, the optimum configurations of each node, langue such as to arrange at the rule, be in described information coding unit 602: every attribute information of REST interface described in described XML description document is encoded according to this description rule, to obtain the code data of described REST interface.
From such scheme, a kind of code data treating apparatus embodiment six that the application provides, be applied in the electronic equipment of the XML description document storing REST interface, this XML description document comprises the multinomial attribute information of REST interface, the embodiment of the present application is by reading the XML description document that these have the attribute information of REST interface, and then the description rule of foundation XML description document, REST interface attributes information in XML description document is encoded, to obtain the code data of REST interface.Pass through the embodiment of the present application, hand-coding is carried out without the need to the code data of developer to each REST interface, only need write XML description document, and XML description document is because of its specific data structure, make developer only need be filled in XML description document by the attribute information of concrete REST interface, and then follow-up this XML description document to be encoded by the embodiment of the present application, its code generation process is not only not easily made mistakes, improve the accuracy rate of code building, and its process operation flow process is less and operate simple and easy, reduce the rise time of code, improve the formation efficiency of code.
With reference to figure 7, be the structural representation of document reading unit 601 described in a kind of code data treating apparatus embodiment seven that the application provides, wherein, described document reading unit 601 can comprise following structure:
Subelement 611 is determined in position, for determining the described memory location of XML description document in described electronic equipment.
Wherein, described memory location can be the store path information of described XML description document in described electronic equipment: relative path is as .. * * description document .xml or absolute path etc.
It should be noted that, the memory location of described XML description document can for pre-setting, and that is, is developed after personnel have filled in the XML description document of described REST interface, this XML description document is stored in electronic equipment, setting is carried out in its memory location simultaneously and fill in.
File reads subelement 612, for reading the XML description document in described electronic equipment according to described memory location.
Wherein, the file reading manner that described file reads in subelement 612 can be different according to the character of this memory location, that is, when in described memory location being the relative path information of current location, described file reads subelement 612 can read XML description document corresponding to its relative path information by described current location; When described memory location is absolute path information, described file reading subelement 612 directly can read the XML description document under this absolute path.
With reference to figure 8, be the structural representation of information coding unit 602 described in a kind of code data treating apparatus embodiment eight that the application provides, wherein, described information coding unit 602 can comprise following structure:
Information analysis subelement 621, for the data structure according to described XML description document, goes out the attribute information of every described REST interface of described XML description document in described XML description document according to Ei system.
Wherein, the data structure of described XML description document can with reference to the content above described in middle the embodiment of the present application one, in described information analysis subelement 621, according to the data structure of described XML description document, in described XML description document, resolve every the attribute information extracting described REST interface.
Code building subelement 622, for the data layout according to described REST interface, carries out code to the attribute information of REST interface every described and writes, generate the code data of described REST interface.
Wherein, the data layout of described REST interface refers to the data layout that described REST interface object data present, in described code building subelement 622, according to described data layout, carry out code to attribute information every described to write, to obtain the code data of described REST interface, the data layout of described code data is consistent with the data layout of described REST interface.
With reference to figure 9, be the structural representation of a kind of code data treating apparatus embodiment nine that the application provides, wherein, described device can also comprise following structure:
Code storage unit 603, after obtaining the code data of described REST interface at described information coding unit 602, preserves the code data of described REST interface according to the store path preset.
Wherein, described store path can be the relative path of current location, also can be absolute path.And described store path can be arranged in advance by developer.After the code data of described REST interface is preserved according to the store path preset by described code storage unit 603, developer can pass through multiple exercise the application embodiment of the method, realizes the repeatedly generation of the code data of described REST interface and repeatedly applies.
With reference to Figure 10, be the structural representation of a kind of code data treating apparatus embodiment ten that the application provides, wherein, described device can also comprise following structure:
Instruction reception unit 604, for receiving the interface interchange instruction of described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface.
Wherein, described interface interchange instruction can need to carry out operation when code data generation or interface accessing by developer and generate, the interface identifier of REST interface needing to carry out code building or conduct interviews can be carried, to make described interface interchange instruction corresponding with the interface identifier of described REST interface in described interface interchange instruction.
Data extracting unit 605, for extracting object switching motion data in the code data of described REST interface.
Wherein, described object switching motion data, refer to the rotational action data of java object to json data or xml data.
Date Conversion Unit 606, for according to described object switching motion data, is converted to json data or xml data by java object data in described code data.
Wherein, in described code data, described REST interface exists with the data mode of java object, therefore, in order to REST interface described in protocol identification in network can be made, in described Date Conversion Unit 606, the json data or xml data that network can identify are converted to the java object data in described code data.
Data run unit 607, for according to the http communication operation data in described code data, runs described json data or xml data in the network being provided with resource node, to realize the access to resource node corresponding to described REST interface.
Wherein, http communication activities data are packaged with in described code data, thus, when passing through this REST interface orientation REST client as resource node in the external world, can according to these http communication activities data as http agreement, in the network being provided with resource node (rest client), run described json data or xml data, realize the access to resource node corresponding to described REST interface thus.
By the description of above embodiment, those skilled in the art can be well understood to the mode that the application can add necessary common hardware by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is more real-time mode.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computing machine, hard disk or CD etc., comprise some instructions and perform technical scheme described in each embodiment of the application in order to make a computer equipment (can be personal computer, server or the network equipment etc.).
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.
A kind of code data disposal route provided the application above and device are described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. a code data disposal route, it is characterized in that, be applied to electronic equipment, the expandable mark language XML description document of declarative state transfer REST interface is stored in described electronic equipment, described XML description document comprises the multinomial attribute information of described REST interface, and described method comprises:
Read the XML description document in described electronic equipment;
According to the description rule of described XML description document, every attribute information of REST interface described in described XML description document is encoded, obtains the code data of described REST interface.
2. method according to claim 1, is characterized in that, the XML description document in the described electronic equipment of described reading comprises:
Determine the described memory location of XML description document in described electronic equipment;
The XML description document in described electronic equipment is read according to described memory location.
3. method according to claim 1, is characterized in that, the described description rule according to described XML description document, is encoded by every attribute information of REST interface described in described XML description document, obtains the code data of described REST interface, comprising:
According to the data structure of described XML description document, in described XML description document, parse the attribute information of every described RESE interface of described XML description document;
According to the data layout of described REST interface, code is carried out to the attribute information of RESE interface every described and writes, generate the code data of described REST interface.
4. the method according to claim 1,2 or 3, is characterized in that, after the code data obtaining described REST interface, described method also comprises:
The code data of described REST interface is preserved according to the store path preset.
5. the method according to claim 1,2 or 3, is characterized in that, after the code data obtaining described REST interface, described method also comprises:
Receive the interface interchange instruction of described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface;
Object switching motion data are extracted in the code data of described REST interface;
According to described object switching motion data, java object data in described code data is converted to json data or xml data;
According to the http communication operation data in described code data, in the network being provided with resource node, run described json data or xml data, to realize the access to resource node corresponding to described REST interface.
6. a code data treating apparatus, is characterized in that, is applied to electronic equipment, stores the XML description document of RSET interface in described electronic equipment, and described XML description document comprises the multinomial attribute information of described REST interface, and described device comprises:
Document reading unit, for reading the XML description document in described electronic equipment;
The various attribute informations of REST interface described in described XML description document, for the description rule according to described XML description document, are encoded, are obtained the code data of described REST interface by information coding unit.
7. device according to claim 6, is characterized in that, described document reading unit comprises:
Subelement is determined in position, for determining the described memory location of XML description document in described electronic equipment;
File reads subelement, for reading the XML description document in described electronic equipment according to described memory location.
8. device according to claim 6, is characterized in that, described information coding unit comprises:
Information analysis subelement, for the data structure according to described XML description document, goes out the attribute information of every described REST interface of described XML description document in described XML description document according to Ei system;
Code building subelement, for the data layout according to described REST interface, carries out code to the attribute information of REST interface every described and writes, generate the code data of described REST interface.
9. the device according to claim 6,7 or 8, is characterized in that, also comprise:
Code storage unit, for obtain described REST interface at described information coding unit code data after, the code data of described REST interface is preserved according to the store path preset.
10. the device according to claim 6,7 or 8, is characterized in that, also comprise:
Instruction reception unit, for receiving the interface interchange instruction of described REST interface, described interface interchange instruction is corresponding with the interface identifier of described REST interface;
Data extracting unit, for extracting object switching motion data in the code data of described REST interface;
Date Conversion Unit, for according to described object switching motion data, is converted to json data or xml data by java object data in described code data;
Data run unit, for according to the http communication operation data in described code data, runs described json data or xml data in the network being provided with resource node, to realize the access to resource node corresponding to described REST interface.
CN201410172380.7A 2014-04-25 2014-04-25 Code processing method and device Pending CN105022619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410172380.7A CN105022619A (en) 2014-04-25 2014-04-25 Code processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410172380.7A CN105022619A (en) 2014-04-25 2014-04-25 Code processing method and device

Publications (1)

Publication Number Publication Date
CN105022619A true CN105022619A (en) 2015-11-04

Family

ID=54412610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410172380.7A Pending CN105022619A (en) 2014-04-25 2014-04-25 Code processing method and device

Country Status (1)

Country Link
CN (1) CN105022619A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886390A (en) * 2015-12-15 2017-06-23 大唐软件技术股份有限公司 A kind of Java object generation and conversion method and Java object generation and conversion equipment
CN109117207A (en) * 2017-06-21 2019-01-01 深圳联友科技有限公司 A kind of data processing method of business process model
CN109117131A (en) * 2018-08-16 2019-01-01 杭州云纪网络科技有限公司 Code generating method and device, storage medium and electric terminal
CN109445890A (en) * 2018-10-09 2019-03-08 北京达佳互联信息技术有限公司 A kind of method for showing interface, device, terminal device and storage medium
CN112261075A (en) * 2020-09-07 2021-01-22 上海泛微软件有限公司 Network request processing method, device, equipment and computer readable storage medium
CN113010157A (en) * 2021-03-08 2021-06-22 北京达佳互联信息技术有限公司 Code generation method and device
CN113821210A (en) * 2021-09-17 2021-12-21 中汽创智科技有限公司 File analysis method and device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235718A (en) * 2013-03-28 2013-08-07 迈普通信技术股份有限公司 Method and device for generating remote procedure call (RPC) code
CN103257861A (en) * 2013-04-15 2013-08-21 合肥联宝信息技术有限公司 Method and device for automatically generating BIOS (basic input /output system) codes
CN103473108A (en) * 2013-08-12 2013-12-25 福建富士通信息软件有限公司 Java code generating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235718A (en) * 2013-03-28 2013-08-07 迈普通信技术股份有限公司 Method and device for generating remote procedure call (RPC) code
CN103257861A (en) * 2013-04-15 2013-08-21 合肥联宝信息技术有限公司 Method and device for automatically generating BIOS (basic input /output system) codes
CN103473108A (en) * 2013-08-12 2013-12-25 福建富士通信息软件有限公司 Java code generating method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886390A (en) * 2015-12-15 2017-06-23 大唐软件技术股份有限公司 A kind of Java object generation and conversion method and Java object generation and conversion equipment
CN109117207A (en) * 2017-06-21 2019-01-01 深圳联友科技有限公司 A kind of data processing method of business process model
CN109117207B (en) * 2017-06-21 2021-11-23 深圳联友科技有限公司 Data processing method of business process model
CN109117131A (en) * 2018-08-16 2019-01-01 杭州云纪网络科技有限公司 Code generating method and device, storage medium and electric terminal
CN109445890A (en) * 2018-10-09 2019-03-08 北京达佳互联信息技术有限公司 A kind of method for showing interface, device, terminal device and storage medium
CN112261075A (en) * 2020-09-07 2021-01-22 上海泛微软件有限公司 Network request processing method, device, equipment and computer readable storage medium
CN113010157A (en) * 2021-03-08 2021-06-22 北京达佳互联信息技术有限公司 Code generation method and device
CN113010157B (en) * 2021-03-08 2024-08-13 北京达佳互联信息技术有限公司 Code generation method and device
CN113821210A (en) * 2021-09-17 2021-12-21 中汽创智科技有限公司 File analysis method and device and storage medium

Similar Documents

Publication Publication Date Title
CN105022619A (en) Code processing method and device
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
JP6626211B2 (en) Method and apparatus for processing short link and short link server
KR102185864B1 (en) Server-side rendering method and system of native content for presentation
CN104112002B (en) A kind of methods, devices and systems of list adaptation
US20160050128A1 (en) System and Method for Facilitating Communication with Network-Enabled Devices
US20150040098A1 (en) Systems and methods for developing and delivering platform adaptive web and native application content
WO2021023149A1 (en) Method and apparatus for dynamically returning message
CN104915398A (en) Method and device for webpage point burying
CN110020353B (en) Method and device for constructing webpage form
CN106412034B (en) Method for processing business and device
CN109214196A (en) A kind of data interactive method, device and equipment
CN103237003B (en) To the method and apparatus that the high flowing of access in network responds
CN105335310A (en) Interface defining method, and data transmission method and apparatus
CN110019835A (en) Resource method of combination, device and electronic equipment
US20210064453A1 (en) Automated application programming interface (api) specification construction
US20150263981A1 (en) Run-time experimentation with user interface configurations
CN103235718A (en) Method and device for generating remote procedure call (RPC) code
US20120331038A1 (en) Systems and methods for processing web service piped network requests
US20170339252A1 (en) Generating a response to a client device in an internet of things domain
US8972968B1 (en) Alternate service for applications
US20120331110A1 (en) Methods for implementing web services and devices thereof
CN107408065A (en) Supervision application loads
Schaeffer et al. A service-oriented framework for real-time and distributed geoprocessing
CN113076294A (en) Information sharing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20190321

Address after: 214000 8/F, Gemini Building A, No. 18 Zhenze Road, Wuxi New District, Wuxi City, Jiangsu Province

Applicant after: WSN HOLDING GROUP CO.,LTD.

Address before: 214135 Gemini A Building, No. 18 Zhenze Road, Wuxi National High-tech Industrial Development Zone, Wuxi City, Jiangsu Province

Applicant before: Wuxi Research Institute of Internet of Things

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190522

Address after: 214105 7th Floor, Building A, Xidong Chuangrong Building, 78 Danshan Road, Anzhen Street, Xishan District, Wuxi City, Jiangsu Province

Applicant after: Wuxi Perception Gold Clothing Internet of Things Technology Co.,Ltd.

Address before: 214000 8/F, Gemini Building A, No. 18 Zhenze Road, Wuxi New District, Wuxi City, Jiangsu Province

Applicant before: WSN HOLDING GROUP CO.,LTD.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20151104

RJ01 Rejection of invention patent application after publication