SAP MII Illuminator Document XSD
There are always uses and questions that come up around the usage of XSDs, especially when working with the MII transaction WSDL interface and trying to capture XML or return XML values using this. The default behavior of the XML type when displayed in an MII transaction WSDL is to show the type as a String rather than as having a type of XML. This is because technically there is no difference between an unstructured XML and a String. If you want to provide a structured XML type you do have the option to define in the transaction properties window an XSD and choose the “Element Name” that represents the structure of the expected XML document as shown here:
Simply press the “Select XSD” button to open up the below configuration dialog to choose your XSD.
From here you have the option to or not to enforce validation of the XML in MII (MII will throw an error if XML doesn’t match XSD).
The XSD used in the above is this and this XSD definition is for the standard MII Illuminator XML format (/Rowsets/Columns/Column & /Rowsets/Rowset/Row):
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<s:schema xmlns:s="http://www.w3.org/2001/XMLSchema">
<!-- definition of complex elements -->
<s:element name="Messages">
<s:complexType>
<s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Message" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Column">
<s:complexType>
<s:attribute name="MinRange" type="s:decimal" />
<s:attribute name="MaxRange" type="s:decimal" />
<s:attribute name="SQLDataType" type="s:integer" />
<s:attribute name="Name" type="s:string" />
<s:attribute name="SourceColumn" type="s:string" />
<s:attribute name="Description" type="s:string" />
</s:complexType>
</s:element>
<s:element name="Columns">
<s:complexType>
<s:sequence>
<s:element maxOccurs="132" minOccurs="1" ref="Column" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Row">
<s:complexType>
<s:sequence id="RowSequence">
<s:any maxOccurs="unbounded" minOccurs="0" namespace="##local" processContents="lax" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Rowset">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" ref="Columns" />
<s:element maxOccurs="unbounded" minOccurs="0" ref="Row" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Rowsets">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="FatalError" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" ref="Messages" />
<s:element maxOccurs="unbounded" minOccurs="0" ref="Rowset" />
</s:sequence>
<s:attribute name="DateCreated" type="s:dateTime" />
<s:attribute name="EndDate" type="s:dateTime" />
<s:attribute name="StartDate" type="s:dateTime" />
<s:attribute name="Version" type="s:string" />
</s:complexType>
</s:element>
</s:schema>
From here when you do call the WSDL generator interface for the MII Transaction engine (Web Service Interface – Content Development – SAP Library) the response now includes a “typed” element and also at the top includes a reference to your XSD:
Hope that this helps,
Sam
Hi Salvatore Castro, thank you for this article, I am sure it will help a lot of people.
I have just one question.. this webservice can be imported and executed in the SAP ECC ?
Glad you like it and yes it should be fine and if not worth a ticket for your ECC instance to find out why as it's a standard web service.
I should point out though that in MII 15.0 (GA release Nov. 7th 2014) there is now a synchronous listener in MII that allows an ABAP instance to make synchronous calls directly to an MII server and access any of your content. This is native and should be more robust/secure than web services.
Sam
this is a great news 🙂
I am using web services to do it for long time ago.