Integration Must-have – Web Service (1 of 3)
We present the integration tools – elements that you cannot do without in your daily work. Without them, using systems is much more difficult. Fortunately, enterprise service bus servers help you to connect different systems. Among them stands out the WSO2 Enterprise Integrator, an Open Source data bus with many integration options and over 250 connectors for external systems.
Contract or WSDL
The most important thing in a Web Service is the description of the service – the so-called WSDL, or Web Service Definition Language. We also call it a contract because it separates the application from the server and clearly defines the way of communication between the server and the client application. WSDL describes all aspects of communication, from the access point address, connection method, through methods or functions to be called, to the types and types of individual fields.
It can be a little complicated, but don’t worry about the details. We can read WSDL descriptions and we can create new service definitions, if necessary.
XML – SOAP
The heart and language of Web Service description is XML – Extensible Markup Language. It is a text format designed for communication between computers. It was designed to be just as easy to read and create by yourself. This helps a lot in starting and testing new services. We have the ability not only to easily read data transferred between systems, but also to create an XML document in any text editor.
A SOAP message (the format used by the Web Service) is broken down like a letter, including an envelope, a header, and a body. The main element – the envelope – includes the header and body. The XML format requires that there be only one root element in the message. Messages describing the message are communicated in the header. Here we can find, among other things, a description of the message addressee and the return address. Only the data is transferred in the content itself.
Web Service security is done smart. Additional elements are placed in the header without interfering with the message content. The WS-Security standard used in the Web Service defines various methods of ensuring the irrefutable message and hiding it from unauthorized access. We have the option of signing a message, encrypting and using keys and certificates.
The plethora of security options, protocols and formats can scare you, but don’t worry – we’re experts in cryptography and signatures. We also pay great attention to the safety of our services.
Unfortunately, not all calls are successful. We would like that, but life often verifies our dreams. Then we come back to the concept of error handling. In the Web Service, we have a lot of help in this regard, i.e. a special type of message denoting an exceptional situation. SOAP Fault contains not only the indication that an error has occurred and an explanatory message, we can also pass on what type of error has occurred. We have several options at our disposal, thanks to which we can provide more precise information: incorrect input data format, lack of the required security mechanism, or error on the server side.
WSO2 Enterprise Integrator support
The WSO2 EI data bus has built-in support for the Web Service. It is a proxy element that directly implements the concept of Web Service. Proxy can be enriched with the description of the WSDL service, which will allow for easier calling and gives the possibility to generate the call skeleton by the client application. Inside the proxy, we have access to a whole range of processing and additional WSO2 connectors, thanks to which we are able to build the target solution faster than in other products.