Joke Collection Website - Public benefit messages - The role of webservice in prawn java fully shows!

The role of webservice in prawn java fully shows!

At present, WebService is a hot topic. But what exactly is a web service? When should I use WebService? When should I not use WebService? It needs our correct understanding.

Web service is a new branch of web application. They are self-contained, self-describing and modular applications, which can be published, located and called through the web. Web services can perform any function from simple requests to complex business processing. After deployment, other Web service applications can discover and invoke the services it deploys.

In fact, the main goal of WebService is cross-platform interoperability. In order to achieve this goal, WebService is completely based on standards independent of platforms and software vendors, such as XML (Extensible Markup Language) and XSD(XMLSchema). It is a new platform for creating interoperable distributed applications. It can be seen that using WebService will bring great benefits in the following three situations.

Item 1

If the application has thousands of users and is distributed all over the world, the communication between the client and the server will be a thorny issue. Because there is usually a firewall or proxy server between the client and the server. In this case, using DCOM is not so simple, and it is usually inconvenient to distribute client programs to such a large number of users. The traditional way is to choose a browser as the client, write a large number of ASP pages, and expose the middle layer of the application to the end users. Therefore, it is difficult to develop and maintain programs.

Project 2: Application Integration

Enterprise-level application developers know that enterprises often have to integrate various programs written in different languages and running on different platforms, and this integration will consume a lot of development power. Applications often need to get data from programs running on IBM hosts; Or send data to a host or UNIX application. Even on the same platform, various softwares produced by different software vendors often need to be integrated. Through WebService, applications can "expose" functions and data in a standard way for other applications to use.

For example, there is an order registration program for registering customers' new orders, including customer information, delivery address, quantity, price and payment method; There is also an order fulfillment program to manage the actual delivery of goods. These two programs are from different software vendors. After the new order comes in, the order login program needs to inform the order execution program to send the goods. By adding a layer of WebService to the order executor, the order executor can "expose" the "AddOrder" function. In this way, every time a new order arrives, the order login program can call this function to send the goods.

Item 3: B2B Integration

Integrating applications with WebService can make business processing within a company more automated. But what happens when the transaction crosses suppliers and customers and breaks through the boundaries of the company? Cross-company business transaction integration is usually called B2B integration.

WebService is the key to successful B2B integration. Through WebService, companies can "expose" key business applications to designated suppliers and customers. For example, the electronic ordering system and electronic invoice system are exposed, customers can send orders electronically, and suppliers can send raw material purchase invoices electronically. Of course, this is not a new concept. EDI (Electronic Document Exchange) has been like this for a long time. However, the implementation of WebService is much simpler than EDI. Moreover, WebService runs on the Internet and can be easily implemented anywhere in the world, so its running cost is relatively low. However, WebService is not a complete solution for document exchange or B2B integration like EDI. WebService is only the key part of B2B integration, and many other parts are needed to realize the integration.

The biggest advantage of B2B integration with WebService is that it can easily achieve interoperability. As long as the business logic is "made public" and becomes a WebService, it can be called by any designated partner, no matter what platform their system runs on or what development language they use. This greatly reduces the time and cost of B2B integration, and enables many small and medium-sized enterprises that could not bear EDI to realize B2B integration.

Disadvantage 1: standalone application

At present, enterprises and individuals still use many desktop applications. Some of them only need to communicate with other programs on this machine. In this case, it is best not to use WebService, but to use local API directly.

Disadvantage 2: isomorphic application of LAN.

In many applications, all the programs are developed by VB or VC, all of them use COM under the Windows platform, and all of them run on the same LAN. For example, two server applications need to communicate with each other, or a client program of Win32 or WinForm wants to connect with another server program on the LAN. Among these programs, DCOM is much more effective than SOAP/HTTP.

In short, as long as there are other methods that are more effective and feasible than WebService from the perspective of application structure, then don't use WebService.