cancel
Showing results for 
Search instead for 
Did you mean: 

External Definition Import Failure

Former Member
0 Kudos

Hi Gurus,

I was trying to import an external definition from Reuters DataScope product. Its not in W3 ORG format. I tried to import it into XI and also XMLSPY but got the same error as below.

Unable to convert imported document to WSDL

Reason: A schema must start with the tag <schema> that belongs to "http://www.w3.org/2001/XMLSchema" namespace

Check the selected category

Here is my xsd definition. What should I be doing to this xsd file in order to load it into XI without any errors?

Thanks.

Srini

<?xml version="1.0"?>

<ReportRequest xmlns="http://www.reuters.com/Datascope/ReportRequest.xsd">

<ReportTemplate>

<ReportAction>Replace</ReportAction>

<Name>MBCO_REUTERS_EXCHANGE_RATES</Name>

<EODPricing>

<OutputFormat>XML</OutputFormat>

<Delimiter>None</Delimiter>

<Delivery>None</Delivery>

<Compression>None</Compression>

<ColumnHeaders>No</ColumnHeaders>

<CurrencyScaling>No</CurrencyScaling>

<Header>

<HeaderLine>

<HeaderField>

<HeaderTrailerFieldType>StartTime</HeaderTrailerFieldType>

<DateTimeFormat>yyyyMMdd HH:mm:ss</DateTimeFormat>

<WidthStyle>Variable</WidthStyle>

<Justification>Left</Justification>

</HeaderField>

<HeaderField>

<HeaderTrailerFieldType>RowCount</HeaderTrailerFieldType>

<WidthStyle>Variable</WidthStyle>

<Justification>Left</Justification>

</HeaderField>

</HeaderLine>

</Header>

<Body>

<DataField>

<Name>Trade Date</Name>

<Label>Effective Date</Label>

<FieldNumber>0</FieldNumber>

<DataFieldType>Date</DataFieldType>

<DateFormat>yyyyMMdd</DateFormat>

<Justification>Left</Justification>

<Capitalization>None</Capitalization>

</DataField>

<DataField>

<Name>Security Description</Name>

<Label>Currency Description</Label>

<FieldNumber>1</FieldNumber>

<DataFieldType>Text</DataFieldType>

<Justification>Left</Justification>

<Capitalization>None</Capitalization>

</DataField>

<DataField>

<Name>Ask Price</Name>

<Label>Effective Price</Label>

<FieldNumber>2</FieldNumber>

<DataFieldType>Numeric</DataFieldType>

<DecimalPlaces>5</DecimalPlaces>

<DecimalSeparator>Period</DecimalSeparator>

<IntegerPlaces>12</IntegerPlaces>

<LeadingZeroes>No</LeadingZeroes>

<TrailingZeroes>No</TrailingZeroes>

<ThousandSeparator>Yes</ThousandSeparator>

<ThousandCharacter>Comma</ThousandCharacter>

<NegativePosition>After</NegativePosition>

<WidthStyle>Variable</WidthStyle>

<Width>21</Width>

<Justification>Left</Justification>

<Capitalization>None</Capitalization>

</DataField>

<DataField>

<Name>Bid Price</Name>

<FieldNumber>3</FieldNumber>

<DataFieldType>Numeric</DataFieldType>

<DecimalPlaces>5</DecimalPlaces>

<DecimalSeparator>Period</DecimalSeparator>

<IntegerPlaces>12</IntegerPlaces>

<LeadingZeroes>No</LeadingZeroes>

<TrailingZeroes>No</TrailingZeroes>

<ThousandSeparator>Yes</ThousandSeparator>

<ThousandCharacter>Comma</ThousandCharacter>

<NegativePosition>After</NegativePosition>

<WidthStyle>Variable</WidthStyle>

<Width>21</Width>

<Justification>Left</Justification>

<Capitalization>None</Capitalization>

</DataField>

</Body>

<Trailer>

<TrailerLine>

<TrailerField>

<HeaderTrailerFieldType>EndTime</HeaderTrailerFieldType>

<DateTimeFormat>yyyyMMdd HH:mm:ss</DateTimeFormat>

<WidthStyle>Variable</WidthStyle>

<Justification>Left</Justification>

</TrailerField>

<TrailerField>

<HeaderTrailerFieldType>RowCount</HeaderTrailerFieldType>

<WidthStyle>Variable</WidthStyle>

<Justification>Left</Justification>

</TrailerField>

</TrailerLine>

</Trailer>

</EODPricing>

</ReportTemplate>

</ReportRequest>

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Deleted...

