Problem in execution while importing XSD with namespaces

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
zamzam
Participant
Posts: 4
Joined: Fri Apr 29, 2011 10:18 am
Location: Luxembourg

Problem in execution while importing XSD with namespaces

Post by zamzam »

WTX version 8.3.0.2

1)I've created a tree with XSD import. My XSD contains an 'import' tag because it uses a namespace in an other XSD file.
Creation of the tree worked well, i found tags from the main XSD + tags from the imported XSD

2)Compilation worked well

3)Execution failed (see logs below)

It seems that WTX only see tags from the main XSD while parsing input XML ... In input card settings, the main XSD is set up as type, i can see also namespaces declared.

i don't understand why the tree is not used for validation ??? I have 2 XSD file, how can WTX can valid my XML if we can set only 1 XSD file on input card settings ?



Thanks for explanation :/

---------------------------------------------------------------------------

input file begins like this :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReceiveXMLMessage>
<Header>
<Requestor>senderDNCode1</Requestor>
<Responder>DNCoderecipient</Responder>
<RequestType>setr.010.001.03</RequestType>
<RequestRef>reference</RequestRef>
<Service>swift.if.ia</Service>
<Appli>DSO</Appli>
<SeqNumber>reference</SeqNumber>
<Priority>1</Priority>
<MaxRetry>3</MaxRetry>
<DelivryNotification>true</DelivryNotification>
<SnF>true</SnF>
<NonRepudation>true</NonRepudation>
</Header>
<Payload>
<AppHdr xmlns="urn:swift:xsd:$ahV10">
<MsgRef>reference</MsgRef>
<CrDate>2006-11-05T09:08:07.0+01:00</CrDate>
</AppHdr>
<Document>


----------------------------------------------------------------------------

my main XSD begins like this :

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:header="urn:swift:xsd:$ahV10" >

<xs:import namespace="urn:swift:xsd:$ahV10" schemaLocation="head.xsd" />


<xs:complexType name="PayloadType">
<xs:sequence>
<xs:element name="AppHdr" type="header:AppHdrType"
minOccurs="1" maxOccurs="1" />
<xs:element name="Document" type="DocumentType" minOccurs="1"
maxOccurs="1" />
</xs:sequence>
</xs:complexType>


and my imported XSD is like this :

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:swift:xsd:$ahV10" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:swift:xsd:$ahV10">

<xs:complexType name="AppHdrType">
<xs:sequence>
<xs:element name="MsgRef" type="Max35Text" />
<xs:element name="CrDate" type="ISODateTime" />
</xs:sequence>
</xs:complexType>

<xs:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="35" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime" />
</xs:simpleType>

</xs:schema>


----------------------------------------------------------------------------

Log :

(Level 1: Offset 57, len 545, comp 2 of 2, #1, DI 000000000014:)
Data at offset 57 ('<ReceiveXMLMessa...') was found to be of TYPE
X'0008' (Global XSD).

(Level 1: Offset 57, len 545, comp 1 of 2, #1, DI 000000000015:)
External Parser returned Error:
TYPE X'0002' (Error (-9), "XMLParser: Could not find type to assign XML data."
No type to assign data was found
[element name: AppHdr, namespace: urn:swift:xsd:$ahV10, current input data offset: 571]

Error (-9), "XMLParser: Could not find type to assign XML data."
No type to assign data was found
[element name: MsgRef, namespace: urn:swift:xsd:$ahV10, current input data offset: 584]

Error (-1), "XMLParser: Input XML data is invalid."
There is a mismatch between t).

External Parser returned Error

End of Validation messages for INPUT CARD 1.


End of Execution messages.
why make standards if we always change them ?
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Re: Problem in execution while importing XSD with namespaces

Post by blewip »

It looks like the XSD is not where TX is expecting it to be.

I am guessing that there would be no issue if the RunTime XSD validation was switched off.

I haven't got version 8 to play about with. My only suggestion is to raise a support call.
Modern Life is Rubbish - Blur
Post Reply