cancel
Showing results for 
Search instead for 
Did you mean: 

DataType creation using XSD

Former Member
0 Kudos

I'm trying to create a data type using a simple XSD given below but i'm getting errors. Please let me know what am I missing?

<?xml version="1.0" encoding="ISO-8859-1" ?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="Contact">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="FirstName" type="xsd:string"/>

<xsd:element name="LastName" type="xsd:string"/>

<xsd:element name="City" type="xsd:string"/>

<xsd:element name="State" type="xsd:string"/>

<xsd:element name="Country" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

the error it shows is:

Schema to be handled does not contain a definition of type Contact.

Let me know what is wrong with this XSD.

Angela

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Henrique and Vishnu. I know that we can define XSD as external definition. But we have option to import XSD while creating DataType. I dont understand why it is not working there. Did you guys try creating data type using xsd? If we always go for external definition for the XSD, then what is the use for import from XSD option while creating the data type?

Angela

former_member206604
Active Contributor
0 Kudos

Hi,

When you create a data type in IR you can take out that XSD and use somewhere but the vice versa is not true. Because XSD that is generated when you are creating a datatype has certain objectID(GUID) which are only internal to XI. You can try creating a Datatype check in XSD there are object ID that are generated which will not be available when you import a external XSD. And thats the reason for External Definiton.

Thanks,

Prakash

former_member206604
Active Contributor
0 Kudos

Hi,

<b>>>>the use for import from XSD option while creating the data type?</b>

For example you have created a XSD in one XI system say XI1 and there was a simillar kind of structure you need to create in XI2 (only the structre not the whole SWC to be imported) then this will help you.

Thanks,

Prakash

Former Member
0 Kudos

Hi Angela,

The Data Type name and its namespace that you have created should match the name and namespace of the root element in the XSD file. In this case, in the Integration Repository, you HAVE to name the Data Type as 'Contact', with the namespace "http://www.w3.org/2001/XMLSchema".

The better way wiould be to change name and namespace in the the XSD file to match with that you are using in the IR.

Hope this helps,

Bhanu

Former Member
0 Kudos

Hi Angela,

You need not create a DataType when you use XSD.

It can be directly used (by importing) in the external defintions. Once you import the XSD. It can be used in the Messages

Regards

Vishnu

henrique_pinto
Active Contributor
0 Kudos

When you have a XSD, you don't need to create a data type.

Import this .xsd as a External Definition (remember to mark XSD file type) and then create directly a Message Interface from the message defined in the external definition. You won't need to create Data Type and Message Type.

Regards,

Henrique.