Former Member
0 Kudos

Hi Srinivas,

When are you importing an XSD, wht is the Category you are setting in the external definition. Set it as 'XSD'. I guess you are setting it as 'WSDL'.

Regards,

Akshay

Former Member
0 Kudos

Thanks Sachin, Balaji, Akshay for youy quick responses.

I am checking the xsd category. The xsd definition I got does not begin the tags with <xs:schema or <xs:element. Is this a problem?

justin_santhanam
Active Contributor
0 Kudos

Srini,

First of all the file which you pasted above is not at all XSD. Its XML file, you need to create Data type for that structure. Its not XSD file ...

raj

Former Member
0 Kudos

I was able to solve the problem. I imported the sample xml output from reuters into Altova XML Spy and generated the xsd definition which confirms to w3 schema.

Thanks.

Srini

justin_santhanam
Active Contributor
0 Kudos

Gr8!!

raj.

Former Member
0 Kudos

Hi Srini,

Add

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

after the <xml version...> tag

and

</xs:schema> at the end. Save and reimport this as XSD.

Regards,

Balaji.M

Former Member
0 Kudos

Good the problem is sloved.

Regards,

Balaji.M

Former Member
0 Kudos

Here is my xsd definition that I was able to generate.

<?xml version="1.0" encoding="UTF-8"?>

<!W3C Schema generated by XMLSpy v2008 (http://www.altova.com)>

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

<xs:element name="Trailer">

<xs:complexType>

<xs:sequence>

<xs:element ref="Row"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="Trade_Date">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="2007/09/13"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="StartTime">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="20070914 16:05:03"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="Security_Description">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="Australian Dollar Spot"/>

<xs:enumeration value="Canadian Dollar Spot"/>

<xs:enumeration value="Euro Spot"/>

<xs:enumeration value="New Zealand Dollar Spot"/>

<xs:enumeration value="South African Rand Spot"/>

<xs:enumeration value="UK Pound Sterling Spot"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="RowCount">

<xs:simpleType>

<xs:restriction base="xs:byte">

<xs:enumeration value="6"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="Row">

<xs:complexType>

<xs:choice>

<xs:sequence>

<xs:choice>

<xs:element ref="EndTime"/>

<xs:element ref="StartTime"/>

</xs:choice>

<xs:element ref="RowCount"/>

</xs:sequence>

<xs:sequence>

<xs:element ref="Trade_Date"/>

<xs:element ref="Security_Description"/>

<xs:element ref="Ask_Price"/>

<xs:element ref="Bid_Price"/>

</xs:sequence>

</xs:choice>

</xs:complexType>

</xs:element>

<xs:element name="Report">

<xs:complexType>

<xs:sequence>

<xs:element ref="Header"/>

<xs:element ref="Data"/>

<xs:element ref="Trailer"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="Header">

<xs:complexType>

<xs:sequence>

<xs:element ref="Row"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="EndTime">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:enumeration value="20070914 16:05:03"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="Data">

<xs:complexType>

<xs:sequence>

<xs:element ref="Row" maxOccurs="unbounded"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="Bid_Price">

<xs:simpleType>

<xs:restriction base="xs:decimal">

<xs:enumeration value="0.7105"/>

<xs:enumeration value="0.8376"/>

<xs:enumeration value="1.0354"/>

<xs:enumeration value="1.3867"/>

<xs:enumeration value="2.022"/>

<xs:enumeration value="7.165"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

<xs:element name="Ask_Price">

<xs:simpleType>

<xs:restriction base="xs:decimal">

<xs:enumeration value="0.7109"/>

<xs:enumeration value="0.8381"/>

<xs:enumeration value="1.0359"/>

<xs:enumeration value="1.3868"/>

<xs:enumeration value="2.0223"/>

<xs:enumeration value="7.204"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

</xs:schema>

justin_santhanam
Active Contributor
0 Kudos

Balaji,

Are u sure the file which he pasted is XSD file? He pasted sample XML file...

raj.

Former Member
0 Kudos

Raj,

I pasted sample xml file into Altova XMLSPY software and generated the XSD file. Then I used that xsd file as external definition in XI.

Thanks.

Srini

Former Member
0 Kudos

Hi,

I think what you are importing is a XSD. If so, while importing the external definition, select the Category as XSD from the drop down.

Regards,

Balaji.M

Former Member
0 Kudos

Srinivas,

Replace the below mentioned line:

<ReportRequest xmlns="http://www.reuters.com/Datascope/ReportRequest.xsd">

with

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

Sachin.