ORA-31011 : Weird case of parsing/validation failure...

Hello all,
It seems that when trying to insert into an XMLTYPE schema-bound column I am hitting a validation error that I cannot replicate with either XMLSpy os Stylus Studio.
Here follow the schemas that are used, and the offending XML :
envelope-consult.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" targetNamespace="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="EORI-CONSULT-ENVELOPE-1.0">
     <xs:annotation>
          <xs:documentation>
               This XML schema can be used by a national application to
               validate consultation envelopes sent to the EORI
               CDCO application. It can also be used to validate
               consultation responses and acknowledgement envelopes
               sent back by the EORI CDCO application. The number of
               transactions in an envelope is 5.
               For a request envelope, each transaction
               contains a single app.message.
               For a response envelope, each transaction contains
               a single status element and a single app.message
               element.
          </xs:documentation>
     </xs:annotation>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
     <xs:element name="envelope">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="header" type="Header" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="transaction" type="Transaction" maxOccurs="5"/>
               </xs:sequence>
               <xs:attribute name="id" type="xs:string" use="required"/>
               <xs:attribute ref="xml:lang" default="en-GB"/>
          </xs:complexType>
     </xs:element>
     <xs:complexType name="AppMessage">
          <xs:sequence>
               <xs:element ref="abstract.message"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:string" use="required"/>
     </xs:complexType>
     <xs:complexType name="Binary">
          <xs:simpleContent>
               <xs:extension base="xs:base64Binary">
                    <xs:attribute name="mime.type" type="xs:string" default="application/octet-stream"/>
               </xs:extension>
          </xs:simpleContent>
     </xs:complexType>
     <xs:complexType name="BusinessRef">
          <xs:sequence>
               <xs:element ref="abstract.ref"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="Header">
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="value" type="xs:string" use="required"/>
     </xs:complexType>
     <xs:complexType name="MMIMessageType">
          <xs:simpleContent>
               <xs:extension base="xs:string">
                    <xs:attribute ref="xml:lang" default="en-GB"/>
               </xs:extension>
          </xs:simpleContent>
     </xs:complexType>
     <xs:complexType name="Status">
          <xs:sequence>
               <xs:element name="mmi.message" type="MMIMessageType" minOccurs="0"/>
               <xs:element name="status.detail" type="StatusDetail" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="category" type="StatusCategory" use="required"/>
          <xs:attribute name="location" type="xs:string" use="required"/>
     </xs:complexType>
     <xs:simpleType name="StatusCategory">
          <xs:restriction base="xs:string">
               <xs:enumeration value="ok"/>
               <xs:enumeration value="error"/>
               <xs:enumeration value="rejected"/>
               <xs:enumeration value="warning"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:complexType name="StatusDetail">
          <xs:sequence>
               <xs:element name="business.ref" type="BusinessRef" minOccurs="0"/>
               <xs:element name="binary" type="Binary" minOccurs="0"/>
               <xs:element name="mmi.message" type="MMIMessageType" minOccurs="0"/>
          </xs:sequence>
          <xs:attribute name="category" type="StatusDetailCategory" use="required"/>
          <xs:attribute name="location" type="xs:string" use="required"/>
          <xs:attribute name="code" type="xs:NMTOKEN" use="required"/>
     </xs:complexType>
     <xs:simpleType name="StatusDetailCategory">
          <xs:restriction base="xs:string">
               <xs:enumeration value="error"/>
               <xs:enumeration value="info"/>
               <xs:enumeration value="warning"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:complexType name="Transaction">
          <xs:sequence>
               <xs:element name="header" type="Header" minOccurs="0" maxOccurs="unbounded"/>
               <xs:element name="status" type="Status" minOccurs="0"/>
               <xs:element name="app.message" type="AppMessage"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:string" use="required"/>
     </xs:complexType>
     <xs:element name="abstract.message" abstract="true"/>
     <xs:element name="abstract.ref" abstract="true"/>
</xs:schema>EORI-consult.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:envelope="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" targetNamespace="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
     <xs:annotation>
          <xs:documentation>
               This XML schema contains the definitions of data
               elements and messages specific to the EORI consult
               functionality.
          </xs:documentation>
     </xs:annotation>
     <xs:import namespace="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" schemaLocation="envelope-consult.xsd"/>
     <xs:include schemaLocation="EORI-data.xsd"/>
     <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
     <!-- Base types -->
  <xs:simpleType name="Date">
          <xs:annotation>
               <xs:documentation>Date format</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
               <xs:pattern value="\d{4}\d{2}\d{2}"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:complexType name="EoriRecord">
          <xs:sequence>
               <xs:element name="eori.record.ref" type="EoriNumberRef"/>
               <xs:element name="tc.number.list" type="TcNumberList"/>
               <xs:element name="economic.operator.details" type="EconomicOperatorDetails"/>
               <xs:element name="legal.status.list" type="LegalStatusPeriodList"/>
               <xs:element name="establishment.address.list" type="EstablishmentAddressPeriodList"/>
               <xs:element name="vat.list" type="VatList"/>
               <xs:element name="contact.list" type="ContactPeriodList"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="EconomicOperatorDetails">
          <xs:sequence>
               <xs:element name="full.name" type="EOFullName"/>
               <xs:element name="short.name" type="EOShortName"/>
               <xs:element name="establishment.date" type="Date" minOccurs="0"/>
               <xs:element name="person.type.code" type="TypePerson" minOccurs="0"/>
               <xs:element name="economic.activity.code" type="ActivityCode" minOccurs="0"/>
               <xs:element name="start.date" type="Date"/>
               <xs:element name="expiry.date" type="Date" minOccurs="0"/>
               <xs:element name="publication.ind" type="xs:boolean" minOccurs="0"/>
          </xs:sequence>
     </xs:complexType>     
  <xs:complexType name="ValidityPeriod">
          <xs:sequence>
               <xs:element name="start.date" type="Date"/>
               <xs:element name="end.date" type="Date" minOccurs="0"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="ContactPeriod">
          <xs:sequence>
               <xs:element name="contact" type="Contact"/>
               <xs:element name="validity.period" type="ValidityPeriod"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="ContactPeriodList">
          <xs:sequence>
               <xs:element name="contact" type="ContactPeriod" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>          
     </xs:complexType>
     <xs:complexType name="EstablishmentAddressPeriod">
          <xs:sequence>
               <xs:element name="establishment.address" type="EstablishmentAddress"/>
               <xs:element name="validity.period" type="ValidityPeriod"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="EstablishmentAddressPeriodList">
          <xs:sequence>
               <xs:element name="establishment.address" type="EstablishmentAddressPeriod" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="LegalStatusPeriod">
          <xs:sequence>
               <xs:element name="legal.status" type="LegalStatus"/>
               <xs:element name="validity.period" type="ValidityPeriod"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="LegalStatusPeriodList">
          <xs:sequence>
               <xs:element name="legal.status" type="LegalStatusPeriod" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="EoriRecordFull">
          <xs:complexContent>
               <xs:extension base="EoriRecord">
                    <xs:sequence>
                         <xs:element name="aeo.certificate.lifecycle.list" type="AeoCertificateLifecycleList" minOccurs="0"/>
                    </xs:sequence>
               </xs:extension>
          </xs:complexContent>
     </xs:complexType>
     <xs:complexType name="AeoCertificateLifecycleList">
          <xs:sequence>
               <xs:element name="aeo.certificate.lifecycle" type="AeoCertificateLifecycle" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>     
     <xs:complexType name="AeoCertificateLifecycle">
          <xs:sequence>
               <xs:element name="start.date" type="Date"/>
               <xs:element name="end.date" type="Date" minOccurs="0"/>
               <xs:element name="aeo.certificate.ref" type="AeoCertificateNumber" minOccurs="0"/>
          </xs:sequence>
     </xs:complexType>          
     <!-- Consultation messages -->
     <xs:element name="eori.record.snapshot.consultation.request" substitutionGroup="envelope:abstract.message">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="snapshot.request.list" type="EoriRecordSnapshotRequestList"/>
               </xs:sequence>
            <xs:attribute ref="xml:lang" default="en-GB"/>                              
          </xs:complexType>
     </xs:element>
     <xs:element name="eori.record.full.consultation.request" substitutionGroup="envelope:abstract.message">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="full.request.list" type="EoriRecordFullRequestList"/>
               </xs:sequence>
               <xs:attribute ref="xml:lang" default="en-GB"/>               
          </xs:complexType>
     </xs:element>
     <xs:element name="eori.record.snapshot.consultation.response" substitutionGroup="envelope:abstract.message">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="snapshot.response.list" type="EoriRecordSnapshotResponseList"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="eori.record.full.consultation.response" substitutionGroup="envelope:abstract.message">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="full.response.list" type="EoriRecordFullResponseList"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <!-- Acknowledgement business references -->
     <xs:element name="full.request" type="EoriRecordFullRequest" substitutionGroup="envelope:abstract.ref"/>
     <xs:element name="snapshot.request" type="EoriRecordSnapshotRequest" substitutionGroup="envelope:abstract.ref"/>
     <!-- Snapshot: Consultation messages -->
     <xs:complexType name="SnapshotConsultationRequest">
          <xs:sequence>
               <xs:element name="snapshot.request.list" type="EoriRecordSnapshotRequestList"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="SnapshotConsultationResponse">
          <xs:sequence>
               <xs:element name="snapshot.response.list" type="EoriRecordSnapshotResponseList"/>
          </xs:sequence>
     </xs:complexType>
     <!-- Full: Consultation messages -->
     <xs:complexType name="FullConsultationRequest">
          <xs:sequence>
               <xs:element name="full.request.list" type="EoriRecordFullRequestList"/>                              
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="FullConsultationResponse">
          <xs:sequence>
               <xs:element name="full.response.list" type="EoriRecordFullResponseList"/>
          </xs:sequence>
     </xs:complexType>
     <!-- Snapshot: Message structures -->
     <xs:complexType name="EoriRecordSnapshot">
          <xs:sequence>
               <xs:element name="eori.record.ref" type="EoriNumberRef"/>
               <xs:element name="tc.number.list" type="TcNumberList" minOccurs="0"/>
               <xs:element name="economic.operator.details" type="EconomicOperatorDetails"/>
               <xs:element name="legal.status" type="LegalStatus" minOccurs="0"/>
               <xs:element name="establishment.address" type="EstablishmentAddress"/>
               <xs:element name="vat.list" type="VatList" minOccurs="0"/>
               <xs:element name="contact" type="Contact" minOccurs="0"/>
               <xs:element name="aeo.certificate.ref" type="AeoCertificateNumber" minOccurs="0"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordSnapshotRequestList">
          <xs:sequence>
               <xs:element name="snapshot.request" type="EoriRecordSnapshotRequest" maxOccurs="20"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordSnapshotRequest">
          <xs:sequence>
               <xs:element name="eori.record.ref" type="EoriNumberRef"/>
               <xs:element name="applicable.date" type="Date"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordFullRequestList">
          <xs:sequence>
               <xs:element name="full.request" type="EoriRecordFullRequest" maxOccurs="20"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordFullRequest">
          <xs:sequence>
               <xs:element name="eori.record.ref" type="EoriNumberRef"/>
               <xs:element name="consultation.purpose.code" type="ConsultationPurpose" minOccurs="0"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordSnapshotResponseList">
          <xs:sequence>
               <xs:element name="snapshot.response" type="EoriRecordSnapshotResponse" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordSnapshotResponse">
          <xs:sequence>
               <xs:element name="eori.record.snapshot" type="EoriRecordSnapshot"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordFullResponseList">
          <xs:sequence>
               <xs:element name="full.response" type="EoriRecordFullResponse" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EoriRecordFullResponse">
          <xs:sequence>
               <xs:element name="eori.record.full" type="EoriRecordFull"/>
          </xs:sequence>
     </xs:complexType>
