Skip to Content

reference an xsd from another file

Currently I'm working with custom XSD's to map data to JSON structures. In these XSD's I want to put complexType definitions in their own file, e.g. the address complexType definition is in address.xsd which I want to reference from customer.xsd.

Currently, I cannot get this to work in CPI: the customer.xsd file does not resolve the address type in the mapping.

My question is whether this referencing is possible in CPI and if yes, how to do it. Below the files I tested with, based on this example.

Thanks in Advance!


<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs=""> <xs:complexType name="address"> <xs:choice maxOccurs="unbounded"> <xs:element type="xs:string" name="addressID"/> <xs:element type="xs:string" name="street"/> <xs:element type="xs:string" name="houseNo"/> <xs:element type="xs:string" name="postalCode"/> <xs:element type="xs:string" name="city"/> <xs:element type="xs:string" name="country"/> </xs:choice> </xs:complexType> </xs:schema>


<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="" xmlns:common="http://CommonTypesNamespace/CommonTypes"> <xs:import namespace="http://CommonTypesNamespace/CommonTypes" schemaLocation="address.xsd"/> <xs:element name="root"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="customers" maxOccurs="unbounded" minOccurs="1"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element type="xs:string" name="name" minOccurs="0" maxOccurs="1" /> <xs:element name="customerAddress" type="common:address"/> </xs:choice> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 23, 2018 at 09:26 AM

    Hello Bram,

    This feature is currently not available in SAP CPI- WEB UI. This feature will be tentatively available by this Nov or Dec end release.

    Currently Message Mapping is not able to resolve the nested XSD reference.


    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded