2023年12月14日 星期四

SOAP(Simple Object Access Protocol) - WSDL(Web Service Define Language - XML)

 A web service is a function that can be accessed by other programs over the web (Http).


To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser. 


A web service is not targeted at humans but rather at other programs.

So your PHP site that generates a random integer could be a web service if it outputs the integer in a format that may be consumed by another program. It might be in an XML format or another format, as long as other programs can understand the output.

Wsdl is the interface and that's all you need. Good thing is that it is written in xml… so that we can achieve independence of defining data. All the languages have got APIs to read Xmls.(so that's the advantage of xml).

Now…the clients gets the wsdl and generates the stub code… this code is responsible for mediating the request response between server and client.




沒有留言:

張貼留言