</xs:schema>EORI-data.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
     <xs:annotation>
          <xs:documentation>
               This XML schema contains the definitions of data
               elements common to the messages exchanged in the
               EORI download, upload and consultation
               functionalities.
          </xs:documentation>
     </xs:annotation>
     <!-- List types -->
     <xs:complexType name="CountryList">
          <xs:sequence>
               <xs:element name="country" type="Country" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="LegalStatusList">
          <xs:sequence>
               <xs:element name="legal.status" type="LegalStatus" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="TcNumberList">
          <xs:sequence>
               <xs:element name="tc.number" type="TcNumberRef" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="VatList">
          <xs:sequence>
               <xs:element name="vat" type="Vat" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="CertificateInfoList">
          <xs:sequence>
               <xs:element name="certificate.info" type="CertificateInfo" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>          
     </xs:complexType>     
     <xs:complexType name="ApplicationInfoList">
          <xs:sequence>
               <xs:element name="application.info" type="ApplicationInfo" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>          
     </xs:complexType>     
     <!-- Complex types -->
     <xs:complexType name="CertificateInfo">
          <xs:sequence>
               <xs:element name="aeo.certificate.ref" type="AeoCertificateNumber"/>
          </xs:sequence>          
     </xs:complexType>     
     <xs:complexType name="ApplicationInfo">
          <xs:sequence>
               <xs:element name="aeo.application.ref" type="AeoApplicationNumber"/>
          </xs:sequence>          
     </xs:complexType>     
     <xs:complexType name="AeoCertificateNumber">
          <xs:sequence>
               <xs:element name="country.code" type="CountryCode"/>
               <xs:element name="aeo.certificate.type.code" type="AeoCertificateTypeCode"/>
               <xs:element name="national.number" type="NationalAuthorisationNumber"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="AeoApplicationNumber">
    <xs:sequence>
      <xs:element name="country.code" type="CountryCode"/>
      <xs:element name="national.number" type="ApplicationNumber"/>
    </xs:sequence>
  </xs:complexType>
     <xs:complexType name="Contact">
          <xs:sequence>
               <xs:element name="phone" type="PhoneNumber" minOccurs="0"/>
               <xs:element name="fax" type="PhoneNumber" minOccurs="0"/>
               <xs:element name="email" type="Email" minOccurs="0"/>
               <xs:element name="name.address" type="NameAddress"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="Country">
          <xs:choice>
               <xs:element name="country.code" type="CountryCode"/>
               <xs:element name="country.name" type="CountryName"/>
          </xs:choice>
     </xs:complexType>
     <xs:complexType name="EoriNumberRef">
          <xs:sequence>
               <xs:element name="country.code" type="CountryCode"/>
               <xs:element name="national.number" type="EoNationalNumber"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="TcNumberRef">
          <xs:sequence>
               <xs:element name="country" type="Country"/>
               <xs:element name="national.number" type="TcNationalNumber"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="EstablishmentAddress">
          <xs:sequence>
               <xs:element name="language.code" type="LanguageCode"/>
               <xs:element name="name" type="Name" minOccurs="0"/>
               <xs:element name="street" type="Street"/>
               <xs:element name="postcode" type="Postcode" minOccurs="0"/>
               <xs:element name="city" type="City"/>
               <xs:element name="country" type="Country"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="LegalStatus">
          <xs:sequence>
               <xs:element name="language.code" type="LanguageCode"/>
               <xs:element name="legal.status.description" type="LegalStatusDescription"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="NameAddress">
          <xs:sequence>
               <xs:element name="language.code" type="LanguageCode"/>
               <xs:element name="full.name" type="FullName"/>
               <xs:element name="short.name" type="Name" minOccurs="0"/>
               <xs:element name="street" type="Street"/>
               <xs:element name="postcode" type="Postcode" minOccurs="0"/>
               <xs:element name="city" type="City"/>
               <xs:element name="country" type="Country"/>
          </xs:sequence>
     </xs:complexType>
     <xs:complexType name="Vat">
          <xs:sequence>
               <xs:element name="country.code" type="CountryCode"/>
               <xs:element name="number" type="VATNationalNumber"/>
          </xs:sequence>
     </xs:complexType>
     <!-- Simple types -->
     <xs:simpleType name="Accepted">
          <xs:restriction base="xs:int">
               <xs:pattern value="0|1"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="ActivityCode">
          <xs:restriction base="SingleLineString">
      <xs:length value="4"/>
      <xs:pattern value="[0-9]+"/>   
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="NationalAuthorisationNumber">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="29"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="AeoCertificateTypeCode">
          <xs:restriction base="SingleLineString">
               <xs:length value="4"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="ApplicationNumber">
         <xs:restriction base="SingleLineString">
           <xs:minLength value="1"/>
           <xs:maxLength value="29"/>
         </xs:restriction>
       </xs:simpleType>
     <xs:simpleType name="City">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="35"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="ConsultationPurpose">
          <xs:restriction base="xs:string">
               <xs:length value="1"/>
               <xs:enumeration value="C"/>
               <xs:enumeration value="Q"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="CountryCode">
          <xs:annotation>
               <xs:documentation>
                    Country code format
               </xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
               <xs:pattern value="[A-Z][A-Z]"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="CountryName">
          <xs:annotation>
               <xs:documentation>Country name</xs:documentation>
          </xs:annotation>
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="30"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="Email">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="70"/>
               <xs:pattern value="\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="EoNationalNumber">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="15"/>
               <xs:pattern value="\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="TcNationalNumber">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="15"/>
               <xs:pattern value="\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="LanguageCode">
          <xs:annotation>
               <xs:documentation>
                    Language code format
               </xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
               <xs:pattern value="[a-z][a-z]"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="LegalStatusDescription">
          <xs:annotation>
               <xs:documentation>
                    Legal status value
               </xs:documentation>
          </xs:annotation>
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="50"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="EOFullName">
          <xs:restriction base="xs:string">
               <xs:minLength value="1"/>
               <xs:maxLength value="300"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="EOShortName">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="35"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="PhoneNumber">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="2"/>
               <xs:maxLength value="35"/>
               <xs:pattern value="\+\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="Postcode">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="9"/>
               <xs:pattern value="\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="SingleLineString">
          <xs:annotation>
               <xs:documentation>
                    Single line string: Avoid presence of \n (new
                    line) and \r (return) characters in the string.
                    Note that pattern ".*" is equivalent.
               </xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:string">
               <xs:pattern value="[^\n\r]*"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="FullName">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="100"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="Name">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="35"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="Street">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="35"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="TypePerson">
          <xs:annotation>
               <xs:documentation>
                    Type of person values as follows: 1-Natural
                    person, 2-Legal person and 3-Association of
                    persons. Values can be updated and retrieved by the CS/RD.
               </xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:unsignedInt">
               <xs:totalDigits value="1"/>
          </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="VATNationalNumber">
          <xs:restriction base="SingleLineString">
               <xs:minLength value="1"/>
               <xs:maxLength value="15"/>
               <xs:pattern value="\p{IsBasicLatin}+"/>
          </xs:restriction>
     </xs:simpleType>
</xs:schema>xml.xsd
<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
<xs:attribute name="lang" type="xs:language"/>
<xs:attribute name="space" default="preserve">
  <xs:simpleType>
   <xs:restriction base="xs:NCName">
    <xs:enumeration value="default"/>
    <xs:enumeration value="preserve"/>
   </xs:restriction>
  </xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI"/>
<xs:attributeGroup name="specialAttrs">
  <xs:attribute ref="xml:base"/>
  <xs:attribute ref="xml:lang"/>
  <xs:attribute ref="xml:space"/>
</xs:attributeGroup>
</xs:schema>(second part follows...)

(continuing from above post ...)
TestXML.xml
<?xml version="1.0" encoding="utf-8"?>
<env:envelope id="5555" xmlns="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" xmlns:env="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:header name="Version" value="1.0"/>
  <env:header name="From" value="EOS-CDCO"/>
  <env:header name="Originator" value="BE-EORI"/>
  <env:header name="InReplyTo" value="5554"/>
  <env:transaction id="1">
    <env:header name="InReplyTo" value="1"/>
    <env:status category="ok" location="/envelope[@id=&apos;5554&apos;]/transaction[@id=&apos;1&apos;]">
      <env:status.detail category="info" code="100" location="/envelope[@id=&apos;5554&apos;]/transaction[@id=&apos;1&apos;]/app.message[@id=&apos;1&apos;]">
        <env:business.ref>
          <full.request>
            <eori.record.ref>
              <country.code>BE</country.code>
              <national.number>123</national.number>
            </eori.record.ref>
            <consultation.purpose.code>C</consultation.purpose.code>
          </full.request>
        </env:business.ref>
        <env:mmi.message>Ok</env:mmi.message>
      </env:status.detail>
    </env:status>
    <env:app.message id="1">
      <eori.record.full.consultation.response>
        <full.response.list>
          <full.response>
            <eori.record.full>
              <eori.record.ref>
                <country.code>FR</country.code>
                <national.number>123</national.number>
              </eori.record.ref>
              <tc.number.list>
                <tc.number>
                  <country>
                    <country.code>AA</country.code>
                  </country>
                  <national.number>465466</national.number>
                </tc.number>
              </tc.number.list>
              <economic.operator.details>
                <full.name>a</full.name>
                <short.name>a</short.name>
                <establishment.date>19670813</establishment.date>
                <person.type.code>1</person.type.code>
                <economic.activity.code>1234</economic.activity.code>
                <start.date>19670813</start.date>
                <expiry.date>19670813</expiry.date>
                <publication.ind>0</publication.ind>
              </economic.operator.details>
              <legal.status.list>
                <legal.status>
                  <legal.status>
                    <language.code>aa</language.code>
                    <legal.status.description>status</legal.status.description>
                  </legal.status>
                  <validity.period>
                    <start.date>19670813</start.date>
                    <end.date>19670813</end.date>
                  </validity.period>
                </legal.status>
              </legal.status.list>
              <establishment.address.list>
                <establishment.address>
                  <establishment.address>
                    <language.code>aa</language.code>
                    <name>a</name>
                    <street>s</street>
                    <postcode>p</postcode>
                    <city>c</city>
                    <country>
                      <country.code>AA</country.code>
                    </country>
                  </establishment.address>
                  <validity.period>
                    <start.date>19670813</start.date>
                    <end.date>19670813</end.date>
                  </validity.period>
                </establishment.address>
              </establishment.address.list>
              <vat.list>
                <vat>
                  <country.code>AA</country.code>
                  <number>74455</number>
                </vat>
              </vat.list>
              <contact.list>
                <contact>
                  <contact>
                    <phone>+ 123</phone>
                    <fax>+ 123</fax>
                    <name.address>
                      <language.code>aa</language.code>
                      <full.name>a</full.name>
                      <short.name>a</short.name>
                      <street>s</street>
                      <postcode>p</postcode>
                      <city>c</city>
                      <country>
                        <country.code>AA</country.code>
                      </country>
                    </name.address>
                  </contact>
                  <validity.period>
                    <start.date>19670813</start.date>
                    <end.date>19670813</end.date>
                  </validity.period>
                </contact>
              </contact.list>
              <aeo.certificate.lifecycle.list>
                <aeo.certificate.lifecycle>
                  <start.date>19670813</start.date>
                  <end.date>19670813</end.date>
                </aeo.certificate.lifecycle>
              </aeo.certificate.lifecycle.list>
            </eori.record.full>
          </full.response>
        </full.response.list>
      </eori.record.full.consultation.response>
    </env:app.message>
  </env:transaction>
