About Xml/edi Web Service Small Introduction

Source: Internet
Author: User
Tags soap

Design of Xml/edi System

Overall framework

The Xml/edi system consists of four levels:

The first tier is a service provider that provides a WEB service, It includes all the services that the service provider can provide (primarily the interaction with the database and the implementation of complex features)

The third layer is the client program that invokes the service requester of the WEB service, This layer of content is based on the XML data returned by the client in the service proxy to find the appropriate WEB service to process the data, and provide the final client service interface

1) The four-tier mechanism makes a clear distinction between the various functions, in which the Web Service has good reusability
2) The transmitted data is the XML data stream, the unified data format makes the Web Service based Xml/edi can be more widely used
3) Since all levels are transmitted through the SOAP protocol, the Xml/edi system can provide services for different terminals, including computers, mobile phones, and so on.

Function Module Design

From the specific business, Xml/edi is divided into three parts: business data maintenance, ordering and shipping. The Business Data Maintenance section is responsible for the maintenance of all data used in this system, including business information maintenance, commodity shelf information maintenance and commodity information maintenance and so on.
Take commodity information maintenance as an example, this part mainly for wholesalers to provide commodity entry, commodity information file upload, product information modification and deletion functions. When the product is entered, the wholesaler can use the browser to click or make appropriate input according to the information provided on the interface. Product information files written according to the intended Schema can be uploaded directly to the service provider, and the system automatically extracts the information from it to the appropriate library.
The order section includes a sales contract between the retailer and the wholesaler, and a retailer placing an order with the wholesaler. The main process is: Wholesalers first issue a price list to the retailer, if the retailer does not agree with the offer, you can bargain with the wholesaler until the agreement between the two parties to form a contract, in the future, the transaction will be in accordance with the contract, unless a new contract has been entered into. When retailers find that certain items are in short supply, they send an order request to the retailer. If the wholesaler owns the quantity of goods proposed by the retailer, the order is formed and if not, the order is not formed. Of course, in general, the retailer will order more than one item, and if the quantity of some goods in the order process is insufficient, the two sides can still form an order for other quantity of goods. The shipping section includes a wholesaler issuing a shipping reservation to the retailer after the order has been issued, and the retailer sends a delivery order to the wholesaler after verification and the wholesaler settles the transaction fee accordingly. It needs to follow the order information to the shelves to check inventory information, the shipment of goods information included in the shipping instructions data, while modifying inventory information. When a commodity arrives at a wholesaler, it can be requested to print the relevant documents, which are kept in the information bank for later reference.

3 System Specific implementation

corresponding to the detailed design requirements, the system is mainly divided into the implementation of the database, Web service programs, Web service requestor, and the end user to see the implementation of the EDI interface.
the implementation of the database is the basic part of the whole system, and most of the operation of the Web Service is based on the database. The database in the system mainly consists of five data: Standard commodity data, transaction relation data, commodity shelf data, order data and wholesale information data.
Web Service is the first layer of the system, that is, the EDI system can achieve all the external services, for this system, generally involves the operation of the database. Take the commodity entry database as an example, the Web service outward interface is the XML data stream, when the corresponding Web service is called, the XML data stream from the client is parsed according to the well-known Schema document format, in which the various commodity fields are separated, according to the relational data The format of the library is stored in the database.
The Web Service requestor is in the second layer of the system, which plays a connecting role in the whole system. This layer receives the merchant information from the EDI interface, calls the corresponding Web Service to process the information, and feeds the processing results back to the EDI interface. Still take the commodity entry as an example, whether it is a single product input or a product file upload, arrived at this layer is in the format of the XML data stream, when the data stream received, the layer first XML file schema validation, the XML data stream that conforms to the schema document definition is given to the WEB Service processing, such as failure to conform to the Schema document definition, feedback error messages.
The EDI interface appears to the user as a normal HTML page, but it is made in. NET ASP in the implementation process. The difference is that ASP. NET provides a large number of WEB components, which makes it easy to construct an aesthetically pleasing page, and also provides a variety of programming languages for processing data, not just VBScript and JavaScript. As an example of a single commodity entry, the page provides a framework for filling out the product category, product name, and number of items, entered by the user, and the client program forms an XML file.

Visual.net implementation method, its Service requester side:

1 stringTemps =xmlfile.readtoend ();2XmlDocument doc =NewXmlDocument ();3 Doc. LoadXml (temps);4 5 stringp =Commshow.savefile (Doc. INNERXML);6 7 //requesting services on the WEB service side8 //on the service Provider side:9 TenXmlDocument xmldoc =NewXmlDocument (); OneXmlDoc. LOADXML (Commodityxml);
View Code

  As you can see, the selection of the client Post and Get is avoided in Visual.net because the SOAP protocol transmits all the uniform XML documents, and the service of the Web services can be called by multiple service requester, which reduces the system dimension The Web Service section can be reused at a later time to develop similar systems.
In the internal mechanism, by using Web Service technology, the embedded code of data collection can easily adapt to all kinds of software that need to use the platform, and can easily be compatible with software of various platforms. At the same time, through the use of open Web Service access, the platform can be deployed on the Internet, for the majority of software users to provide Bug and performance parameters of feedback, to help software developers to timely and accurate correction software errors, adjust software performance.



This article is for your own reference only

About Xml/edi Web Service Small Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.