Hi,
 
I read your article on OTN and it was good. But I am facing some problem when i try to validate the xml document against the schema in my project.
 
I am working on a Web services project involving transfer of XML docs as string and validating them against the schema and then updating the database with the data contained in the document.
 
I am currently facing problem during the validation part.
 
the schema is as follows:
 
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Fadi Hindi (Dubai eGovernment) -->
<xsd:schema xmlns="http://sync.dubai.ae/oagis/9" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:ns1="http://www.openapplications.org/oagis/9/codelists" xmlns:ns2="http://www.openapplications.org/oagis/9/unqualifieddatatypes/1.1" xmlns:ns3="http://www.openapplications.org/oagis/9/qualifieddatatypes/1.1" targetNamespace="http://sync.dubai.ae/oagis/9" elementFormDefault="qualified" attributeFormDefault="unqualified">
 <xsd:include schemaLocation="../Resources/Nouns/TradeLicense.xsd"/>
 <xsd:import namespace="http://www.openapplications.org/oagis/9/codelists" schemaLocation="../../../Resources/Components/Common/CodeLists.xsd"/>
 <xsd:import namespace="http://www.openapplications.org/oagis/9" schemaLocation="../../../Resources/Components/Common/Components.xsd"/>
 <xsd:import namespace="http://www.openapplications.org/oagis/9" schemaLocation="../../../Resources/Components/Common/Meta.xsd"/>
 <xsd:import namespace="http://www.openapplications.org/oagis/9/unqualifieddatatypes/1.1" schemaLocation="../../../Resources/Components/CoreComponents/unqualifiedDataTypes.xsd"/>
 <xsd:import namespace="http://www.openapplications.org/oagis/9/qualifieddatatypes/1.1" schemaLocation="../../../Resources/Components/CoreComponents/QualifiedDataTypes.xsd"/>
 <xsd:element name="SyncTradeLicense" type="SyncTradeLicenseType">
  <xsd:annotation>
   <xsd:documentation> DEG Trade License Object</xsd:documentation>
  </xsd:annotation>
 </xsd:element>
 <xsd:complexType name="SyncTradeLicenseType">
  <xsd:complexContent>
   <xsd:extension base="oa:BusinessObjectDocumentType">
    <xsd:sequence>
     <xsd:element name="DataArea" type="SyncTradeLicenseDataAreaType"/>
    </xsd:sequence>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="SyncTradeLicenseDataAreaType">
  <xsd:sequence>
   <xsd:element ref="oa:Sync"/>
   <xsd:element ref="TradeLicense"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:schema>
 
the sample.xml file is as follows:
 
