Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, July 9, 2008

Converting WSDL to the Target Language ABAP Proxy Generation

As illustrated in the graphic below, a WSDL document converted by proxy generation comprises two parts, namely a description of data types and an interface description, the parameters of which are used by these data types:

This graphic is explained in the accompanying text

During proxy generation, WSDL descriptions are converted into proxies.

· The WSDL elements of the interface description are converted on a 1:1 basis into objects of the respective target language (classes, interfaces, methods).

· The conversion of the data types to XSD (XML Schema Definition Language) can be subject to restrictions, depending on the target language.
ABAP proxy generation does not support the full range of XSD commands. These restrictions are described in the attachment in the target language section in each case (for more information see: Attachment: Mapping XSD to ABAP or Attachment: Mapping XSD to Java
).

The WSDL description contains, among other things, the structure of a message. The message that is then sent corresponds to an instance of this description.

The following section is a brief introduction to XSD.

XSD: Brief Introduction

The following XSD data types exist:

· XSD provides numerous in-built data types (for example xsd:decimal) and defines a clearly defined value range. You can use them globally. Many of these data types cannot be mapped exactly to ABAP data types because the value ranges do not match. In cases such as these, you must check yourself whether a received value is within the value range of the data type in the respective target language.

· You can reconstruct new data types from in-built data types using the tag <simpleType>. For example, you can define a pattern for xsd:string for telephone numbers. The proxy runtime does not check this type of enhancement because they are checked when the system validates an XML document.

· You can then define structured data types using the tag <complexType>. Elements that are located between this and the corresponding closing tag are local and you can only access them using the upper-level type. Instead of this nesting you can reference other structured or simple data types for complexType tags.

Use the tag <element> to then define the elements that can occur in the XML schema and use <attribute> to define the attributes of these elements. You can then use the XSD data types to assign types. Definitions with <element>, <attribute>, <simpleType>, and <complexType> are visible globally if the sub-nodes of the top-level node are . You can only use nested types, elements, or attributes locally.

For an overview of XSD see http://www.topxml.com/xml/articles/xsd/kurt_schema2.asp. The official W3C recommendation from May 2, 2001 comprises three parts: XML Schema Part 0: Primer, XML Schema Part 1: Structures and XML Schema Part 2: Data Types.

No comments:

Archives