Nov. 17, 2010, 10:45 p.m.
posted by angryuser
WS-InspectionWS-Inspection is a specification that Microsoft and IBM jointly authored for inspecting endpoints, such as the root of a Web server, and finding out which services that endpoint knows about and offers. In effect, WS-Inspection is a simple XML grammar for gathering services together. It is a simple document with one main purpose. Of course, it also describes how to link to other WS-Inspection documents, including how to link to WS-Inspection documents within HTML. One other interesting feature is the ability to link to UDDI registrations that give more information about a listed service. This ability to bridge into UDDI is a key feature of WS-Inspection, and it highlights how this specification complements UDDI rather than conflicts with it.
Anatomy of WS-InspectionWS-Inspection documents have a root element with the local name inspection and the namespace http://schemas.xmlsoap.org/ws/2001/10/ inspection. Here is the complete syntax:
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection" />
Within this root document can be any number of service elements, which are listing services. Each of these service elements contains any number of description elements, which link to documents that describe some aspect of the service. <inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection"> <service> <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/" location="http://keithba.com/service.asmx?wsdl" /> </service> </inspection> Notice that this description also delivers the type of document to which it is pointing with the referencedNamespace attribute. This attribute should have as a value the URI of the default namespace of the document to which it is pointing.
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection">
<service>
<description
referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
location="http://keithba.com/service.asmx?wsdl" />
</service>
</inspection>
Typically, one of these descriptions will be a WSDL document. This makes sense because WSDL is the industry-leading way to describe a Web service. However, it is not the only way to describe a Web service. Usually, a WSDL document will not be enough. As mentioned in Chapter 10, Describing Web Services, it is also important to create human-readable documentation, such as HTML pages that act as a description for users of your service. WS-Inspection makes this possible.
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection">
<service>
<description
referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
location="http://keithba.com/service.asmx?wsdl" />
<description
referencedNamespace="http://XHTML/"
location="http://keithba.com/service/Contents.html" />
</service>
</inspection>
WS-Inspection also can link to other WS-Inspection documents with the link element. This element points to another WS-Inspection document—in effect creating a tree of inspection documents, with each link acting as a branch. Typically, WS-Inspection documents end with the *.wsil extension.
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection">
<service>
<description
referencedNamespace="http://schemas.xmlsoap.org/wsdl/"
location="http://keithba.com/service.asmx?wsdl" />
<description
referencedNamespace="http://XHTML/"
location="http://keithba.com/service/Contents.html" />
</service>
<link
referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10"/ inspection location="http://keithba.com/NewService.wsil"/>
</inspection>
|
- Comment