CN107632875B - E-commerce interface integration method, system, computer equipment and readable storage medium - Google Patents

E-commerce interface integration method, system, computer equipment and readable storage medium Download PDF

Info

Publication number
CN107632875B
CN107632875B CN201710930156.3A CN201710930156A CN107632875B CN 107632875 B CN107632875 B CN 107632875B CN 201710930156 A CN201710930156 A CN 201710930156A CN 107632875 B CN107632875 B CN 107632875B
Authority
CN
China
Prior art keywords
application programming
programming interface
commerce
data
calling
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.)
Active
Application number
CN201710930156.3A
Other languages
Chinese (zh)
Other versions
CN107632875A (en
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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network Technology Co Ltd
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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201710930156.3A priority Critical patent/CN107632875B/en
Publication of CN107632875A publication Critical patent/CN107632875A/en
Application granted granted Critical
Publication of CN107632875B publication Critical patent/CN107632875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides an e-commerce interface integration method, an e-commerce interface integration system, computer equipment and a computer readable storage medium. The E-commerce interface integration method comprises the following steps: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; the method and the system receive and analyze the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.

Description

E-commerce interface integration method, system, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of enterprise system and e-commerce system integration, in particular to an e-commerce interface integration method, an e-commerce interface integration system, computer equipment and a computer readable storage medium.
Background
An e-commerce Open API (Open application programming interface) provides an external standard Open data interface, and ISVs (independent software developers) or developers can integrate fragmented data into an enterprise ERP (enterprise resource planning) system through the Open API. However, in an actual enterprise system integration scenario, it is complicated, and generally, an enterprise internal system needs to be integrated through an ESB (enterprise service bus) as a bus. However, most of the current APIs for users to call e-commerce are in SDK (Software Development Kit Software open toolkit) mode, which requires writing a large amount of code, has complex steps, is poor in universality, and is difficult to reuse.
Therefore, how to efficiently and conveniently integrate the e-commerce API becomes an urgent problem to be solved.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, the invention proposes, in a first aspect, an e-commerce interface integration method.
A second aspect of the present invention is to provide an e-commerce interface integration system.
A third aspect of the invention is directed to a computer device.
A fourth aspect of the present invention is directed to a computer-readable storage medium.
In view of the above, according to an aspect of the present invention, an e-commerce interface integration method is provided, including: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; and receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The E-commerce interface integration method provided by the invention captures Application Programming Interface (API) data issued by E-commerce through a tool, and converts the captured API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
The above-mentioned e-commerce interface integration method according to the present invention may further have the following technical features:
in the foregoing technical solution, preferably, the calling the application programming interface based on the application programming interface definition file specifically includes: receiving configuration information of an e-commerce, configuring an e-commerce connection and an application programming interface according to the configuration information, and deploying the e-commerce connection and the application programming interface to an operating environment; receiving a simulation calling instruction of an application programming interface, generating a token according to configuration information to obtain a calling authentication identity and calling the application programming interface; and judging whether the call is a safe call, and generating a request address of the uniform resource locator according to the configured application programming interface when the call is the safe call.
In the technical scheme, the specific process for calling the application programming interface is as follows: firstly, configuration information of an e-commerce set by a user is received, an e-commerce connection and application programming interface are configured according to the configuration information, the e-commerce connection and application programming interface is deployed to an operating environment, a service flow and the operating environment for calling the application programming interface are deployed, a simulation calling instruction of the user application programming interface is received, a token (token) is generated by simulation login, a called authentication identity is obtained, whether the HTTPS safe calling is performed or not is judged, if the HTTPS safe calling is performed, a request address of a Uniform Resource Locator (URL) is generated according to the configured application programming interface, the last year supply and demand address is called, the calling of the application programming interface is achieved, the safe authentication and the token acquisition in the calling process are realized, and the user can call only by configuring system parameters and output parameters of a previous node, fussy calling is not needed to be carried out on the hand-written codes, and the universality is enhanced.
In any of the above technical solutions, preferably, the receiving and analyzing the return data sent by the application programming interface to convert the return data into general data of the integrated platform specifically includes: receiving returned data which is returned by the request address of the uniform resource locator and has a JSON or XML format; the return data is mapped to a message context according to the service definition in the definition file to form common data for the integrated platform.
In the technical scheme, the specific process of receiving and analyzing the return data sent by the application programming interface and finally converting the return data into the general data of the integrated platform is as follows: based on the calling application programming interface and after judging that the calling is HTTPS safe calling, starting to call a request address of a Uniform Resource Locator (URL), wherein the request address of the Uniform Resource Locator (URL) is used for calling return data, the format of the data is usually JSON or XML, and certainly the data can be data in other formats.
In any of the above technical solutions, preferably, the message context includes: the first preset unit is used for storing the entry information of the protocol of the integrated platform and the control information for accessing the integrated platform; the second preset unit is used for defining the dynamic change type of the entity message processed by the process in the integrated platform and storing the service data; and the third preset unit is used for storing binary data in the integrated platform.
In the technical scheme, the basic structure of the message context comprises a single part, and different forms of data and information of the integrated platform are defined and stored through the contents of the three parts.
In any of the above technical solutions, preferably, the api definition file includes at least a service definition, an entity object definition, and a list of invocations of the api of the e-commerce.
In the technical scheme, the application programming interface of the e-commerce is mapped into the service and entity object in the integrated platform system through the application programming interface definition file, so that a user does not need to additionally process original text data, the integrated platform system is responsible for automatically processing the original text data into the object for the use in the process, and the usability is enhanced.
According to a second aspect of the present invention, there is provided an e-commerce interface integration system, comprising: the acquisition unit is used for acquiring application programming interface data issued by an electric company; the definition unit is used for converting the application programming interface data into an application programming interface definition file in a network service description language format; the calling unit is used for calling the application programming interface based on the application programming interface definition file; and the analysis unit is used for receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The E-commerce interface integration system provided by the invention has the advantages that the acquisition unit captures Application Programming Interface (API) data issued by E-commerce through a tool, the definition unit converts the captured API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, and the web service description language is an XML-based language, so that the system can be machine-readable and human-readable, and what you see is what you get is realized. The calling unit initiates calling based on the converted application programming interface definition file, starts calling the application programming interface which can be called, the analysis unit receives the returned data of the application programming interface, then analyzes the returned data, and finally converts the returned data into the general data of the integrated platform, thereby completing the conversion of the application programming interface data into the general data of the integrated platform, realizing seamless integration of the e-commerce, enabling a user to randomly call the application programming interface which needs to be called, avoiding the need of fussy calling of hand-written codes, enhancing the universality, having simple steps and good universality, and improving the high efficiency of the e-commerce application programming interface integration.
The above-mentioned e-commerce interface integration system according to the present invention may further have the following technical features:
in the above technical solution, preferably, the calling unit specifically includes: the configuration unit is used for receiving configuration information of the e-commerce, configuring an e-commerce connection and an application programming interface according to the configuration information, and deploying the e-commerce connection and the application programming interface to an operating environment; the simulation unit is used for receiving a simulation calling instruction of the application programming interface, generating a token according to the configuration information to obtain a calling authentication identity and calling the application programming interface; and the generating unit is used for judging whether the call is a safe call or not, and generating a request address of the uniform resource locator according to the configured application programming interface when the call is the safe call.
In the technical scheme, the specific process of calling the application programming interface by the calling unit is as follows: firstly, a configuration unit receives configuration information of an e-commerce set by a user, configures an e-commerce connection and application programming interface according to the configuration information, deploys the e-commerce connection and application programming interface to an operating environment, deploys a service flow and invokes the operating environment of the application programming interface, a simulation unit receives a simulation call instruction of the user application programming interface, a token (token) is generated by simulation login, an authentication identity of the call is obtained, then the generation unit judges whether the call is an HTTPS safe call, if the call is the HTTPS safe call, a request address of a Uniform Resource Locator (URL) is generated according to the configured application programming interface, the last year supply and demand address is called, the call of the application programming interface is achieved, the security authentication and token acquisition in the call process are realized, and the user can call only by configuring system parameters and output parameters of a previous node, fussy calling is not needed to be carried out on the hand-written codes, and the universality is enhanced.
In any of the above technical solutions, preferably, the parsing unit specifically includes: the receiving unit is used for receiving returned data which are returned by the request address of the uniform resource locator and have the format of JSON or XML; and the mapping unit is used for mapping the returned data into the message context according to the service definition in the definition file so as to form the general data of the integrated platform.
In the technical scheme, the specific process that the analysis unit receives the return data sent by the analysis application programming interface and finally converts the return data into the general data of the integrated platform is as follows: based on the calling application programming interface and after judging that the calling is HTTPS safe calling, starting to call a request address of a Uniform Resource Locator (URL), receiving return data aiming at the calling by the request address of the Uniform Resource Locator (URL) by a receiving unit, wherein the format of the data is usually JSON or XML and can be of other formats, and mapping the return data of the JSON or XML into a message context (MessageContext) by a mapping unit in combination with service definition bound by the E-commerce application programming interface to finally form universal data of an integrated platform, thereby realizing seamless connection of the E-commerce interface.
In any of the above technical solutions, preferably, the message context includes: the first preset unit is used for storing the entry information of the protocol of the integrated platform and the control information for accessing the integrated platform; the second preset unit is used for defining the dynamic change type of the entity message processed by the process in the integrated platform and storing the service data; and the third preset unit is used for storing binary data in the integrated platform.
In the technical scheme, the basic structure of the message context comprises a single part, and different forms of data and information of the integrated platform are defined and stored through the contents of the three parts.
In any of the above technical solutions, preferably, the api definition file includes at least a service definition, an entity object definition, and a list of invocations of the api of the e-commerce.
In the technical scheme, the application programming interface of the e-commerce is mapped into the service and entity object in the integrated platform system through the application programming interface definition file, so that a user does not need to additionally process original text data, the integrated platform system is responsible for automatically processing the original text data into the object for the use in the process, and the usability is enhanced.
According to a third aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; and receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The invention provides a computer device, which realizes that when a processor executes a computer program: the method comprises the steps of grabbing Application Programming Interface (API) data issued by E-commerce through a tool, and converting the grabbed API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
According to a fourth aspect of the invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; and receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: the method comprises the steps of grabbing Application Programming Interface (API) data issued by E-commerce through a tool, and converting the grabbed API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows a flow diagram of an e-commerce interface integration method of one embodiment of the present invention;
FIG. 2 shows a flow diagram of an e-commerce interface integration method of another embodiment of the present invention;
FIG. 3 is a diagram illustrating a definition file according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a header definition in a definition file according to an embodiment of the present invention;
FIG. 5 shows a schematic block diagram of an e-commerce interface integration system of one embodiment of the present invention;
FIG. 6 shows a schematic block diagram of an e-commerce interface integration system of another embodiment of the present invention;
FIG. 7 shows a schematic block diagram of a computer device of an embodiment of the present invention.
Detailed Description
So that the manner in which the above recited aspects, features and advantages of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments thereof which are illustrated in the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited to the specific embodiments disclosed below.
An embodiment of a first aspect of the present invention provides an e-commerce interface integration method, and fig. 1 shows a flow diagram of the e-commerce interface integration method according to an embodiment of the present invention:
102, acquiring application programming interface data issued by an e-commerce;
step 104, converting the application programming interface data into an application programming interface definition file in a network service description language format;
106, calling an application programming interface based on the application programming interface definition file;
and step 108, receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The E-commerce interface integration method provided by the invention captures Application Programming Interface (API) data issued by E-commerce through a tool, and converts the captured API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
Fig. 2 shows a flow diagram of an e-commerce interface integration method according to another embodiment of the present invention. Wherein, the method comprises the following steps:
step 202, acquiring application programming interface data issued by an e-commerce;
step 204, converting the application programming interface data into an application programming interface definition file in a network service description language format;
step 206, receiving configuration information of the e-commerce, configuring an e-commerce connection and an application programming interface according to the configuration information, and deploying the e-commerce connection and the application programming interface to a running environment;
step 208, receiving a simulation call instruction of the application programming interface, generating a token according to the configuration information to obtain a call authentication identity, and calling the application programming interface;
step 210, judging whether the call is a safe call, if so, entering step 212, and if not, ending;
step 212, generating a request address of the uniform resource locator according to the configured application programming interface;
step 214, receiving returned data with the format of JSON or XML returned by the request address of the uniform resource locator;
step 216, mapping the returned data into a message context according to the service definition in the definition file to form the general data of the integrated platform.
In this embodiment, the api definition file at least includes a service definition, an entity object definition, and a list of invocations of the api of the e-commerce, such as the definition file of the example service PayService shown in fig. 3, and thus can be machine-readable and human-readable, and the implementation is what you see is what you get. After the processing by the integration tool, the application programming interface definition file maps the application programming interface of the e-commerce into a service and entity object in the integration platform system and a callable list of the application programming interface, such as the application programming interface definition file taking a certain e-commerce as an example shown in table 1, so that a user does not need to additionally process original text data, the integration platform system is responsible for automatically processing the object for the use in the process, and the usability is enhanced.
TABLE 1
E-commerce API Integrating tool processed data
Interface name Interface name
Interface description API List — API description
Adapted version API List — API compliant version
Usage scenarios API List-usage scenarios
Request description-url API List — URL corresponding to API
Request description-Format By default, not record
Request specification-https request mode API list-API request mode
Request specification-coding type By default, not record
url parameter description (parameter name and type) Parameters and type of interface (with identification)
Request body parameter description (parameter name and type) Parameters and type of interface (without identification)
Return parameter description (parameter name and type) Return value and type of interface
Interface description API List — API description
In this embodiment, the specific procedure for calling the application programming interface is as follows: firstly, configuration information of an e-commerce set by a user is received, an e-commerce connection and application programming interface are configured according to the configuration information, the e-commerce connection and application programming interface is deployed to an operating environment, a service flow and the operating environment for calling the application programming interface are deployed, a simulation calling instruction of the user application programming interface is received, a token (token) is generated by simulation login, a called authentication identity is obtained, whether the HTTPS safe calling is performed or not is judged, if the HTTPS safe calling is performed, a request address of a Uniform Resource Locator (URL) is generated according to the configured application programming interface, the last year supply and demand address is called, the calling of the application programming interface is achieved, the safe authentication and the token acquisition in the calling process are realized, and the user can call only by configuring system parameters and output parameters of a previous node, fussy calling is not needed to be carried out on the hand-written codes, and the universality is enhanced.
In this embodiment, the specific process of receiving the return data sent by the parsing api and finally converting the return data into the general data of the integrated platform is as follows: based on the calling application programming interface and after judging that the call is an HTTPS safe call, starting to call a request address of a Uniform Resource Locator (URL), wherein the request address of the Uniform Resource Locator (URL) returns data aiming at the call, the format of the data is generally JSON or XML, and the data can be in other formats. The basic structure of the MessageContext is shown in table 2, and includes a header (header), defining the body of the document (body), and a binary large object (blob) as three parts:
TABLE 2
Figure BDA0001428533970000101
The Header is mainly used for storing the entry information of the protocol and some information needed by the access control, and the Header part is defined as shown in fig. 4. The body is used for storing business data, and the body part is a dynamically changing type and is used for defining the type of entity messages to be processed in the flow, such as data returned by an e-commerce API. Only one type can be defined under body, and if it is desired to place multiple types at the same time, a complex type must be defined first. The MessageContext is generally created by a parser, generally without explicit creation of the MessageContext instance, and is obtained through the passed parameters through the process context:
MessageContext context=new EIPMessageContext(Constants.XSD_STRING,null);
the first parameter is a body-type QName, supports simple types, supports arrays, and the second is an element instance, which may be null when no longer running in the flow.
If a complex object is constructed, such as a type of merchandise returned to an e-commerce, it can be created as follows:
QName qname=new QName("http://basedoc.ufida.com/Company","Company");
MessageContext context=new EIPMessageContext(qname,null);
HelperContext scope=SDOUtil.createHelperContext();
DataObjectbodyObj=scope.getXMLHelper().load(xmlString_Company).getRootObject()
therefore, the returned data of JSON or XML is mapped into a message context (MessageContext) by combining the service definition bound by the E-commerce application programming interface, and finally, the general data of the integrated platform is formed, so that seamless connection of the E-commerce interface is realized.
In a second aspect of the present invention, an e-commerce interface integration system 500 is provided, and fig. 5 shows a schematic block diagram of the e-commerce interface integration system 500 according to an embodiment of the present invention:
an obtaining unit 502, configured to obtain application programming interface data issued by an e-commerce;
a defining unit 504, configured to convert the application programming interface data into an application programming interface definition file in a web service description language format;
a calling unit 506, configured to call the application programming interface based on the application programming interface definition file;
and the parsing unit 508 is configured to receive and parse the return data sent by the application programming interface, so as to convert the return data into general data of the integrated platform.
In the e-commerce interface integration system 500 provided by the invention, the acquisition unit 502 captures Application Programming Interface (API) data issued by e-commerce through a tool, and the definition unit 504 converts the captured API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the WSDL is an XML-based language, so that the system can be machine-readable and human-readable, and what you see is what you get is realized. The calling unit 506 initiates calling based on the converted application programming interface definition file, starts calling the application programming interface which can be called, the analyzing unit 508 receives the returned data of the application programming interface, analyzes the returned data, and finally converts the returned data into the general data of the integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface which needs to be called, tedious calling on a handwritten code is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
Fig. 6 shows a schematic block diagram of an e-commerce interface integration system 600 of another embodiment of the present invention. The e-commerce interface integration system 600 includes:
an obtaining unit 602, configured to obtain application programming interface data issued by an e-commerce;
a definition unit 604, configured to convert the application programming interface data into an application programming interface definition file in a web service description language format;
a calling unit 606, configured to call an application programming interface based on the application programming interface definition file;
and the parsing unit 608 is configured to receive and parse the return data sent by the application programming interface, so as to convert the return data into general data of the integration platform.
The invoking unit 606 specifically includes:
a configuration unit 6062 configured to receive configuration information of an e-commerce, configure an e-commerce connection and an application programming interface according to the configuration information, and deploy the e-commerce connection and the application programming interface to an operating environment;
the simulation unit 6064 is configured to receive a simulation call instruction of the application programming interface, generate a token according to the configuration information to obtain a call authentication identity, and call the application programming interface;
a generating unit 6066, configured to determine whether the call is a secure call, and generate a request address of the uniform resource locator according to the configured application programming interface when the call is the secure call.
The parsing unit 608 specifically includes:
a receiving unit 6082, configured to receive return data in the JSON or XML format returned by the request address of the uniform resource locator;
a mapping unit 6084 for mapping the return data to a message context according to the service definition in the definition file to form generic data of the integrated platform.
In this embodiment, the api definition file at least includes a service definition, an entity object definition, and a list of invocations of the api of the e-commerce, such as the definition file of the example service PayService shown in fig. 3, and thus can be machine-readable and human-readable, and the implementation is what you see is what you get. After the processing by the integration tool, the application programming interface definition file maps the application programming interface of the e-commerce into a service and entity object in the integration platform system and a callable list of the application programming interface, such as the application programming interface definition file taking a certain e-commerce as an example shown in table 1, so that a user does not need to additionally process original text data, the integration platform system is responsible for automatically processing the object for the use in the process, and the usability is enhanced.
TABLE 1
E-commerce API Integrating tool processed data
Interface name Interface name
Interface description API List — API description
Adapted version API List — API compliant version
Usage scenarios API List-usage scenarios
Request description-url API List — URL corresponding to API
Request description-Format By default, not record
Request specification-https request mode API list-API request mode
Request specification-coding type By default, not record
url parameter description (parameter name and type) Parameters and type of interface (with identification)
Request body parameter description (parameter name and type) Parameters and type of interface (without identification)
Return parameter description (parameter name and type) Return value and type of interface
Interface description API List — API description
In this embodiment, the specific procedure called by the calling unit 606 to the application programming interface is as follows: firstly, a configuration unit 6062 receives configuration information of an e-commerce set by a user, configures an e-commerce connection and application programming interface according to the configuration information, deploys the e-commerce connection and application programming interface to an operating environment, deploys a service flow and invokes the operating environment of the application programming interface, a simulation unit 6064 receives a simulation call instruction of the user application programming interface, a token (token) is generated by simulation login, an authentication identity of the call is obtained, then a generation unit 6066 judges whether the call is an HTTPS safe call, if the call is the HTTPS safe call, a request address of a Uniform Resource Locator (URL) is generated according to the configured application programming interface, the last year supply and demand address is called, the call of the application programming interface is achieved, the security authentication and the token acquisition in the call process are realized, and the user can call only by configuring system parameters and output parameters of a previous node, fussy calling is not needed to be carried out on the hand-written codes, and the universality is enhanced.
In this embodiment, the specific process of the parsing unit 608 receiving the return data sent by the parsing api and finally converting the return data into the general data of the integrated platform is as follows: based on the above-mentioned calling application programming interface and after judging that the call is an HTTPS secure call, start to call a request address of a Uniform Resource Locator (URL), the receiving unit 6082 receives the request address of the Uniform Resource Locator (URL) and returns Data for the call, the format of the Data is generally JSON or XML, and certainly may be Data of other formats, the format of the Data returned by the e-commerce API interface is generally JSON or XML, the mapping unit 6084 maps the Data of the JSON/XML format into MessageContext in combination with the service definition bound by the e-commerce API, and the MessageContext is a Data carrier implemented based on sdo service (service Data objects). The basic structure of the MessageContext is shown in table 2, and includes a header (header), defining the body of the document (body), and a binary large object (blob) as three parts:
TABLE 2
Figure BDA0001428533970000141
The Header is mainly used for storing the entry information of the protocol and some information needed by the access control, and the Header part is defined as shown in fig. 4. The body is used for storing business data, and the body part is a dynamically changing type and is used for defining the type of entity messages to be processed in the flow, such as data returned by an e-commerce API. Only one type can be defined under body, and if it is desired to place multiple types at the same time, a complex type must be defined first. The MessageContext is generally created by a parser, generally without explicit creation of the MessageContext instance, and is obtained through the passed parameters through the process context:
MessageContext context=new EIPMessageContext(Constants.XSD_STRING,null);
the first parameter is a body-type QName, supports simple types, supports arrays, and the second is an element instance, which may be null when no longer running in the flow.
If a complex object is constructed, such as a type of merchandise returned to an e-commerce, it can be created as follows:
QName qname=new QName("http://basedoc.ufida.com/Company","Company");
MessageContext context=new EIPMessageContext(qname,null);
HelperContext scope=SDOUtil.createHelperContext();
DataObjectbodyObj=scope.getXMLHelper().load(xmlString_Company).getRootObject()
therefore, the returned data of JSON or XML is mapped into a message context (MessageContext) by combining the service definition bound by the E-commerce application programming interface, and finally, the general data of the integrated platform is formed, so that seamless connection of the E-commerce interface is realized.
In a third aspect of the present invention, a computer device is provided, and fig. 7 is a schematic block diagram of a computer device 700 according to an embodiment of the present invention. Wherein the computer device 700 comprises:
a memory 702, a processor 704, and a computer program stored on the memory 702 and executable on the processor 704, the processor 704 when executing the computer program implementing the steps of: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; and receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
In the computer device 700 provided by the present invention, the processor 704, when executing the computer program, implements: the method comprises the steps of grabbing Application Programming Interface (API) data issued by E-commerce through a tool, and converting the grabbed API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
An embodiment of the fourth aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of: acquiring application programming interface data issued by an electric company; converting the application programming interface data into an application programming interface definition file in a network service description language format; calling the application programming interface based on the application programming interface definition file; and receiving and analyzing the return data sent by the application programming interface so as to convert the return data into the general data of the integrated platform.
The present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: the method comprises the steps of grabbing Application Programming Interface (API) data issued by E-commerce through a tool, and converting the grabbed API data into an application programming interface definition file in a Web Service Description Language (WSDL) format, wherein the web service description language is an XML-based language, so that the web service description language can be machine-readable and human-readable, and what you see is what you get is realized. The method comprises the steps of initiating calling based on a converted application programming interface definition file, starting calling a callable application programming interface, receiving returned data of the application programming interface, analyzing the returned data, and finally converting the returned data into general data of an integrated platform, so that the conversion of the application programming interface data into the general data of the integrated platform is completed, seamless integration of the e-commerce is realized, a user can randomly call the application programming interface to be called, tedious calling of handwriting codes is not needed, the universality is enhanced, the steps are simple, the universality is good, and the high efficiency of e-commerce application programming interface integration is improved.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. An e-commerce interface integration method, comprising:
acquiring application programming interface data issued by an electric company;
converting the application programming interface data into an application programming interface definition file in a network service description language format;
calling an application programming interface based on the application programming interface definition file;
receiving and analyzing the return data sent by the application programming interface so as to convert the return data into general data of the integrated platform;
the calling an application programming interface based on the application programming interface definition file specifically includes:
receiving configuration information of the e-commerce, configuring e-commerce connection and the application programming interface according to the configuration information, and deploying the e-commerce connection and the application programming interface to a running environment;
and receiving a simulation call instruction of the application programming interface, generating a token according to the configuration information to obtain a call authentication identity, and calling the application programming interface.
2. The e-commerce interface integration method of claim 1, wherein the invoking an application programming interface based on the application programming interface definition file further comprises:
and judging whether the call is a safe call, and generating a request address of a uniform resource locator according to the configured application programming interface when the call is the safe call.
3. The e-commerce interface integration method according to claim 2, wherein the receiving and parsing the return data sent by the application programming interface to convert the return data into general data of an integration platform specifically comprises:
receiving the return data which is returned by the request address of the uniform resource locator and has a JSON or XML format;
mapping the return data to a message context according to a service definition in the definition file to form the generic data of the integration platform.
4. The e-commerce interface integration method of claim 3,
the message context includes:
the first preset unit is used for storing the entry information of the protocol of the integrated platform and the control information for accessing the integrated platform;
the second preset unit is used for defining the dynamic change type of the entity message processed by the process in the integrated platform and storing the service data;
and the third preset unit is used for storing binary data in the integrated platform.
5. The e-commerce interface integration method of any one of claims 1 to 4,
the application programming interface definition file includes at least a service definition, an entity object definition, and a list of callable of the application programming interface of the e-commerce.
6. An e-commerce interface integration system, comprising:
the acquisition unit is used for acquiring application programming interface data issued by an electric company;
the definition unit is used for converting the application programming interface data into an application programming interface definition file in a network service description language format;
the calling unit is used for calling the application programming interface based on the application programming interface definition file;
the analysis unit is used for receiving and analyzing the return data sent by the application programming interface so as to convert the return data into general data of the integrated platform;
the calling unit specifically comprises:
the configuration unit is used for receiving configuration information of the e-commerce, configuring e-commerce connection and the application programming interface according to the configuration information, and deploying the e-commerce connection and the application programming interface to a running environment;
and the simulation unit is used for receiving a simulation calling instruction of the application programming interface, generating a token according to the configuration information to obtain a calling authentication identity and calling the application programming interface.
7. The e-commerce interface integration system of claim 6, wherein the calling unit further comprises:
and the generating unit is used for judging whether the call is a safe call or not, and generating a request address of the uniform resource locator according to the configured application programming interface when the call is the safe call.
8. The e-commerce interface integration system of claim 7, wherein the parsing unit specifically comprises:
a receiving unit, configured to receive the return data in the JSON or XML format returned by the request address of the uniform resource locator;
a mapping unit, configured to map the return data into a message context according to a service definition in the definition file, so as to form the common data of the integrated platform.
9. The e-commerce interface integration system of claim 8,
the message context includes:
the first preset unit is used for storing the entry information of the protocol of the integrated platform and the control information for accessing the integrated platform;
the second preset unit is used for defining the dynamic change type of the entity message processed by the process in the integrated platform and storing the service data;
and the third preset unit is used for storing binary data in the integrated platform.
10. The e-commerce interface integration system of any one of claims 6 to 9,
the application programming interface definition file includes at least a service definition, an entity object definition, and a list of callable of the application programming interface of the e-commerce.
11. Computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor realizes the steps of the e-commerce interface integration method according to any one of claims 1 to 5 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the e-commerce interface integration method according to any one of claims 1 to 5.
CN201710930156.3A 2017-10-09 2017-10-09 E-commerce interface integration method, system, computer equipment and readable storage medium Active CN107632875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710930156.3A CN107632875B (en) 2017-10-09 2017-10-09 E-commerce interface integration method, system, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710930156.3A CN107632875B (en) 2017-10-09 2017-10-09 E-commerce interface integration method, system, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN107632875A CN107632875A (en) 2018-01-26
CN107632875B true CN107632875B (en) 2020-07-03

Family

ID=61103883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710930156.3A Active CN107632875B (en) 2017-10-09 2017-10-09 E-commerce interface integration method, system, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN107632875B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415710B (en) * 2018-03-14 2019-07-16 苏州思必驰信息科技有限公司 The method and system of API is issued, called in Intelligent dialogue development platform
CN108664344A (en) * 2018-05-14 2018-10-16 浪潮通用软件有限公司 A kind of adaption system and method for supporting more electric business platform docking
CN108874519A (en) * 2018-05-29 2018-11-23 郑州云海信息技术有限公司 A kind of cloud management plateform system task implementation method and device
CN110134429A (en) * 2019-04-02 2019-08-16 惠州学院 Network information browsing method, device, equipment, storage medium and system
CN110516090A (en) * 2019-08-09 2019-11-29 广东浪潮大数据研究有限公司 A kind of object detecting method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383845A (en) * 2008-10-15 2009-03-11 北京邮电大学 Integrated service access device, system and control method
CN101930370A (en) * 2010-09-09 2010-12-29 上海普元信息技术股份有限公司 System structure for realizing data conversion in service integration of SOA (Service Oriented Architecture) application system and method thereof
CN102193798A (en) * 2011-03-22 2011-09-21 天津大学 Method for automatically acquiring Open application programming interface (API) based on Internet
US8069435B1 (en) * 2003-08-18 2011-11-29 Oracle America, Inc. System and method for integration of web services
CN102291464A (en) * 2011-08-29 2011-12-21 上海普元信息技术股份有限公司 System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
CN102663009A (en) * 2012-03-19 2012-09-12 华侨大学 Web-service integration method supporting data privatization of enterprise users

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8245246B2 (en) * 2008-09-09 2012-08-14 International Business Machines Corporation Method, system, and computer program product for implementing a web service interface
US10268496B2 (en) * 2015-04-03 2019-04-23 Oracle International Corporation System and method for supporting object notation variables in a process defined by a process execution language for execution in a SOA middleware environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8069435B1 (en) * 2003-08-18 2011-11-29 Oracle America, Inc. System and method for integration of web services
CN101383845A (en) * 2008-10-15 2009-03-11 北京邮电大学 Integrated service access device, system and control method
CN101930370A (en) * 2010-09-09 2010-12-29 上海普元信息技术股份有限公司 System structure for realizing data conversion in service integration of SOA (Service Oriented Architecture) application system and method thereof
CN102193798A (en) * 2011-03-22 2011-09-21 天津大学 Method for automatically acquiring Open application programming interface (API) based on Internet
CN102291464A (en) * 2011-08-29 2011-12-21 上海普元信息技术股份有限公司 System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
CN102663009A (en) * 2012-03-19 2012-09-12 华侨大学 Web-service integration method supporting data privatization of enterprise users

Also Published As

Publication number Publication date
CN107632875A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
CN107632875B (en) E-commerce interface integration method, system, computer equipment and readable storage medium
CN106919509B (en) Client generation method and device and electronic equipment
CN110275831B (en) Mock data verification method and device of protocol interface
US8219970B2 (en) XML push and remote execution of a wireless applications
US8762933B2 (en) Converting business process models to component models in a service oriented architecture domain
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
CN110808897A (en) Proxy access method, user equipment, storage medium, device and system
WO2018210096A1 (en) Rule engine-based rule configuration method, terminal and device, and storage medium
CN104717647B (en) Professional ability method for authenticating, equipment and system
CN106302103B (en) Information processing method and system and application server
US8363238B2 (en) Image forming apparatus having a management unit and a shared processing unit, information processing method using the image forming apparatus, and image forming system having the image forming apparatus
CN109522139B (en) Data table service generation and calling method, device, equipment and storage medium
CN105991564A (en) Message processing method and device
EP2521043A1 (en) Method for establishing a relationship between semantic data and the running of a widget
CN107222461B (en) Communication processing method and device
CN107092474B (en) Program development method, ETL processing method and device
CN113688183A (en) Multi-type data source extraction method, system, terminal equipment and storage medium
CN113157975A (en) Extensible markup language parsing system and method
CN109816462A (en) A kind of recognition methods of invoice information and device
CN113709187B (en) Multi-server data request method, device, equipment and storage medium
CN101621540A (en) Method for combining inner service of enterprise service bus based on BPEL engine
Bertram et al. Secure web service clients on mobile devices
US9584695B2 (en) Information processing apparatus and information processing system
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN109509467B (en) Code generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant