Skip to Content
Author's profile photo Tobias Trapp

Enter Semantics: Adding Semantics to Interfaces Descriptions

In the first part (Enter Semantics: Interface Descriptions of Inside-Out Scenarios) of this blog series I described the problem that occurs in many XML-based integration scenarios: ** there are a lot of constraints and business rules that need to be respected but those can’t be expressed in XML Schema A possible solution would be to enrich a schema document (perhaps in a collaborative way with annotations – perhaps in a formal way. h3. *Semantic Annotations* The Semantic Annotations for WSDL and XML Schema (SAWSDL (http://www.w3.org/TR/sawsdl/)) W3C Recommendation defines mechanisms using which semantic  annotations can be added to WSDL components resp. elements, attributes and types of an XML Schema document. Originally this standard was created for SOA design time governance. We can classify interfaces of SOAP Web Services, message types, fault messages, data types in terms of an ontology. This allows us to know whether two of those elements are the same even if they have different names. This occurs  in many cases:  SAP recommends to copy global data types into ESR-SWCVs instead of referencing to them so that have different  repository (=XML) namespaces. But there are another applications of SAWSDL: We could link operation names, corresponding business objects, communication patterns, service properties like idempotency to a concept model defining those properties explicitly. One application could be service detection, checks of naming conventions and perhaps it could be useful for automated service composition. In fact I already blogged about IMHO failed standards for semantic web services but this is the first one which is easy to use. Here is the SAWSDL schema (see http://www.w3.org/TR/sawsdl/#sawsdlxsd (http://www.w3.org/TR/sawsdl/#sawsdlxsd) ).h3. *Semantics for XML Schema Documents* So SAWSDL supports two different use cases: we can identify data types, an XML elements (resp. attributes) as concept of an ontology and even declare a transformation that converts an XML document that is valid according to the Schema into an ontology instance. So there are two applications: 0.1. We can do documentation of an XML Schema within and in terms of an ontology. This allows us to define constraints that can’t be expressed using XML Schema like further data type restrictions (OWL 2) and data type restrictions as consequence of properties and much more like artihmetical constraints. 0.2. We can use a reasoner to check a document against those constraints. So the ontology linked to an XML Schema can be used as an collaboration tool to enrich a formal specification with narrative annotations as well as formal semantic, constraints (perhaps using SWRL and DL-safe rules) and as tool for validation. h3. *Tool Support for SAWSDL* You find a list of tools for SAWSDL in http://www.w3.org/2002/ws/sawsdl/ (http://www.w3.org/2002/ws/sawsdl/) . I tried out WSMO Studio because it is a very powerful tool delivered in Eclipse plugins and supports 0.1. adding semanatic annotations to WSDL and XML Schema documents, 0.2. creating ontologies: adding concepts, relations, instances and even rules and 0.3. reasoning using satisfiability and DL queries. h3. *Use Case: Documentation of an XFP document* From an output of an XFP document I created an XML Schema document which has the following structure:* *

*

Then I imported it into an WSMO project, created an ontology and annotated the XML Schema:* 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Tobias

      Great article. I can see the need for the ability to define the semantics but currently none of the tools support it. For instance, there is no way to annotate in PI and even if I export the WSDL and import it with annotations, the generated WSDL ignores them.

      Same is the case with ECC when using SPROXY to generate the classes for the Interfaces. Why is it that the semantics would need to be defined externally in a WSMO project? Not sure why SAP doesn't let us incorporate them within its toolset.

      Thanks
      Sridhar

      Author's profile photo Tobias Trapp
      Tobias Trapp
      Blog Post Author
      Hi Sridhar,

      in my opinion for Outside-In the situation is not so bad compared to Inside-Out (including XSF, XFP, custom enhanced IDoc and BDoc and so on). The reason is that there is already lots of semantics in ESR & PI: ESR knows about business objects, communication patterns, properties like itempotency and so on. In fact I blogged about it: Semantics of Web Services With PI we have even more governance information. But this is not true for other types of interfaces as I mentioned in the first part of this blog series: Enter Semantics: Interface Descriptions of Inside-Out Scenarios

      But lets get back to Outside-In, ESR & PI. I think it is possible that SAP customers would like to add additional semantics about their scenarions as annotations to ESR and PI data models. Can you provide some examples? Perhaps SAP will listen and improve the toolset.

      Best Regards
      Tobias