473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Urgent Help Needed With XSD, HELP PLEASE!!!!

1
Hi guys, I am resonably new to XSD so I appologise if my question is simple. I am attempting to use an XSD to validate my XML document which previously used a DTD for validation. The problem is that I keep getting this error message:
ORA-19202: Error occurred in XML processing
LSX-00310: local element or attribute should be namespace qualified.

I have validated both the XML file and the XSD individually and against each other in AltovaXMLSpy and the software tells me that they are valid but as soon as I run them in my PLSQL application I get the error message above. here are both the XML and the XSD files I am using if anyone could help me I would be very grateful.


------------------------XSD-------------

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

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:complexType name="transactionHeaderType">
<xs:all>
<xs:element name="tranType" type="xs:string"/>
<xs:element name="agencyId" type="xs:string">
<xs:annotation>
<xs:documentation>agencyId of the submitting agency</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="agencyOfficeCode" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The office code of the submitting agency</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="reqDTS">
<xs:annotation>
<xs:documentation>Submit date and time</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="date">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="time">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="reqId" type="xs:string">
<xs:annotation>
<xs:documentation>reference number</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="agencyRefNumber" type="xs:string">
<xs:annotation>
<xs:documentation>The agency's reference number</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="errorCode" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Return value non zero indicates an error</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:element name="msg">
<xs:annotation>
<xs:documentation>Root Element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="msgHeader" type="msgHeaderType"/>
<xs:element name="payload">
<xs:complexType>
<xs:sequence>
<xs:element name="tran" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="header" type="transactionHeaderType">
<xs:annotation>
<xs:documentation>Transaction header</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="data" minOccurs="0">
<xs:annotation>
<xs:documentation>Transaction data</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="subjectName" type="subjectNameType"/>
<xs:element name="totalMatchesFound" type="xs:integer"/>
<xs:element name="reqStatus" default="RELSE" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="5"/>
<xs:enumeration value="COLLD"/>
<xs:enumeration value="FINAL"/>
<xs:enumeration value="HELD"/>
<xs:enumeration value="PEND"/>
<xs:enumeration value="REFRD"/>
<xs:enumeration value="RELSE"/>
<xs:enumeration value="SUBMT"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="match" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="matchJursId">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AFP"/>
<xs:enumeration value="NSW"/>
<xs:enumeration value="NT"/>
<xs:enumeration value="QLD"/>
<xs:enumeration value="SA"/>
<xs:enumeration value="TAS"/>
<xs:enumeration value="VIC"/>
<xs:enumeration value="WA"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="matchesFound">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1"/>
<xs:enumeration value="Y"/>
<xs:enumeration value="N"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="msgHeaderType">
<xs:all minOccurs="0">
<xs:element name="destination">
<xs:complexType>
<xs:all>
<xs:element name="process" type="xs:string"/>
<xs:element name="gateway" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="deliveryMode" type="xs:string" minOccurs="0"/>
<xs:element name="expiration" type="xs:string" minOccurs="0"/>
<xs:element name="priority" type="xs:string" minOccurs="0"/>
<xs:element name="msgId" type="xs:string" minOccurs="0"/>
<xs:element name="timestamp" type="xs:string" minOccurs="0"/>
<xs:element name="correlationId" type="xs:string" minOccurs="0"/>
<xs:element name="replyTo" type="xs:string" minOccurs="0"/>
<xs:element name="org" type="xs:string" minOccurs="0"/>
<xs:element name="type" type="xs:string" minOccurs="0"/>
<xs:element name="redelivered" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="subjectNameType">
<xs:sequence>
<xs:element name="surname" type="xs:string"/>
<xs:element name="given" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>


----------------------XML------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<msg>
<msgHeader>
<destination>
<gateway>xxx</gateway>
<process>EAMS4_REPLY</process>
</destination>
<replyTo>yyy</replyTo>
<org>SOMEORG</org>
</msgHeader>
<payload>
<tran>
<header>
<agencyId>15</agencyId>
<agencyOfficeCode>SOMECODE</agencyOfficeCode>
<agencyRefNumber>1074273</agencyRefNumber>
<errorCode>16</errorCode>
<reqDTS>
<date>20070920</date>
<time>125727</time>
</reqDTS>
<reqId>0</reqId>
<tranType>EAMS4_REPLY</tranType>
</header>
</tran>
</payload>
</msg>


Thanks a lot
Oct 5 '07 #1
1 1501
jkmyoung
2,057 Expert 2GB
It appears that PLSQL does not allow certain elements to be in the default namespace. You would have to add a namespace, by adding it like: xmlns="www.somenamespace.com" to the affected element.

In the schema, add to your root <xs:schema> node:
targetNamespace="www.somenamespace.com"
Oct 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sanju Joseph | last post by:
Dear friends, We are working on a website which will enable the users to place orders from restaurants. The payments are to be directed through Paypal.com. Can anyone provide us necessary...
1
by: Aliandro | last post by:
Hi I am really stuck and need some expertise help please. I have an XML file: <XML> <USER_INFO> <USERNAME>username</USERNAME> <PASSWORD>password%</PASSWORD> </USER_INFO> <SITE_INFO>...
0
by: Craig Malton | last post by:
I have built a web application with ASP.NET and runs on a server running SQL. Periodically, throughout the day, it stops functioning complaining of not enough space on the disk - However, I have...
0
by: Bsiang Tan | last post by:
Dear all experts, I have this: An assembly (proxy.dll) which is a WebService proxcy client Case 1 : Loading proxy.dll using Assembly.LoadFrom(...), invoke a static method of a class which...
4
by: Pete H | last post by:
I would like to have my new C++ projects start out with two configurations, UnicodeDebug and UnicodeRelease, instead of the standard Debug and Release configurations that Visual Studio always...
0
by: bprasanth_20 | last post by:
Hi, I need an urgent help. I need to create a UDF (User Defined Function) in DB2 SQL which can accept any number of arguments (from 2 to 5 arguments). I do not how to achieve this. When I pass 2...
2
by: sugee | last post by:
hi, I have a COM component which has a method f1() ,f2()and f3(). f1() internally calls f2 and f3. f1 is invoked by c# using reflection. f1 uses global variable and the global varaible value is...
2
by: dragonball | last post by:
hi, i want to use log(double) in my java prog. so i have imported java.lang.Math flanagan.math.PsRandom now i wanna use log function in a private method inside a class. so i try : ...
6
by: xhe | last post by:
I am using ffmpeg to convert video, this is a sample script: $str='/home/transla1/bin/ffmpeg -i /home/transla1/public_html/ cybertube/web/uploads/video/31_AK000005.AVI -s 240x180 -b 100k -ar...
2
by: rKrishna2k6 | last post by:
We used to run our application on framework 1.1 and upgraded to 3.5 recently(I understood 2.0 and 3.5 are same except for the few add In s) Our Prod environment is on Win 2003 & IIS 6.0 and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.