Skip to Content
This blog will show you the basics of XI, XSLT and the Graphical mapping tool.  This should give the XI beginner a very basic idea of how to use the SLD, Repository, namespaces, data types and mappings.  If you are like me you are probably just itching to get your hands dirty.  So first up let’s assume you have a XI userid – note that probably at first logon you will need to first logon to XI via SAPGUI to reset the password.  You’ll also need Java version 1.4+ and Java webstart installed on your PC – get this from Sun website  http://java.sun.com/products/javawebstart/download.jsp  (http://java.sun.com/products/javawebstart/download.jsp)That is very easy to do if you have a reasonable idea of how XSLT works.  It will help you, even using the XI Graphic mapping, to understand the concepts – tree navigation, nodes, context etc.  I would recommend you go and buy XSLT for Dummies or one of the many teach yourself XSLT sites and study further on this subject see http://www.w3schools.com/Xsl/default.asp  (http://www.w3schools.com/Xsl/default.asp)       If you don’t have one then get an XSLT editor.  E.g. Download this free tool –  http://xmlcooktop.com/  (http://xmlcooktop.com/)   You can use Cooktop to quickly check any XSLT you prepare before diving into XI.*And an associated DTD to describe the resulting XML*.  Tip : If you don’t have one but you have the XML you can use a convertor. You can use a online tool to import and create a DTD   http://www.hitsw.com/xml_utilites/  (http://www.hitsw.com/xml_utilites/)           *
*   h3. XSL Archive  OK got a handle on XML ?  Good now let’s do it in XI.    First Zip up the XSLs or ones that you might have created during your visit and learning in the world of XSLT.  Import them into XI  – as can only import these via a zip file.  Within the Integration Builder Designer – go to your Software Component Version and namespace you created before.  Expand it and expand Mapping Objects.  Right Click on Imported Archives. Create a new Imported Archive to hold all our XSL for this exercise Import the zipped filesEdit Imported Archive *Save it.*  Then on the left hand navigation pane it will appear.* *    h3. External Definition   Create an external definition to hold the *DTD for the Source XML file*. With that created select the DTD category and in the Messages choose the First Element.  Import the DTD file and Save it.  Create another *External Definition for the Target* XML file.  Remember to choose Category DTD and Messages from First Element  Target DTD  h3. Message Interface  Now we’ll need to describe the message interfaces for both the Source and Target files.  Again within your SWC Interface Objects, right click on Message Interface – create a new one for the source file.  This is the source’s outbound interface – so the category is Outbound.  Choose the corresponding DTD.Source Message Interface  We create another for the Target file.  This is the target’s inbound interface – so the category is Inbound.  Choose the corresponding DTD.  Leave the fault message type empty.Target Message Interface h3. Interface Mapping  Create a interface mapping for the Source to the Target via the XSL.  In the left hand navigation pane,  Open the Mapping Objects, right click on Interface Mappings and create. You can drag and drop or select the Source Interface And for the Target Interface Now choose the mapping program as XSL using the one you imported from the zip file you previously set up.Interface MappingSelect the Test Tab and click the xmlbutton to import the source XML file (via the XMLimport icon   ) or cut and paste the XML (via the src icon )  Press the Test button   – Hopefully you will have a transformed document.Test Result
To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Josef Schachinger
    Hello Peter

    Many thanks for this great blog.
    Only some hints which very very helpful for me.
    For the source DTD I cut and past the line “” to the first row because than the messages structure is shown in the right structure (coffees is the root element in this structure). If you do this it is necessary to update the Message Interfaces and Interface Mapping because XI will not do this by its own.

    Additionally I pad in the trap and named the mapping file with an extension xslt. As I tried to add this to the Interface Mapping I got the error “… has no program”. As I reread your blog I found my mistake and renamed the mapping file to xsl and archived it once again and then everything was fine.

    For the target Message Interface is the wrong picture shown, as you mentioned it is a Inbound Interface.

    Many thanks once again for this I was very helpful to me.

    Josef

    (0) 

Leave a Reply