4D v13.4Introduction |
||
|
4D v13.4
Introduction
Introduction
A Web Service is a set of functions grouped together as an entity and published on a network. These functions can be called and used by any application compatible with Web Services and connected to the same network. Naturally, Web Services are intended to be used to their fullest in the context of publishing on the Internet. Web Services can carry out all types of tasks, such as supervising the routing of packages at a transporter’s, e-commerce, monitoring market values, and so on. The program publishing the services is called the “server.” Any application compatible with Web Services can thus use one or more of these functions; this is the “client” program. The Web Services proposed by the server can be either public or private. There are a great number of public Web Services on the Internet that any application can solicit free of charge. Maintained by the W3C (World Wide Web Consortium, the regulating authority of the Internet) and major firms of the computer industry, Web Services represent a reliable, lasting and upgradable connectivity solution. Web Services transit essentially using the HTTP transport protocol.
4D can be used as a Web Services server and/or client. Integration of Web Services into 4D is simple and secure: several configurations enable precise monitoring of publication and subscription conditions. You can decide to publish any project method as a Web Service, without any major modification. Publication is a method property: Note: The publication of Web Services with 4D requires a specific license: the SOAP license. The 4D Web server automatically handles the management of the service as well as the publication and maintenance of the WSDL file. Parsing the XML content of requests, parameter formatting, sending of results, etc., are performed by 4D without any specific programming being necessary. However, if you want to customize request processing, you can use the specific 4D language commands — refer to the Web Services (Server) section in the 4D Language Reference manual. Your databases can use any type of Web Service offered on the Internet or on your network. Most of the time, the Web Services Wizard will enable you to use any Web Service instantly, with a minimum of programming: Using a Web Service in 4D consists in sending requests over the network and retrieving a response. “Proxy” methods are in charge of these operations. The creation of proxy methods for calling Web Services is entirely automatic and can be performed without programming. Simply call these methods in your code. It is possible to customize these methods using 4D language commands, in the same way as for the server part (see Web Services (Client)). Web Services published by 4D inherit security mechanisms set up for the 4D Web server. Web Services requests thus benefit from the same configurations as conventional Web requests: passwords, On Web Authentication and On Web Connection database methods, use of the SSL protocol, etc. In addition, specific configurations (for example, SOAP Get info and SOAP Request commands) allow precise control of Web Service publication. On the client side, connection to Web Services servers can be carried out in secure mode using SSL. The WEB SERVICE AUTHENTICATE command also allows connection to servers and/or proxies that require authentication. The communication layer of Web Services (ensuring transport, calling of services and security of exchanges) can operate in two different modes: RPC (Remote Procedure Call) mode and DOC (Message/Document) mode. The difference between these modes lies at the building level of requests and responses for the server and client. The DOC mode is required by certain client applications. 4D supports the RPC and the DOC mode:
Two different types of XML data are exchanged via the SOAP protocol: simple types and complex types. The data of Web Services published in RPC mode can be of either type. Conversely, the data of Web Services published in DOC mode are systematically of the complex type. 4D supports Web Services using simple and complex type data. Complex type XML data cannot be used directly in a 4D database and require specific processing. In many of these cases, the Web Services Wizard will carry out this processing for you; however, it may sometimes be necessary to complete this processing using 4D XML language commands. For more information about this, refer to Processing complex types. The Web services page of the Database Settings (“Web” theme) sets the general parameters concerning the publication and use of Web Services: The action of these parameters are described in the following pages. For a more detailed description of each option, refer to the Web/Web Services page section. |
PROPERTIES
Product: 4D |