</env:envelope>Here is the script that created the table and registered the schemas
BEGIN     
   DBMS_XMLSCHEMA.REGISTERSCHEMA(
     SCHEMAURL => 'envelope-consult.xsd',
     SCHEMADOC => XDBURITYPE('/public/xsdfiles/EORI/envelope-consult.xsd').getBlob(),
     LOCAL     => TRUE,
     GENTYPES  => FALSE,
     GENBEAN   => FALSE,
     GENTABLES => FALSE,
     FORCE     => FALSE,
     CSID      => NLS_CHARSET_ID('AL32UTF8'),
     OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
END;
BEGIN     
   DBMS_XMLSCHEMA.REGISTERSCHEMA(
     SCHEMAURL => 'EORI-consult.xsd',
     SCHEMADOC => XDBURITYPE('/public/xsdfiles/EORI/EORI-consult.xsd').getBlob(),
     LOCAL     => TRUE,
     GENTYPES  => FALSE,
     GENBEAN   => FALSE,
     GENTABLES => FALSE,
     FORCE     => FALSE,
     CSID      => NLS_CHARSET_ID('AL32UTF8'),
     OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
END;
CREATE TABLE TEST_XML_TABLE
  ENV_CONSULT  SYS.XMLTYPE,
  MSG_TSTAMP   TIMESTAMP(6) WITH TIME ZONE      DEFAULT SYSTIMESTAMP          NOT NULL
XMLTYPE COLUMN ENV_CONSULT STORE AS SECUREFILE BINARY XML
(       TABLESPACE PARTYMS10_DATA
  INDEX(TABLESPACE PARTYMS10_INDEX)
XMLSCHEMA "envelope-consult.xsd" ELEMENT "envelope"
   DISALLOW NONSCHEMA
TABLESPACE PARTYMS10_DATA
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING
/And here is the offending statement, together with the reported error
INSERT
  INTO TEST_XML_TABLE
VALUES (XDBURITYPE('/public/xmlfiles/EORI/TestXML.xml').getXML(), SYSTIMESTAMP)
COMMIT
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LSX-00213: only 0 occurrences of particle "abstract.ref", minimum is 1
Details:
INSERT
  INTO TEST_XML_TABLE
VALUES (XDBURITYPE('/public/xmlfiles/EORI/TestXML.xml').getXML(), SYSTIMESTAMP)
Error at line 1
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LSX-00213: only 0 occurrences of particle "abstract.ref", minimum is 1I am using 11.1.0.7.0, as seen on
select * from v$version;
BANNER                                                                         
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production         
PL/SQL Release 11.1.0.7.0 - Production                                         
CORE   11.1.0.7.0   Production                                                     
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production                        
NLSRTL Version 11.1.0.7.0 - Production                                         
5 rows selected.Any ideas ? I cannot understand it at all... It seems to relate to the substitutionGroup entries in general, but I can't for the life of me see why :(
Best Regards
Philip

Similar Messages

  • Getting "ORA-31011: XML parsing failed" using xmlAGG as rownum exceeds 1000

    I have a following script which is working and creating xml output when the rownum < 1000, but as the rownum <2000 clause is used, it is throwing "ORA-31011: XML parsing failed" error.
    There are about 2 million recirds that I need to extract in the xml file. Is there any way I can do that without creating 500 files?
    I am new in XML DB and any help/suggestion/input will be highly appreciated.
    Thanks.
    ---------------- script--------------------
    SET SERVEROUTPUT ON
    DECLARE
    v_xml              XMLTYPE;
    v_blob             BLOB;
    v_data_length      NUMBER;
    -- Loop Control Variables
    v_offset           NUMBER             DEFAULT 1;
    v_chunk   CONSTANT NUMBER             DEFAULT 4000;
    -- v_ctx   DBMS_XMLGen.ctxHandle;
    v_file  Utl_File.File_Type;
    BEGIN
    -- Create XML context.
        SELECT XMLELEMENT("COMBO_NETWORK", XMLAGG (IFC_BILL_LOC))
        INTO v_xml
        FROM (
        SELECT XMLELEMENT
            ("CLAIM",
             XMLFOREST(
            ib.clm_num as "CLM_NUM",
            NVL(ib.old_clm_num,' ') as "ALT_CLM_NUM",
            DECODE(ib.clm_stat_cde,1,'OPEN','CLOSED') as "CLM_STATUS",
            ib.SSN as "SSN",
            ib.CLMT_LAST_NAM as "LAST_NAME",
            ib.CLMT_FIRST_NAM as "FIRST_NAME",
            TO_CHAR(ib.CLMT_DOB,'RRRRMMDD') as "DOB",
            TO_CHAR(ib.CLMT_DOI,'RRRRMMDD') as "DOI",
            ib.ER_NAM as "EMPLOYER_NAME",
            sflo.cde  AS "DISTRICT_OFFICE",
            ib.ADD_UPDTE_DEL_FLG as "ADD_UPDATE_DELETE",
            XMLFOREST(ib.CLMT_FST_LINE_ADR||' '||ib.CLMT_SND_LINE_ADR  as "STREET",
                      ib.CLMT_CITY_ADR AS "CITY",
                      ib.CLMT_STATE_ADR as "STATE",
                      ib.CLMT_ZIP_CDE_ADR as "ZIP",
                      ' ' as "PHONE" ) AS "CLAIMNT_ADDRESS",
            DECODE(ib.CLMT_GENDER,1,'M',2,'F',' ') as "CLAIMNT_GENDER",
            XMLFOREST(ib.ADJ_LAST_NAM as "LAST_NAME",
                      ib.ADJ_FIRST_NAM as "FIRST_NAME",
                      au.PHONE_NUM as "PHONE",
                      au.USER_EMAIL as "EMAIL") as "ADJUSTER",
            NVL(ib.CATASTROPHE_FLG,'N') as "CATASTROPHE_FLAG"
        IFC_BILL_LOC
        FROM IFACE_BILL_CLAIM_TRANS ib, SCIF_LOCATIONS sflo, APPLICATION_USERS au
        WHERE ib.comb_transmit_dte IS NULL
        AND ib.SFLO_IDN = sflo.idn
        AND ib.adj_last_nam = UPPER(au.user_last_nam)
        AND ib.adj_first_nam = UPPER(au.user_first_nam)
        AND sflo.cde = 'NF'
        AND rownum < 1000);  -- Failes parsing as rownum < 2000 is used.
        -- Turn the XML into a BLOB
         v_blob := v_xml.getblobval (1);
         v_data_length := DBMS_LOB.getlength (v_blob);
        -- Output XML document to file.
          v_file := Utl_File.FOpen('/u08/test/testdev/interface/out', 'result1.xml', 'wb', v_chunk);
                LOOP
                EXIT WHEN v_offset > v_data_length;
                UTL_FILE.put_raw (v_file, DBMS_LOB.SUBSTR (v_blob, v_chunk, v_offset),
                                                                  TRUE);
                 v_offset := v_offset + v_chunk;
                END LOOP;
                    Utl_File.FClose(v_file);
            EXCEPTION
              WHEN NO_DATA_FOUND
              THEN
              -- We won't write any data, or even open the file,
              -- if the query return no rows
              NULL;
              END;
    --------------------- script end--------------------------
    Following is the version of  y database:
    SQL> col comp_name format a45
    SELECT comp_name, status, substr(version,1,10) as version
    FROM dba_registry;
    SQL> SQL>   2
    COMP_NAME                                     STATUS      VERSION
    Oracle Database Catalog Views                VALID       10.2.0.4.0
    Oracle Database Packages and Types       VALID       10.2.0.4.0
    JServer JAVA Virtual Machine                  VALID       10.2.0.4.0
    Oracle Database Java Packages                VALID       10.2.0.4.0
    Oracle XDK                                           VALID       10.2.0.4.0
    Oracle XML Database                              VALID       10.2.0.4.0
    6 rows selected.
    SQL>Edited by: mdrake on Feb 4, 2010 3:55 PM

    If you have the fix for bug 8246403 you can also control the behavoir with events. This avoids having to use explict translate operations on each column thay may contain bad data. Note this patch also has the effect of replacing the ORA-31011 error with the ORA-31061 error. Also note it is likely this error number will be changed again in the near future.
    SQL>       --
    SQL> -- Replace with ?
    SQL> --
    SQL>  alter session set events = '19119 trace name context forever, level 0x100000'
      2  /
    Session altered.
    SQL> select xmlElement
      2         (
      3            "Result",
      4            xmlAgg
      5            (
      6               xmlElement("Data",MY_DATA)
      7            )
      8         )
      9    from T1
    10  /
    XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
    <Result><Data>AAAA</Data><Data>BB?BB</Data><Data>CCCC</Data></Result>
    SQL>       --
    SQL> -- Replace with Character Reference
    SQL> --
    SQL> alter session set events = '19119 trace name context forever, level 0x200000'
      2  /
    Session altered.
    SQL> select xmlElement
      2         (
      3            "Result",
      4            xmlAgg
      5            (
      6               xmlElement("Data",MY_DATA)
      7            )
      8         )
      9    from T1
    10  /
    XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
    <Result><Data>AAAA</Data><Data>BB&#x0000;BB</Data><Data>CCCC</Data></Result>
    SQL>
    SQL>      --
    SQL> -- Remove Bad Characters
    SQL> --
    SQL> alter session set events = '19119 trace name context forever, level 0x400000'
      2  /
    Session altered.
    SQL> select xmlElement
      2         (
      3            "Result",
      4            xmlAgg
      5            (
      6               xmlElement("Data",MY_DATA)
      7            )
      8         )
      9    from T1
    10  /
    XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
    <Result><Data>AAAA</Data><Data>BBBB</Data><Data>CCCC</Data></Result>
    SQL>
    SQL>Edited by: mdrake on Feb 4, 2010 3:45 PM
    Edited by: mdrake on Feb 4, 2010 3:46 PM
    Edited by: mdrake on Feb 4, 2010 3:47 PM

  • Calling Web Service from PL/SQL (ORA-31011: XML parsing failed)

    hi all,
    i want to invoke a web service from PL/SQL.
    i found a soap_api package from "Tim Hall".
    but it gives error in "ealtas.soap_api.invoke function"
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "SYS.XMLTYPE", line 48
    ORA-06512: at "EALTAS.SOAP_API", line 135
    ORA-06512: at line 44
    set scan off;
    declare
    P_ADRES_WS VARCHAR2(100) := 'http://<host>:<port>/dswsbobje/qaawsservices/biws?wsdl=1&cuid=AVhBxL14I2dDjz8yFoznRLY';
    P_ENVELOPE VARCHAR2(32767);
    P_FNC VARCHAR2(256) := 'runQueryAsAService';
    ol_req ealtas.soap_api.t_request;
    ol_resp ealtas.soap_api.t_response;
    message varchar2(500);
    BEGIN
    p_envelope := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
    <soapenv:Body>
    <db:runQueryAsAService>
    <db:login>DWH_BO</db:login>
    <db:password>Pass1234</db:password>
    </db:runQueryAsAService>
    </soapenv:Body>
    </soapenv:Envelope>
    ol_req := ealtas.soap_api.new_request(P_FNC, 'xmlns="'||P_ADRES_WS||'"');
    ol_resp := ealtas.soap_api.invoke(ol_req, P_ADRES_WS, p_fnc,P_ENVELOPE);
    ealtas.soap_api.show_envelope(p_envelope);
    message := ealtas.soap_api.get_return_value(ol_resp, 'Db_Timeid', 'xmlns:m="'||P_ADRES_WS||'"');
    DBMS_OUTPUT.PUT_LINE('AAAA -'||message);
    end;
    thanks.
    ealtas.

    AlexAnd thanks for your help.
    ACL is ok.
    can you help me about how can i edit this function. i tried many times but i could not do it :( .
    web service url : <host>:<port>/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AVhBxL14I2dDjz8yFoznRLY
    what must be these variables values ?
    l_url :=
    l_namespace :=
    l_method :=
    l_soap_action :=
    l_result_name :=
    this is the xml;
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="DB_SUBS_BUDGET" xmlns:tns1="dsws.businessobjects.com" targetNamespace="DB_SUBS_BUDGET" xmlns="http://schemas.xmlsoap.org/wsdl/" name="queryasaservice">
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="DB_SUBS_BUDGET">
    - <s:element name="runQueryAsAService">
    - <s:complexType>
    - <s:sequence>
    <s:element name="login" type="s:string" />
    <s:element name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:complexType name="Row">
    - <s:sequence>
    <s:element name="Db_Timeid" type="s:string" nillable="true" />
    <s:element name="Db_Tariff" type="s:string" nillable="true" />
    <s:element name="Grossadds" type="s:double" nillable="true" />
    <s:element name="Cancellations" type="s:double" nillable="true" />
    <s:element name="Netadds" type="s:double" nillable="true" />
    <s:element name="Subs" type="s:double" nillable="true" />
    <s:element name="Churn_P" type="s:double" nillable="true" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="Table">
    - <s:sequence>
    <s:element name="row" maxOccurs="unbounded" type="s0:Row" />
    </s:sequence>
    </s:complexType>
    - <s:element name="runQueryAsAServiceResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element name="table" type="s0:Table" />
    <s:element name="message" type="s:string" />
    <s:element name="creatorname" type="s:string" />
    <s:element name="creationdate" type="s:dateTime" />
    <s:element name="creationdateformated" type="s:string" />
    <s:element name="description" type="s:string" />
    <s:element name="universe" type="s:string" />
    <s:element name="queryruntime" type="s:int" />
    <s:element name="fetchedrows" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="QaaWSHeader">
    - <s:complexType>
    - <s:sequence>
    <s:element name="sessionID" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    <s:element name="serializedSession" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </types>
    - <message name="runQueryAsAServiceSoapIn">
    <part name="parameters" element="s0:runQueryAsAService" />
    <part name="request_header" element="s0:QaaWSHeader" />
    </message>
    - <message name="runQueryAsAServiceSoapOut">
    <part name="parameters" element="s0:runQueryAsAServiceResponse" />
    </message>
    - <portType name="QueryAsAServiceSoap">
    - <operation name="runQueryAsAService">
    <documentation>Get Web Service Provider server info</documentation>
    <input message="s0:runQueryAsAServiceSoapIn" />
    <output message="s0:runQueryAsAServiceSoapOut" />
    </operation>
    </portType>
    - <binding name="QueryAsAServiceSoap" type="s0:QueryAsAServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="runQueryAsAService">
    <soap:operation soapAction="DB_SUBS_BUDGET/runQueryAsAService" style="document" />
    - <input>
    - <soap:header message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal">
    <soap:headerfault message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal" />
    </soap:header>
    <soap:body use="literal" parts="parameters" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="DB_SUBS_BUDGET">
    <documentation />
    - <port name="QueryAsAServiceSoap" binding="s0:QueryAsAServiceSoap">
    <soap:address location="http://<host>:<port>/dswsbobje/qaawsservices/queryasaservice?&cuid=AVhBxL14I2dDjz8yFoznRLY&authType=secEnterprise&locale=en_US&timeout=60&ConvertAnyType=false" />
    </port>
    </service>
    </definitions>

  • ORA-29024: Certificate validation failure when trying to redirect to https

    Hi, I was trying to redirect the page to another https website using utl_http.request,
    I configured Oracle wallet and import the certificate, and successfully to get the webpage content in sqlplus by
    select utl_http.request('https://<website>,null,<wallet>,<wallet password>) from dual,
    but when I trying to use the same way in a button process of Apex, the error ORA-29024: Certificate validation failure prompt.
    Anyone know what wrong with it?
    Thanks
    Vincent Pek

    Hi, Sorry, I found that after i reboot my laptop , it's working now.

  • ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing

    Hi,
    I am trying to update an already existing Sales Order through PO Change Inbound 860. When i am performing changes in the line quantity and scheduled ship date with operation code as "Update" then it is successfully updating the Order and also we are able to generate the POAck for the updated sales order lines. But when i am rejecting one of the PO change lines by checking rejected flag, then order is getting imported successfully(I mean sales order is getting updated successfully) but during the POAck Generation i.e. 865 its raising "*ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00103: Warning: document structure does not match DTD Error at line 1*" at XML Gateway. we are using XML Gateway to process the orders, can somebody help me to get rid of this issue. Thanks in advance.
    Thanks,
    Sunil Chauhan

    Hi Kishan
    Thanks for the reply.
    Because this is an outbound transaction so i can not provide you the XML file as we are facing issue to generate the same. Also we are using oracle seeded PO outbound Ack map.
    In addition i can provide you the DTD file.
    <!-- ==================================================== -->
    <!ENTITY % RESOURCES SYSTEM "oagis_resources.dtd">
    %RESOURCES;
    <!-- ==================================================== -->
    <!ELEMENT ACKNOWLEDGE_PO_008 (CNTROLAREA, DATAAREA+)>
    <!ATTLIST VERB
         value CDATA #FIXED "ACKNOWLEDGE"
    >
    <!ATTLIST NOUN
         value CDATA #FIXED "PO"
    >
    <!ATTLIST REVISION
         value CDATA #FIXED "008"
    >
    <!ELEMENT DATAAREA (ACKNOWLEDGE_PO)
    >
    <!ELEMENT ACKNOWLEDGE_PO (POORDERHDR, POORDERLIN*)
    >
    <!ELEMENT POORDERHDR ((%DATETIME.DOCUMENT;)?, (%OPERAMT.EXTENDED.T;)?, POID, POTYPE, ACKREQUEST?, CONTRACTB?, CONTRACTS?, DESCRIPTN?, NOTES*, OPRAMTAUTH?, PORELEASE?, TAXWHEXMPT?, USERAREA?, ACKHEADER, ATTCHREF*, CHARGE*, PARTNER*, POTERM*)
    >
    <!ELEMENT ACKHEADER (SENDER, (%DATETIME.PROMDELV;)?, (%DATETIME.PROMSHIP;)?, ACKCODE, DESCRIPTN?, NOTES*, SALESORDID?, USERAREA?)
    >
    <!ELEMENT POTERM (DESCRIPTN?, TERMID?, ((DAYOFMONTH, PROXMONTH) | DAYSNUM), ((%OPERAMT.EXTENDED.T;) | (%QUANTITY.PERCENT;)), USERAREA?)
    >
    <!ELEMENT POORDERLIN ((%QUANTITY.ORDERED;), (%DATETIME.NEEDDELV;)?, (%OPERAMT.UNIT.T;)?, POLINENUM, DRAWING?, HAZRDMATL?, ITEMRV?, ITEMRVX?, NOTES*, PACKING?, POLNSTATUS?, TAXWHEXMPT?, ((DESCRIPTN, ITEM?, ITEMX?, UPC?) | (ITEM, ITEMX?, UPC?) | (ITEMX, UPC?) | (UPC)), USERAREA?, ACKLINE*, ATTCHREF*, CHARGE*, DISTRIBUTN*, PARTNER*, POTERM*, POSUBLINE*, POLINESCHD*)
    >
    <!ELEMENT ACKLINE ((%DATETIME.PROMDELV;)?, (%DATETIME.PROMSHIP;)?, (%QUANTITY.ORDERED;)?, ACKCODE, NOTES*, SALESORDID?, USERAREA?)
    >
    <!ELEMENT POSUBLINE ((%QUANTITY.ITEM;), DRAWING?, ITEMRV?, ITEMRVX?, PSBLINENUM?, ((DESCRIPTN, ITEM?, ITEMX?, UPC?) | (ITEM, ITEMX?, UPC?) | (ITEMX, UPC?) | (UPC)), USERAREA?)>
    <!ELEMENT POLINESCHD ((%DATETIME.NEEDDELV;), (%QUANTITY.ORDERED;), DESCRIPTN?, PSCLINENUM?, USERAREA?)
    >
    Thanks,S
    --Sunil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing L

    Hi There,
    I am trying to load XML data [Given Below] into a table using "Load XML Data" option.
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <ID>13</ID>
    <TYPE_SEQ>8</TYPE_SEQ>
    <TYPE>B749</TYPE>
    <TYPE_DESC>B758</_TYPE_DESC>
    <EFFECTIVE_FROM>2099-01-01</EFFECTIVE_FROM>
    <EFFECTIVE_TO>2099-01-01</EFFECTIVE_TO>
    <CREATED_BY>958344</CREATED_BY>
    <CREATED_ON>2099-01-01</CREATED_ON>
    <UPDATED_BY>172283</UPDATED_BY>
    <UPDATED_ON>2099-01-01</UPDATED_ON>
    </ROW>
    </ROWSET>
    It throws the following error.
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function
    Can any one advice the solution please.
    -Sudheer.

    Hi Sudheer,
    This is caused by the date format you are using. Probably it is not matching with your NLS settings. Check your NLS settings, what the date format is, and use that in the XML.
    Check it with this code:
    SELECT XMLELEMENT("date", sysdate) FROM dual;Make sure, you have your NLS_DATE settings in the same format.
    Check it with:
    SELECT * FROM v$nls_parameters WHERE parameter = 'NLS_DATE_FORMAT'And then make sure it is the same by setting for example:
      ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD';Greetings,
    Rutger

  • [Oracle JDBC Driver][Oracle]ORA-31011: XML parsing failed

    Hi,
    I have got the following error when i tired to upload an XML file in my application. My application will insert the XML file in to Oracle 10g data base table. (Our DB server is Oracle 10g).
    The error is as follows:-
    [BEA][Oracle JDBC Driver][Oracle]ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00004: internal error "MultiChar overflow"
    Error at line 20795
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    The XML file contains more than 90,000 lines in it. Please help.
    Thanks!
    Siva K.

    Is this a specific problem with 10G release? We are using 10.2.0.4.0.
    Using CLOB, We think that this may hit the performance of the application as we are using large XML files.

  • URGENT HELP !!! ORA-31011: XML parsing failed

    Hi,
    Oracle 9.2.0.4
    I've run into
    ORA-31011: XML parsing failed ORA-19202: Error
    occurred in XML processing LPX-00247: invalid
    Document Type Declaration (DTD) Error at line 1
    ORA-06512: at line 15
    during updateXML operation under CLOB resource.
    It seems to me, I can't update created resource
    at all.
    Is anybody knows the workaround ?
    Please, help !!!
    Thanks,
    Viacheslav

    No, it is an html file. For test purpose I've taken
    welcome.html from ORACLE_HOME installation. Here are
    my test:
    declare
    res0 bfile := BFILENAME('TEMPDIR', 'welcome.html');
    res clob;
    Amount INTEGER := 4000;
    b BOOLEAN;
    begin
    Amount:=DBMS_LOB.getlength(res0);
    DBMS_LOB.CREATETEMPORARY(res,TRUE);
    DBMS_LOB.OPEN(res0, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.OPEN(res, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(res, res0,Amount);
    --DBMS_LOB.CLOSE(res0);
    b:=DBMS_XDB.createresource
    ('/MyCONTENT/welcome.html',res);
    commit;
    end;
    declare
    res0 bfile := BFILENAME('TEMPDIR', 'welcome.html');
    clob1 clob;
    amt number := dbms_lob.lobmaxsize;
    src_offset number := 1 ;
    dst_offset number := 1 ;
    lang_ctx number := dbms_lob.default_lang_ctx;
    warning number;
    Amount INTEGER := 4000;
    begin
    Amount:=DBMS_LOB.getlength(res0);
    DBMS_LOB.CREATETEMPORARY(clob1 ,TRUE);
    DBMS_LOB.OPEN(res0, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.OPEN(clob1 , DBMS_LOB.LOB_READWRITE);
    -- DBMS_LOB.LOADFROMFILE(clob1 , res0,Amount);
    dbms_lob.LOADCLOBFROMFILE(clob1 ,res0, amt, dst_offset,
    src_offset,dbms_lob.default_csid, lang_ctx,warning) ;
    UPDATE xdb.resource_view SET res=updatexml
    (res,'/Resource/Contents/*',
    WHERE any_path= '/MyCONTENT/welcome.html';
    commit;
    --dbms_lob.filecloseall() ;
    end;

  • ORA-31011: XML parsing failed

    Hi
    I am on client version 9.2.0.4 and try to test the following query
    select XMLELEMENT("DATE", sysdate) from dual;
    I am getting the error ORA-31011:XML parsing failed
    Can anybody suggest a solution?
    Thanks for your reply in advance
    Murali

    Murali ,
    you have mentioned about the client version but what is the server version to which
    you are connected ? Pls checkout that. it should be 9.2.0.4 and above.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> select XMLELEMENT("DATE", sysdate) from dual;
    XMLELEMENT("DATE",SYSDATE)()
    XMLTYPE()
    SQL> ed
    Wrote file afiedt.buf
      1* select XMLELEMENT("DATE", sysdate).GetStringVal() from dual
    SQL> /
    XMLELEMENT("DATE",SYSDATE).GETSTRINGVAL()
    <DATE>05-SEP-05</DATE>
    SQL> Since my client version is 9.0.1.3.0 i have to use GetStringVal() method to extract the contents.

  • XMLElement cause ORA-31011: XML parsing failed

    Hi,
    already simple examples,
    e.g. like descibed in tech articles 'SQL in,XML out',
    cause always error 31011.
    What is wrong?
    Is something missing in my installation?
    Worng version?
    SQL> select xmlelement("KUNDEID",KUNDEID) from DSL_KUNDE;
    ERROR:
    ORA-31011: XML parsing failed
    But normal SQL works fine and data is available:
    SQL> select kundeid from dsl_kunde;
    KUNDEID
    1
    2
    3
    Here is the SQL*Plus login message
    SQL*Plus: Release 9.2.0.1.0 - Production on Mi Nov 12 17:14:42 2003
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • Character set Conversion (US7ASCII to AL32UTF8) -- ORA-31011 problem

    Hello,
    We've run into some problems as part of our character set conversion from US7ASCII to AL32UTF8. The latest problem is that we have a query that works in US7ASCII, but after converting to AL32UTF8 it no longer works and generates an ORA-31011 error. This is very concerning to us as this error indicates an XML parsing problem and we are doing no XML whatsoever in our DB. We do not have XML columns (nor even CLOBs or BLOBs) nor XML tables and it's not XMLDB.
    For reference, we're running 11.2.0.2.0 over Solaris.
    Has anyone seen this kind of problem before?
    If need be, I'll find a way to post table definitions. However, it's safe to assume that we are only using DATE, VARCHAR2 and NUMBER column types in these tables. All of the tables are local to the DB.
    Thanks

    We converted using the database using scripts I developed. I'm not quite sure how we converted is relevant, other than saying that we did not use the Oracle conversion utility (not csscan, but the GUI Java tool).
    A summary:
    1) We replaced the lossy characters by parsing a csscan output file
    2) After re-scanning with csscan and coming up clean, our DBA converted the database to AL32UTF8 (changed the parameter file, changing the character set, switched the semantics to char, etc).
    3) Final step was changing existing tables to use char semantics by changing the table schema for VARCHAR2 columns
    Any specific steps I cannot easily answer, I worked with a DBA at our company to do this work. I handled the character replacement / DDL changes and the DBA ran csscan & performed the database config changes.
    Our actual error message:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '<' instead of '�Error at line 1
    31011. 00000 - "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    Error at Line: 24 Column: 15
    This seems to match the the document ID referenced below. I will ask our DBA to pull it up and review it.
    Please advise if more information is needed from my end.

  • Trying to understand a WS-I validation failure

    I'm trying to understand the following WS-I validation failure message. I'm sure I'm making a basic mistake but I can't find an example of the use case where an xsd is imported. Can someone point out my error?
    Thanks,
    Bret
    Validation failure:
    Result failed:
    Failure Message: A QName reference that is referring to a schema component, uses a namespace not defined in the targetNamespace attribute on the xs:schema element, or in the namespace attribute on an xs:import element within the xs:schema element.Failure Detail Message:
    {http://Messages.xsd}SigReplyMessage,
    {http://schemas.xmlsoap.org/wsdl/}string,
    {http://Messages.xsd}SigRequestMessage
    Element Location: lineNumber=8
    My wsdl looks like this:
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="../../XSDDocument/Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" type="messages:SigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" type="messages:SigRequestMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="sigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <message name="SigFault">
    <part name="faultMessage" element="string"/>
    </message>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </input>
    <output>
    <soap:body use="literal" parts="Signature"/>
    </output>
    <fault name="sigFault">
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Messages.xsd looks like this:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.bret.org/S3test/Messages"
    targetNamespace="http://www.bret.org/S3test/Messages"
    elementFormDefault="qualified">
    <xsd:complexType name="sigRequestMessage">
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="sigReplyMessage">
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

    Hi Bret,
    Sorry it's taken me a bit of time to respond, but please find below a run-down of the WS-I related problems I spotted in your WSDL document. The first few are related to the import error you saw, and there's a few others that I'll also discuss. Apologies in advance if you've already spotted and corrected those.
    I'll use line numbering based on the formatting of the WSDL and XSD that you supplied.
    BP2417 (the one you asked about)
    The line number in the error is a red herring. There are two problems here:
    - WSDL document, line 29: You're using the XSD type string unqualified - it should be xsd:string.
    - WSDL document, lines 8 and 13; schema, lines 3 and 4: The namespaces you're using don't match. Either change the namespaces in the schema to be http://Messages.xsd, or change the namespaces in the WSDL to http://www.bret.org/S3test/Messages.
    BP2202
    You should declare UTF-8 or UTF-16 encoding when creating WSDL or schema documents. The easiest way to do this is to go to Tools|Preferences, and set JDeveloper's default encoding to either UTF-8 or UTF-16.
    BP2032
    WSDL document, line 26 and 43: The name attribute of the fault should read SigFault, not sigFault, as WSDL is case-sensitive.
    WSDL document, line 44: You should use a soap:fault element, not a soap:body element, to bind a fault, thus:
    <soap:fault name="SigFault" use="literal"/>
    BP2012
    WSDL document, lines 17 and 20: Message parts in a document-bound service like this one should reference XSD elements and not complexTypes. What you need to do is define two elements in your messages schema whose types are SigReplyMessage and SigRequestMessage respectively, and then reference those elements from the WSDL.
    WSDL document, line 38: The value of the parts attribute should be Keys to match the name of the part child of the RequestSignature.
    WSDL document, line 41: The value of the parts attribute should be SigAndExp to match the name of the part child of the ReturnSignature.
    WSDL document, line 44: The value of the parts attribute should be faultMessage to match the name of the part child of the SigFault.
    BP2115
    WSDL document, lines 17 and 20: The names of the elements should be sigReplyMessage and sigRequestMessage and not SigReplyMessage and SigRequestMessage, again because WSDL is case-sensitive.
    WSDL document, line 30: The element attribute of the part references xsd:string, which is not an element but a complexType. You'll need to add an element declaration to your schema, which is of type xsd:string.
    I've included corrected versions of your WSDL and schema below, I hope this helps. I also note you've posted a few other messages related to WS-I and WSDL, I hope I've managed to cover those in this message too.
    Regards,
    Alan.
    WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" element="messages:sigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" element="messages:sigRequestMessage"/>
    </message>
    <message name="SigFault">
    <part name="faultMessage" element="messages:faultMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="SigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="Keys"/>
    </input>
    <output>
    <soap:body use="literal" parts="SigAndExp"/>
    </output>
    <fault name="SigFault">
    <soap:fault name="SigFault" use="literal"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Schema:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://Messages.xsd"
    targetNamespace="http://Messages.xsd"
    elementFormDefault="qualified">
    <xsd:element name="sigRequestMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="sigReplyMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="faultMessage" type="xsd:string"/>
    </xsd:schema>

  • Select xmlelement of clob containing non-printable chars gives ORA-31011

    Using sqlplus against Ora9i database. We have some rows where the CLOB column contains non-printable chars because of a conversion from an old system.
    I'm trying to extract this data using xmlselect. Most of the time it works great, but for the above rows it dies with error:
    ORA-31011: XML parsing failed
    If I embed substr(columname,1,25) so that it doesn't get to the non-printable character (which is at about position 200), then the sql works great.
    Any ideas on how to massage this data, either on the fly, or I could do a one-time conversion. The problem is that darn CLOB. I can't even figure out how to find all the bad rows. Looking for sql to find the bad rows, or a function that I could put in a package, and then call from the select to convert it on the fly.
    thanks,
    Rick

    Thanks for your help. Anything I do (including your suggestion) to try and parse the xml bombs with an internal error. Without raising the exception.
    What I decided to do instead is do a search in the clob using instr(column, CHR(13)) but for also all CHR that are less than 32. I then replace it with a space. So I'm going to fix the data once rather than doing an on the fly fix.
    thanks again,
    Rick

  • ORA-31011 error over a "?"

    Hi all. I've got a database table which has a CLOB column and a Sys.XMLType column. In order to store the XML data, I insert the record with an EMPTY_CLOB() value, get a reference to the CLOB (as a java.sql.Clob object). Once I have the Java Clob object (the instance of oracle.sql.CLOB), I write my XML data to it. Once it's in the CLOB, I can update the original record by passing the Clob object in as a parameter to the update statement and SYS.XMLType.createXML(clobValue).
    I have an XML file which is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <CMProduct xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.adc.com/schema/cm/v4.0/CMProd
    uct" xsi:schemaLocation="http://www.adc.com/schema/cm/v4.0/CMProduct http://www.adc.com/schema/cm/v4.0/CMProduct
    .xsd">
    <class1>Peterson</class1>
    <class2>1200</class2>
    <class3>110 Minutes</class3>
    <class4>235 grams</class4>
    <class5>$49</class5>
    <comments>This low price means the minimum package cost for new- approved customers who remain connected to th
    e WonderNet? service for 12 continuous months is $454</comments>
    <description>Peterson 1200-110 Minutes-$49</description>
    <imageRef href="CMImage/mppet1200.xml">mp-pet-1200</imageRef>
    <name>MP-PET-1200</name>
    <securityGroup href="CMSecurityGroup/Default.xml">Default</securityGroup>
    </CMProduct>
    I've gone into the code, to see that the Clob value is correct. However, when the createXml is called, I get the error...
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORa-19202: Error occurred in XML processing
    LPX-00217: invalid character 65533 (\uFFFD)
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    When I see what the character \uFFFD is, it turns out to be "?".
    So, the createXML is blowing up because I have a question mark in the XML file ... presumably the
    <?xml version="1.0" encoding="UTF-8"?>
    line. Which to my knowledge is perfectly correct XML.
    It also seems to quite happily accept other XML documents with the "?" in it. So is there any idea as to what's causing this error?
    Thanks,
    Ed

    Hmm, probably doesn't like the ? in the middle of the comments section... :) I'll keep looking....

  • Call a Javascritp function after a validation failure

    Hi all,
    I have a javascript function that is executed on page load. (it works fine)
    Now I need to call it after a validation failure
    How I can implement this call ?
    I am using Apex 4.0.2 and the inline notification, so the page load event is not fired
    which "activation" event can i use ?
    regards
    saverio
    Edited by: tirone on 17-giu-2011 9.00
    Edited by: tirone on 17-giu-2011 9.04

    Thank You Tyson for your quick replay,
    and .. I apologize me for mine bad English.
    My problem is that after a validation failure (with in line notification) the page load event IS NOT fired (in some case): so my script is not executed.
    I would like to execute this script however and I don't know where and how to call it.
    I give You more detail ......
    I'm working on a page that contain a tabular form; in this form, using my script (called "disable_field"), Ii set to read-only some fields.
    I call my script in "Execute when page load" section of page definition.
    If the validation failure is produced by an update of some records in my tabular form all is OK : the inline notification is shown, the page is re-loaded and my script is executed.
    If I add a new record and, after the submit, a validation fail, the page IS NOT reloaded (I don't know the why) and my script is not executed (so all fields are modifiable and this is not how much I want)
    I will appreciate very any help
    regards
    saverio

Maybe you are looking for