<SyncTradeLicense xmlns:oa="http://www.openapplications.org/oagis/9" languageCode="en-US" versionID="normalizedString" releaseID="normalizedString" systemEnvironmentCode="Production" xmlns="http://sync.dubai.ae/oagis/9">
  <oa:ApplicationArea>
    <oa:Sender>
      <oa:LogicalID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">normalizedString</oa:LogicalID>
      <oa:ComponentID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">normalizedString</oa:ComponentID>
      <oa:TaskID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">normalizedString</oa:TaskID>
      <oa:ReferenceID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">normalizedString</oa:ReferenceID>
      <oa:ConfirmationCode languageID="en-us" listName="String" listAgencyName="String" listURI="http://www.altova.com" listSchemeURI="http://www.altova.com" listID="normalizedString" listVersionID="normalizedString" name="String" listAgencyID="normalizedString">Always</oa:ConfirmationCode>
      <oa:AuthorizationID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">normalizedString</oa:AuthorizationID>
    </oa:Sender>
    <oa:CreationDateTime>2006-05-02T14:14:12+04:00</oa:CreationDateTime>
    <oa:Signature qualifyingAgencyId="normalizedString"/>
    <oa:BODID schemeAgencyName="String" schemeAgencyID="normalizedString" schemeVersionID="normalizedString" schemeName="String" schemeURI="http://www.altova.com" schemeID="normalizedString" schemeDataURI="http://www.altova.com">6c1b6d98-52db-44bd-a019-f76a25f73c0b</oa:BODID>
    <oa:UserArea/>
  </oa:ApplicationArea>
  <DataArea>
    <oa:Sync/>
    <TradeLicense>
      <IssuingAuthority>DED</IssuingAuthority>
      <MasterData>
        <LicenseNumber>237526</LicenseNumber>
        <oa:DUNSID>534455001</oa:DUNSID>
        <LicenseNationality>
          <oa:Code>0</oa:Code>
          <oa:Description languageID="en-us"/>
          <oa:Description languageID="ar-ae"/>
        </LicenseNationality>
        <CommerceNumber>33474</CommerceNumber>
        <ChamberOfCommerceNumber>33731</ChamberOfCommerceNumber>
        <TradeName languageID="en-us">AL BALAD REAL ESTATE</TradeName>
        <TradeName languageID="ar-ae">ÇáÈáÏ ááÚÞÇÑÇÊ</TradeName>
        <ContactNumber>
          <oa:Code/>
          <oa:Description languageID="en-us">Phonno</oa:Description>
          <Number>2723408</Number>
        </ContactNumber>
        <ContactNumber>
          <oa:Code/>
          <oa:Description languageID="en-us">MobileNo</oa:Description>
          <Number/>
        </ContactNumber>
        <ContactNumber>
          <oa:Code/>
          <oa:Description languageID="en-us">Faxno</oa:Description>
          <Number>2725213</Number>
        </ContactNumber>
        <IssueDate>1995-04-11</IssueDate>
        <ExpiryDate>2007-04-10</ExpiryDate>
        <Status>Active</Status>
        <Category>
          <oa:Code>2</oa:Code>
          <oa:Description languageID="en-us">Commercial License</oa:Description>
          <oa:Description languageID="ar-ae">ÊÌÇÑíÉ</oa:Description>
        </Category>
        <LegalType>
          <oa:Code>0</oa:Code>
          <oa:Description languageID="en-us">Sole Propreitorship</oa:Description>
          <oa:Description languageID="ar-ae">ãÄÓÓÉ ÝÑÏíÉ</oa:Description>
        </LegalType>
        <CommerceRegisterType>
          <oa:Code>2</oa:Code>
          <oa:Description languageID="en-us"/>
          <oa:Description languageID="ar-ae">ãÄÓÓÇÊ</oa:Description>
        </CommerceRegisterType>
        <MainLicenseNumber>237526</MainLicenseNumber>
        <PaidUpCapital>0</PaidUpCapital>
        <NominalCapital>0</NominalCapital>
        <UserArea>
          <DepartmentUserArea>
            <Address>ãßÊÈ ãáß äÇÕÑ Èä ÚÈÏÇááØíÝ ÇáÓÑßÇá - ÏíÑÉ - ÇáãØíäÉ</Address>
            <Pobox>3930    </Pobox>
            <eMail/>
            <ParcelId/>
            <BuildingNumber/>
            <FloorNumber/>
            <SuiteNumber/>
          </DepartmentUserArea>
        </UserArea>
      </MasterData>
      <Activities>
        <Activity>
          <oa:Code>701001</oa:Code>
          <oa:Description languageID="en-us">Real Estate Agent</oa:Description>
          <oa:Description languageID="ar-ae">ÔÑÇÁÇáÇÑÇÖí æÇáÚÞÇÑÇÊ  æÈíÚåÇ</oa:Description>
          <Status>
            <oa:Code>09</oa:Code>
            <oa:Description languageID="en-us">Canceled</oa:Description>
            <oa:Description languageID="ar-ae">ãáÛí</oa:Description>
          </Status>
          <AddDate>1995-04-11</AddDate>
          <CancelDate>2003-06-09</CancelDate>
        </Activity>
        <Activity>
          <oa:Code>701002</oa:Code>
          <oa:Description languageID="en-us">Real Estate Brokers</oa:Description>
          <oa:Description languageID="ar-ae">ÇáæÓÇØÉ Ýí ÈíÚ ÇáÚÞÇÑÇÊ æÔÑÇÆåÇ</oa:Description>
          <Status>
            <oa:Code>00</oa:Code>
            <oa:Description languageID="en-us">Active</oa:Description>
            <oa:Description languageID="ar-ae">ÝÚÇá</oa:Description>
          </Status>
          <AddDate>1995-04-11</AddDate>
        </Activity>
        <Activity>
          <oa:Code>701003</oa:Code>
          <oa:Description languageID="en-us">Real Estate Management Services</oa:Description>
          <oa:Description languageID="ar-ae">ÎÏãÇÊ  ÊÃÌíÑ ÇáÚÞÇÑÇÊ  æÇÏÇÑÊåÇ</oa:Description>
          <Status>
            <oa:Code>09</oa:Code>
            <oa:Description languageID="en-us">Canceled</oa:Description>
            <oa:Description languageID="ar-ae">ãáÛí</oa:Description>
          </Status>
          <AddDate>1995-04-11</AddDate>
          <CancelDate>2003-06-09</CancelDate>
        </Activity>
      </Activities>
      <Partners>
        <Partner>
          <Id>8192</Id>
          <Name languageID="en-us"/>
          <Name languageID="ar-ae">ÚÈÏÇááå Úáí ÇÕÛÑ ÚÈÏÇááå ÇáÚÈÏÇááå</Name>
          <PersonCategory>
            <oa:Code>1</oa:Code>
            <oa:Description languageID="en-us">UAE National</oa:Description>
            <oa:Description languageID="ar-ae">ãæÇØä</oa:Description>
          </PersonCategory>
          <PercentOwnership>0</PercentOwnership>
          <PassportNumber>906904/Ú</PassportNumber>
          <ResidenceNumber>2232/Ï</ResidenceNumber>
          <Nationality>
            <oa:Code>101</oa:Code>
            <oa:Description languageID="en-us">Emirates</oa:Description>
            <oa:Description languageID="ar-ae">ÇáÇãÇÑÇÊ</oa:Description>
          </Nationality>
          <LegalType>
            <oa:Code>1</oa:Code>
            <oa:Description languageID="en-us">Establishment Owner</oa:Description>
            <oa:Description languageID="ar-ae">ãÇáß ãÄÓÓÉ</oa:Description>
          </LegalType>
          <Status>
            <oa:Code>00</oa:Code>
            <oa:Description languageID="en-us">Active</oa:Description>
            <oa:Description languageID="ar-ae">ÝÚÇá</oa:Description>
          </Status>
          <AddDate>1995-04-12</AddDate>
        </Partner>
      </Partners>
      <Transactions>
        <Number>1073804</Number>
        <Date>2006-04-08</Date>
        <Type>
          <oa:Code>400</oa:Code>
          <oa:Description languageID="en-us">Trade License Renewal without amendment</oa:Description>
          <oa:Description languageID="ar-ae">ÊÌÏíÏ ÊÑÎíÕ ÊÌÇÑí ÝÞØ ÈÏæä ÊÚÏíáÇÊ</oa:Description>
        </Type>
        <Procedures>
          <Procedure>
            <oa:Code>401</oa:Code>
            <oa:Description languageID="en-us">License Renewal</oa:Description>
            <oa:Description languageID="ar-ae">ÊÌÏíÏ áÓäÉ æÇÍÏÉ</oa:Description>
          </Procedure>
        </Procedures>
      </Transactions>
      <UserArea>
        <AuthorizedDepartments>
          <Department>
            <oa:Code>TEJARI</oa:Code>
            <oa:Description languageID="en-us">Tejari</oa:Description>
          </Department>
        </AuthorizedDepartments>
      </UserArea>
    </TradeLicense>
  </DataArea>
</SyncTradeLicense>
 
the exception i keep getting is:
 
XML Document has Error:trueTargetNamespace.2: Expecting no namespace, but the schema document has a target namespace of 'http://sync.dubai.ae/oagis/9'.
 
 
Could you help me figure out what needs to be done??
 
Thanks,
Mohit

 
 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..

Reply via email to