Saturday, February 29, 2020
Friday, February 28, 2020
Marshalling
Marshaling is the process of transforming the memory representation of an object to a data format that could be stored or transmitted. It's also called "serialization".
In a very generic sense in programming it simply means taking data in one format and transforming it into a format that is acceptable by some other system.
It is typically used when data must be moved between different parts of a computer program or from one program to another.
Used Case of marshaling:
Remote procedure call uses marshaling quite clearly. When invoking remote functions you will have to Marshall the arguments to some kind of standard format so it can be transport across the network.
In a very generic sense in programming it simply means taking data in one format and transforming it into a format that is acceptable by some other system.
It is typically used when data must be moved between different parts of a computer program or from one program to another.
Used Case of marshaling:
Remote procedure call uses marshaling quite clearly. When invoking remote functions you will have to Marshall the arguments to some kind of standard format so it can be transport across the network.
Thursday, February 27, 2020
WSDL Elements
The WSDL file itself can look very complex to any user, but it contains all the necessary information that any client application would require to use the relevant web service.
Below is the general structure of a WSDL file:
- Definition
- TargetNamespace
- DataTypes
- Messages
- Porttype
- Bindings
- service
One key thing to note here is that definition of messages, which is what is passed by the SOAP protocol is actually defined in the WSDL document.
The WSDL document actually tells a client application what are the types of SOAP messages which are sent and accepted by the Web service.
In other words, the WSDL is just like a postcard which has the address of a particular location. The address provides the details of the person who delivered the postcard. Hence, in the same way, the WSDL file is the postcard, which has the address of the web service which can deliver all the functionality that the client wants.
WSDL Elements
The WSDL file contains the following main parts
- The <types> tag is used to define all the complex datatypes, which will be used in the message exchanged between the client application and the web service. This is an important aspect of the client application, because if the web service works with a complex data type, then the client application should know how to process the complex data type. Data types such as float, numbers, and strings are all simple data types, but there could be structured data types which may be provided by the web service.For example, there could be a data type called EmployeeDataType which could have 2 elements called "EmployeeName" of type string and "EmployeeID" of type number or integer. Together they form a data structure which then becomes a complex data type.
- The <messages> tag is used to define the message which is exchanged between the client application and the web server. These messages will explain the input and output operations which can be performed by the web service. An example of a message can be a message which accepts the EmployeeID of an employee, and the output message can be the name of the employee based on the EmpoyeeID provided.
- The <portType> tag is used to encapsulate every input and output message into one logical operation. So there could be an operation called "GetEmployee" which combines the input message of accepting the EmployeeID from a client application and then sending the EmployeeName as the output message.
- The <binding> tag is used to bind the operation to the particular port type. This is so that when the client application calls the relevant port type, it will then be able to access the operations which are bound to this port type. Port types are just like interfaces. So if a client application needs to use a web service they need to use the binding information to ensure that they can connect to the interface provided by that web service.
- The <service> tag is a name given to the web service itself. Initially, when a client application makes a call to the web service, it will do by calling the name of the web service. For example, a web service can be located at an address such as http://localhost/tajul7777/blog.xml. The service tag will actually have the URL defined as http://localhost/tajul7777/blog.xml., which will actually tell the client application that there is a web service available at this location.
Why WSDL file?
We already know that WSDL is an XML standard document, is used to describe a web service. This description is required so that the client applications are able to understand what the web service actually does.
WSDL describes:
WSDL describes:
- How to call a web service (Using SOAP or HTTP protocol)
- All the available operations which are exposed by the web service and their input and output structures.
- Location of the web service or we can say the end point of the web service (Location where the service is running)
The WSDL file itself can look very complex to any user but it contain all the necessary information that any client application would require to use the relevant web service.
Why WSDL File?
The WSDL file is written in plain XML. So that the file can be read by any programming language. But now with the WSDL file which is an XML , which can be understand by any programming language, we can now easily have a Java class consume the .NET , SAP, Python web service and vice versa. Hence the amount of coding effort is greatly reduced.
Subscribe to:
Comments (Atom)
Elegance of Vanilla JavaScript
In the bustling metropolis of the web, where complex frameworks and libraries crisscross like the intricate networks of its vast infras...
-
Web Services Description Language (WSDL) To consume a web service from a web service provider a service consumer needs to know: ...
-
1.1 Unveiling the Orchestration: In the magical realm of statistical analysis and machine learning, data augmentation emerges as the virtuos...
