XSD question

Sorry for my newbie-ness, but could someone help me with a little XSD?
Suppose I have XML like:
<list>
  <item type="stock">12345</item>
  <item type="other">foo</item>
</list>When the item element has an attribute of stock, the element content should be an integer. When the item element has an attribute of other, the element content should be either 'foo' or 'bar'. I had defined two different types like:
<xs:complexType name="stockType">
  <xs:simpleContent>
    <xs:extension base="xs:integer"/>
  </xs:simpleContent>
</xs:complexType>
<xs:complexType name="otherType">
  <xs:simpleContent>
    <xs:restriction base="xs:string">
      <xs:enumeration value="foo"/>
      <xs:enumeration value="bar"/>
    </xs:restriction>
  </xs:simpleContent>
</xs:complexType>Now, I was trying to combine these like:
<xs:element name="list">
  <xs:complexType>
    <xs:sequence maxOccurs="unbounded">
      <xs:choice>
        <xs:element name="item" type="stockType"/>
        <xs:element name="item" type="otherType"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
</xs:element>But it doesn't like the fact that each choice uses the 'item' element.
Anyone have a better idea of how I should do this?
Thanks, Neil

Thanks for all the help. Unfortunately, my original example was not complete. The stockType and otherType complexType's needed to define an attribute element, as shown below:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
     <xs:element name="list">
          <xs:complexType>
               <xs:choice>
                    <xs:sequence maxOccurs="unbounded">
                         <xs:element name="item" type="stockType"/>
                    </xs:sequence>
                    <xs:sequence maxOccurs="unbounded">
                         <xs:element name="item" type="otherType"/>
                    </xs:sequence>
               </xs:choice>
          </xs:complexType>
     </xs:element>
     <xs:complexType name="stockType">
          <xs:simpleContent>
               <xs:extension base="xs:integer">
               <xs:attribute name="type" fixed="stock"/>
               </xs:extension>
          </xs:simpleContent>
     </xs:complexType>
     <xs:complexType name="otherType">
          <xs:simpleContent>
               <xs:restriction base="xs:string">
                    <xs:enumeration value="foo"/>
                    <xs:enumeration value="bar"/>
                    <xs:attribute name="type" fixed="other"/>
               </xs:restriction>
          </xs:simpleContent>
     </xs:complexType>
</xs:schema>Unfortunately, this fails to find the following simple file valid:
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\JAVA\jaxb\list.xsd">
     <item type="stock">12345</item>
     <item type="other">foo</item>
</list>It produces the following error in XML Spy:
Bad attribute for fixed attribute/element 'type' - must be 'stock'
Sorry to be a pain :( Don't waste any more time looking at this, but thanks for your efforts already :)

Similar Messages

  • Probably Easy XSD Question

    I wrote the 2 files below (1 xml and 1 xsd). I think the XSD is correct but I'm pretty sure I'm not linking the XML to the XSD correctly. I think this because I can delete a line from the XML file that the XSD says is required and still view the XML file in an IE6 browser without getting an error message. So, 2 questions. 1) is my check (bringing the xml file up in an IE6 browser) an acceptable check? 2) How do I link these 2 files together so the XSD actually does check the XML file. I took a guess at it from some examples I found online but I know I'm almost certain I'm not doing it correctly.
    myXML.xml
    <?xml version="1.0"?>
    <teamList xmlns="http://www.w3schools.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.kevin.com myXSD.xsd">
         <sport id="nhl">
              <team>
                   <name>NY Rangers</name>
                   <record>
                        <wins>35</wins>
                        <losses>47</losses>
                   </record>
              </team>
              <team>
                   <name>NJ Devils</name>
                   <record>
                        <wins>50</wins>
                        <losses>32</losses>
                   </record>
              </team>
         </sport>
         <sport id="mlb">
              <team>
                   <name>NY Mets</name>
                   <record>
                        <wins>81</wins>
                        <losses>81</losses>
                   </record>
              </team>
              <team>
                   <name>NY Yankess</name>
                   <record>
                        <wins>100</wins>
                        <losses>62</losses>
                   </record>
              </team>
         </sport>
    </teamList>------------------------------------------
    myXSD.xsd
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://www.kevin.com"
         xmlns="http://www.w3schools.com"
         elementFormDefault="qualified">
         <xs:element name="teamList" type="teamListType" />
    </xs:schema>
    <xs:complexType name="teamListType">
         <xs:sequence>
              <xs:element name="sport" type="sportType" />
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="sportType">
         <xs:sequence>
              <xs:element name="team" type="teamType"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="teamType">
         <xs:sequence>
              <xs:element name="name" />
              <xs:element name="record" type="recordType"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="recordType">
         <xs:sequence>
              <xs:element name="wins" type="xs:numeric"/>
              <xs:element name="losses" type="xs:numeric"/>
         </xs:sequence>
    </xs:complexType>

    Set the default namespace the same as the targetNamespace.
    <teamList xmlns="http://www.kevin.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.kevin.com myXSD.xsd">
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://www.kevin.com"
         elementFormDefault="qualified">
    thanks,
    Deepak

  • XML/XSD question (using ODI)

    Hi all.
    I have posted this in the ODI forum as well, but this may be a more proper place to ask for help.
    I'm working on a new dwh solution where the main source of data will come from XML-files. The problem is that we are having difficulties with the use of abstract types in the xsd-file. We currently use ODI to read the XML-files and to store the data in our database, but all fields from the XML-files are not visible in the target tables.
    The problem can be simplified like this example:
    We have a main element, testElement, which can contain one or more publications.
    Publication is of type PublicationType, and PublicationType is an abstract that contains title, author and date.
    We have four other types which extends PublicationType; BookType, MagazineType, NewspaperType and AdsType. They all contain additional fields.
    XSD-file
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:testing:kontroll:example:oppgave:v1"
    xmlns:tns="urn:testing:kontroll:example:oppgave:v1"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    elementFormDefault="qualified">
    <element name="testElement" type="tns:TestElementType" xdb:defaultTable="TEST_TAB" />
    <complexType name="TestElementType">
    <sequence>
    <element name="publication" type="tns:PublicationType" minOccurs="1"
    maxOccurs="unbounded" />
    </sequence>
    </complexType>
    <complexType name="PublicationType" abstract="true">
    <sequence>
    <element name="title" type="string"/>
    <element name="author" type="string" minOccurs="0"
    maxOccurs="unbounded" />
    <element name="date" type="string"/>
    </sequence>
    </complexType>
    <complexType name="BookType">
    <complexContent>
    <extension base="tns:PublicationType">
    <sequence>
    <element name="ISBN" type="string"/>
    <element name="publisher" type="string"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="MagazineType">
    <complexContent>
    <extension base="tns:PublicationType">
    <sequence>
    <element name="editor" type="string"/>
    <element name="period" type="string" minOccurs="0"
    maxOccurs="1"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="NewspaperType">
    <complexContent>
    <extension base="tns:PublicationType">
    <sequence>
    <element name="daily" type="boolean"/>
    <element name="owner" type="string" minOccurs="0"
    maxOccurs="1"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="AdsType">
    <complexContent>
    <extension base="tns:PublicationType">
    <sequence>
    <element name="company" type="string"/>
    <element name="article" type="string" />
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    </schema>
    XML-file
    <?xml version="1.0" encoding="UTF-8"?>
    <tns:testElement xmlns:tns="urn:testing:kontroll:example:oppgave:v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:testing:kontroll:example:oppgave:v1 ExampleXMLSchema.xsd ">
    <tns:publication xsi:type="tns:BookType">
    <tns:title>Boken</tns:title>
    <tns:author>Arne Svendsen</tns:author>
    <tns:date>2001</tns:date>
    <tns:ISBN>78979797</tns:ISBN>
    <tns:publisher>The Company Ltd</tns:publisher>
    </tns:publication>
    <tns:publication xsi:type="tns:MagazineType">
    <tns:title>Fancy Magazine</tns:title>
    <tns:author>Mads Madsen</tns:author>
    <tns:date>2011</tns:date>
    <tns:editor>Svante Svantesen</tns:editor>
    <tns:period>weekly</tns:period>
    </tns:publication>
    </tns:testElement>
    When tables are generated in the database through ODI I'm not getting all the attributes present in the xml-file.
    Can anybody tell me if this should work (and, if yes, why it doesn`t)? Or if the XSD/XML looks wrong in some way?
    Is this a known limitation in Oracle or ODI etc.?
    Any pointers to documentation describing similar problems would also be helpful.
    Thanks,
    Bjørn

    Hi, Bjørn,
    When tables are generated in the database through ODI I'm not getting all the attributes present in the xml-file.I don't know ODI, so I'm just curious here : what tables are generated? Is there one table per extented type (+ child tables for repeating elements), or just one Publication table with missing columns?
    I've looked at the other thread you mentioned on the ODI forum, and saw that you'd also want to store XML files in an XMLType table.
    I tested the schema registration in the database to see how Oracle reacts to the structure, and it looks OK, type extensions are supported.
    SQL> begin
      2   dbms_xmlschema.registerSchema(
      3     schemaURL => 'ExampleXMLSchema.xsd'
      4   , schemaDoc => bfilename('TEST_DIR', 'ExampleXMLSchema.xsd')
      5   , local => true
      6   , genTypes => true
      7   , genTables => true
      8   , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
      9   );
    10  end;
    11  /
    PL/SQL procedure successfully completed
    SQL> insert into test_tab
      2  values (xmltype('<?xml version="1.0" encoding="UTF-8"?>
      3  <tns:testElement xmlns:tns="urn:testing:kontroll:example:oppgave:v1"
      4                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      5                   xsi:schemaLocation="urn:testing:kontroll:example:oppgave:v1 ExampleXMLSchema.xsd ">
      6    <tns:publication xsi:type="tns:BookType">
      7      <tns:title>Boken</tns:title>
      8      <tns:author>Arne Svendsen</tns:author>
      9      <tns:date>2001</tns:date>
    10      <tns:ISBN>78979797</tns:ISBN>
    11      <tns:publisher>The Company Ltd</tns:publisher>
    12    </tns:publication>
    13    <tns:publication xsi:type="tns:MagazineType">
    14      <tns:title>Fancy Magazine</tns:title>
    15      <tns:author>Mads Madsen</tns:author>
    16      <tns:author>Arne Svendsen</tns:author>
    17      <tns:date>2011</tns:date>
    18      <tns:editor>Svante Svantesen</tns:editor>
    19      <tns:period>weekly</tns:period>
    20    </tns:publication>
    21  </tns:testElement>'))
    22  ;
    1 row inserted
    Querying as relational data :
    SQL> select x.*
      2  from test_tab t
      3     , xmltable(xmlnamespaces(default 'urn:testing:kontroll:example:oppgave:v1'),
      4       'for $i in /testElement/publication
      5        return element r {
      6          $i/child::*
      7        , element pubtype {
      8            typeswitch($i)
      9              case element(publication, BookType)      return "Book"
    10              case element(publication, MagazineType)  return "Magazine"
    11              case element(publication, AdsType)       return "Ads"
    12              case element(publication, NewspaperType) return "Newspaper"
    13              default return "Publication"
    14          }
    15        }'
    16       passing t.object_value
    17       columns title   varchar2(500) path 'title'
    18             , authors varchar2(500) path 'string-join(author,",")'
    19             , pubdate number(4)     path 'date'
    20             , isbn    number(13)    path 'ISBN'
    21             , editor  varchar2(500) path 'editor'
    22             , period  varchar2(500) path 'period'
    23             , pubtype varchar2(30)  path 'pubtype'
    24       ) x
    25  ;
    TITLE                 AUTHORS                        PUBDATE           ISBN EDITOR                PERIOD      PUBTYPE
    Boken                 Arne Svendsen                     2001       78979797                                   Book
    Fancy Magazine        Mads Madsen,Arne Svendsen         2011                Svante Svantesen      weekly      Magazine

  • SaxParser.setProperty without a XSD file reference!

    Hi!
    I currently make modifications to existing code that find errors in XML documents. The author is using the SAX (Simple API for XML) parser. In the code, following is written:
    public void process(String xmlString, String msgType) throws Exception
    String schemaLocation;
    schemaLocation=Constants.XSD+msgType+".xsd";
    parser.setProperty("http://apache.org/xml/properties/schema/external- schemaLocation", schemaLocation);
    parser.parse(new InputSource(new StringReader(xmlString)));
    if (this.errors != null)
    throw new ValidationException(this.errors,"Schema violation(s) occured.");
    } // public void process(String, String)
    With the setProperty method, the SAXParser sets a relation between the string and the object schemaLocation, which is another string. I a guess that this information is used to access the file, as the value of this variable is
    schemaLocation = "http://<IP Address>/ezoll/V01 file:///D:\\workspace\\ecs\\WebContent\\ezollat\\schemas
    " + <msgType that defines the file name> + ".XSD"
    QUESTION:
    My problem is that the XSD file that contains the rules for the XML file is a special kind of file that should be read in only once so that access time is reduced. How is it possible to modify this such that instead of accessing over setProperty a file, some other Object that is in the memory cache should be used?
    If you do not have a direct answer to the problem, which documentation would you advise to read? I have currently access to http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/parsers/SAXParser.html.
    I know that reading all the file in the memory is somehow "violating" the idea of SAX; it's more DOM-like. But that is the requirement from my customer.
    Thank you all for your support!

    Thank you for the hint! I have found plenty of information online about the EntityResolver interface and classes that implement it from different vendors. I think that it will solve my problem.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Xsd extension question

    Hello, I have a question about the extension of complex Types by xsd.
    Can I use polymorphism with the extension of complex Types.
    By example, I define a xml schema
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
    <xsd:element name="basic" type="basic">
    <xsd:annotation>
    <xsd:documentation>Comment describing your root element</xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    <xsd:complexType name="basic">
    <xsd:sequence>
    <xsd:element name="basicElement" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="derivedBasic">
    <xsd:complexContent>
    <xsd:extension base="basic">
    <xsd:sequence>
    <xsd:element name="derivedElement" type="xsd:integer"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:schema>
    Then my question is, can i use in an xml document which depends on the xml schema the complexType derivedBasic when a basic type is required. (Perhaps i can use a typecast or something).
    I need this, because i want to make a xsd representation of an uml model and want to check dataexchange based on xml.
    Thanks for your help
    Andreas

    If it was me I would post such questions in the XML forum.
    If I understand the question it is not possible.
    In general you cannot describe all possible data validation using only an XSD.

  • Simple File Adapter Question [ XSD validity  ? ]

    Imported an XSD into JD 101333. [ several large, known as good, used in Biztalk etc ]
    tried to make ESB inbound adapter
    spent ages trying to find out why it wouldn't accept it [ then I found a tiny tiny paragraph in the manual stating it must have a namespace ?  why , honestly who cares ]
    2nd ; still won't validate, now it says "Invalid Reference" .. Which log setting do I switch on in Jdeveloper to see why it's throwing a hissy fit ?
    Note : this is a known good set of XSDs and is in use production ; for it not to import into JD is a major drawback to the people I'm evaluating BPEL/ESB for... so please help.

    2nd problem found .
    The XSD elements use a ref:
    e.g.
    <xs:element ref="MyMessageType"/>
    the solution is to add
    targetNamespace="http://my.validators.com/msgs"
    xmlns:pv="http://my.validators.com/msgs"
    in the schemadef
    now replace the xs:element with
    <xs:element ref="pv:MyMessageType"/>
    In all honesty where is this written in the manuals ? It's a fair question.
    Added to that you have NO hint as to what is wrong ; I had to deconstruct about 3000 lines of XSD to find the problem. since if you use "Validate XML" in Jdeveloper it works just fine.
    Massive hole guys.

  • XSD:Pattern Question

    SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 13 15:25:04 2011
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I'm putting together a simpler test case for this, but I figured I'd start by asking the question and seeing if the answer is simple...
    I have an XML document with the date elements:
                    <documentDate>20080808</documentDate>
                    <entryDate>2009-09-22</entryDate>the documentDate is defined as PartialDateType.
         <xsd:simpleType name="PartialDateType">
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="\d{4}|\d{6}|\d{8}"/>
              </xsd:restriction>
         </xsd:simpleType>When I try to validate the document, I get
    “literal "20080808" is not valid with respect to the pattern”.
    If I shorten the date to "2008", the document validates.
    What part of <xsd:pattern value="\d{4}|\d{6}|\d{8}"/> do I not understand?

    Workaround is to reverse the pattern.. See below
    c:\xdb>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Wed Jan 19 13:55:30 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/oracle as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> def USERNAME = XDBTEST
    SQL> --
    SQL> def PASSWORD = &USERNAME
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user XDBTEST cascade
    User dropped.
    Elapsed: 00:01:40.47
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDBTEST
    Grant succeeded.
    Elapsed: 00:00:00.08
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> set long 100000 pages 0 lines 256 trimspool on timing on
    SQL> --
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> var SCHEMAURL VARCHAR2(700)
    SQL> var XMLSCHEMA CLOB
    SQL> var INSTANCE CLOB
    SQL> --
    SQL> begin
      2    :SCHEMAURL:= 'http://xmlns.example.com/testcase.xsd';
      3    :XMLSCHEMA :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
      6     <xs:element name="T1" type="T1_TYPE"/>
      7     <xs:complexType name="T1_TYPE">
      8             <xs:sequence>
      9                     <xs:element name="TEST" type="PartialDateType"/>
    10             </xs:sequence>
    11     </xs:complexType>
    12     <xs:simpleType name="PartialDateType">
    13             <xs:restriction base="xs:string">
    14                     <xs:pattern value="\d{8}|\d{6}|\d{4}"/>
    15             </xs:restriction>
    16     </xs:simpleType>
    17  </xs:schema>';
    18  end;
    19  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> declare
      2    V_XML_SCHEMA xmlType := XMLType(:XMLSCHEMA);
      3  begin
      4    DBMS_XMLSCHEMA.registerSchema
      5    (
      6      SCHEMAURL        => :SCHEMAURL,
      7      SCHEMADOC        => V_XML_SCHEMA,
      8      LOCAL            => TRUE,
      9      GENBEAN          => FALSE,
    10      GENTYPES         => FALSE,
    11      GENTABLES        => FALSE,
    12      ENABLEHIERARCHY  => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE,
    13      OPTIONS          => DBMS_XMLSCHEMA.REGISTER_BINARYXML
    14    );
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:04:26.10
    SQL> create table TEST_TABLE of XMLTYPE
      2  XMLTYPE STORE AS SECUREFILE BINARY XML
      3  XMLSCHEMA "http://xmlns.example.com/testcase.xsd" ELEMENT "T1"
      4  /
    Table created.
    Elapsed: 00:00:00.70
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "9" is not valid with respect to the pattern
    Elapsed: 00:00:06.08
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "99" is not valid with respect to the pattern
    Elapsed: 00:00:06.70
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "999" is not valid with respect to the pattern
    Elapsed: 00:00:07.67
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:24.30
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "99999" is not valid with respect to the pattern
    Elapsed: 00:00:08.02
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:11.60
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999999</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "9999999" is not valid with respect to the pattern
    Elapsed: 00:00:05.60
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:06.18
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999999</TEST></T1>') )
    ERROR at line 1:
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "999999999" is not valid with respect to the pattern
    Elapsed: 00:00:05.61
    SQL> DROP TABLE TEST_TABLE PURGE
      2  /
    Table dropped.
    Elapsed: 00:00:00.14
    SQL> call dbms_xmlSchema.deleteSchema(:SCHEMAURL)
      2  /
    Call completed.
    Elapsed: 00:00:00.06
    SQL> declare
      2    V_XML_SCHEMA xmlType := XMLType(:XMLSCHEMA);
      3  begin
      4    DBMS_XMLSCHEMA.registerSchema
      5    (
      6      SCHEMAURL        => :SCHEMAURL,
      7      SCHEMADOC        => V_XML_SCHEMA,
      8      LOCAL            => TRUE,
      9      GENBEAN          => FALSE,
    10      GENTYPES         => TRUE,
    11      GENTABLES        => FALSE,
    12      ENABLEHIERARCHY  => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    13    );
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.87
    SQL> create table TEST_TABLE of XMLTYPE
      2  XMLTYPE STORE AS OBJECT RELATIONAL
      3  XMLSCHEMA "http://xmlns.example.com/testcase.xsd" ELEMENT "T1"
      4  /
    Table created.
    Elapsed: 00:00:00.07
    SQL> create trigger DO_VALIDATION
      2  before insert
      3  on TEST_TABLE
      4  for each row
      5  begin
      6   :new.object_value.schemavalidate();
      7  end;
      8  /
    Trigger created.
    Elapsed: 00:00:00.06
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "9" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.39
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "99" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.52
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "999" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.50
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:05.95
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "99999" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.53
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:05.40
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>9999999</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "9999999" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.37
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>99999999</TEST></T1>') )
      2  /
    1 row created.
    Elapsed: 00:00:05.74
    SQL> insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999999</TEST></T1>') )
      2  /
    insert into TEST_TABLE values ( XMLTYPE('<T1><TEST>999999999</TEST></T1>') )
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "999999999" is not valid with respect to the pattern
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at "XDBTEST.DO_VALIDATION", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.DO_VALIDATION'
    Elapsed: 00:00:05.49
    SQL>

  • Question regarding xsd and shredding

    All,
    I have the following xsd and xml file, I register the xsd in xmldb and create a resource from the xml file. Upon registration of the xsd, the proper (I think) tables are created and upon creating the resource the primary table seems to have a row in it. I am having a problem trying to figure out how to get the values out of the types that have the enumeration values. Any help would be appreciated.
    $sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Aug 28 10:40:41 2012
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    SQL> select * from V$VERSION
    2 /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for HPUX: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL>
    xsd:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
         <xs:element name="ITEMS" xdb:defaultTable="TMP_ITEMS">
              <xs:complexType xdb:SQLType="TMP_ITEMS_T" xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ITEM_GROUP" xdb:SQLCollType="ITEM_GROUP_ROW_NTT">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="GROUP_A"/>
                                       <xs:enumeration value="GROUP_B"/>
                                       <xs:enumeration value="GROUP_C"/>
                                       <xs:enumeration value="GROUP_D"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element ref="ITEM" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ITEM" xdb:defaultTable="TMP_ITEM" xdb:SQLType="TMP_ITEM_T" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="ITEM_NUMBER" type="xs:string"/>
                        <xs:element name="ITEM_STATUS">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="ACTIVE"/>
                                       <xs:enumeration value="INACTIVE"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="ITEM_DATE" type="xs:string"/>
                        <xs:element name="ITEM_ID" type="xs:string"/>
                        <xs:element ref="ITEM_SUBGROUP_1" maxOccurs="unbounded"/>               
                        <xs:element ref="ITEM_SUBGROUP_2" maxOccurs="unbounded"/>               
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ITEM_SUBGROUP_1" xdb:defaultTable="TMP_ITEM_SUBGROUP_1" xdb:SQLType="TMP_ITEM_SUBGROUP_1_T" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="SUBGROUP_1_ID" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ITEM_SUBGROUP_2" xdb:defaultTable="TMP_ITEM_SUBGROUP_2" xdb:SQLType="TMP_ITEM_SUBGROUP_2_T" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="SUBGROUP_2_ID" type="xs:string"/>
                        <xs:element name="SUBGROUP_2_TYPE">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="SUBGROUP_TYPE_2_TYPE_A"/>
                                       <xs:enumeration value="SUBGROUP_TYPE_2_TYPE_B"/>
                                       <xs:enumeration value="SUBGROUP_TYPE_2_TYPE_C"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>xml:
    <?xml version="1.0"?>
    <ITEMS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="tmp_items.xsd">
         <ITEM_GROUP>GROUP_A</ITEM_GROUP>
         <ITEM>
              <ITEM_NUMBER>1</ITEM_NUMBER>
              <ITEM_STATUS>ACTIVE</ITEM_STATUS>
              <ITEM_ID>0000000123</ITEM_ID>
              <ITEM_SUBGROUP_1>
                   <SUBGROUP_1_ID>SG1_000000987</SUBGROUP_1_ID>
              </ITEM_SUBGROUP_1>
              <ITEM_SUBGROUP_2>
                   <SUBGROUP_2_ID>SG2_000000987</SUBGROUP_2_ID>
                   <SUBGROUP_2_TYPE>SUBGROUP_TYPE_2_TYPE_A</SUBGROUP_2_TYPE>
              </ITEM_SUBGROUP_2>
         </ITEM>
         <ITEM>
              <ITEM_NUMBER>2</ITEM_NUMBER>
              <ITEM_STATUS>INACTIVE</ITEM_STATUS>
              <ITEM_ID>0000000456</ITEM_ID>
              <ITEM_SUBGROUP_1>
                   <SUBGROUP_1_ID>SG1_000000654</SUBGROUP_1_ID>
              </ITEM_SUBGROUP_1>
              <ITEM_SUBGROUP_2>
                   <SUBGROUP_2_ID>SG2_000000654</SUBGROUP_2_ID>
                   <SUBGROUP_2_TYPE>SUBGROUP_TYPE_2_TYPE_A</SUBGROUP_2_TYPE>
              </ITEM_SUBGROUP_2>
         </ITEM>
    </ITEMS>registration of xsd:
    BEGIN
      IF DBMS_XDB.CREATERESOURCE(
         abspath => '/public/tmp/tmp_items.xsd',
         data    => BFILENAME ('XSD_DIR','tmp_items.xsd')
      THEN
         DBMS_XMLSCHEMA.REGISTERSCHEMA(
            schemaurl => 'tmp_items.xsd',
            schemadoc => sys.UriFactory.getUri('/public/tmp/tmp_items.xsd')
         COMMIT;
      END IF;
    END;creation on xml resource:
    declare
       v_return BOOLEAN;
    BEGIN
       v_return := DBMS_XDB.CREATERESOURCE(abspath => '/public/tmp/tmp_items.xml', data => BFILENAME('XML_DIR', 'tmp_items.xml'));
    END;query the high level:
      select xml.item_number                  as item_number,
             extractvalue(value(i),'/ITEMS/ITEM_GROUP') item_status
      from tmp_items i,
           table(i.xmldata.item) xmlquery the sub_group for one high level:
    select *
    from table(
    select xml.ITEM_SUBGROUP_2
      from tmp_items i,
           table(i.xmldata.item) xml
           where xml.item_number = '1')When I execute the above query, I can't seem to extract the value out of the subgroup_2_type element. I used the extractvalue function to get it out of the high level, but can't seem to get it right here.
    Thanks
    Eric
    Edited by: Eric Schrauth on Aug 28, 2012 8:39 AM

    Have to create a base view on the elements that will always be there and other views on the items that might not and query them appropriately. Right?Not necessarily.
    The usual approach is to use an OUTER JOIN :
    SELECT x1.item_number
         , x1.item_status
         , x2.*
    FROM tmp_items t
       , XMLTable(
           '/ITEMS/ITEM'
           passing t.object_value
           columns item_number     varchar2(15) path 'ITEM_NUMBER'
                 , item_status     varchar2(15) path 'ITEM_STATUS'
                 , item_subgroup_2 xmltype      path 'ITEM_SUBGROUP_2'
         ) x1
       , XMLTable(
           '/ITEM_SUBGROUP_2'
           passing x1.item_subgroup_2
           columns subgroup_2_id   varchar2(15) path 'SUBGROUP_2_ID'
                 , subgroup_2_type varchar2(15) path 'SUBGROUP_2_TYPE'
         ) (+) x2
    ;Or the equivalent with ANSI JOIN :
    SELECT x1.item_number
         , x1.item_status
         , x2.*
    FROM tmp_items t
       , XMLTable(
           '/ITEMS/ITEM'
           passing t.object_value
           columns item_number     varchar2(15) path 'ITEM_NUMBER'
                 , item_status     varchar2(15) path 'ITEM_STATUS'
                 , item_subgroup_2 xmltype      path 'ITEM_SUBGROUP_2'
         ) x1
       LEFT OUTER JOIN
         XMLTable(
           '/ITEM_SUBGROUP_2'
           passing x1.item_subgroup_2
           columns subgroup_2_id   varchar2(15) path 'SUBGROUP_2_ID'
                 , subgroup_2_type varchar2(15) path 'SUBGROUP_2_TYPE'
         ) x2
         ON 1 = 1
    ;

  • AQ - XSD Schema Questions

    What I am looking to do is use BPEL for messaging (and manipulation of said messages) in the backend for data synchronization to disparate sources.
    Currently, we are investigating the following:
    Oracle 9i DB with a stored procedure that accepts a number of parameters (or XML Document in CLOB format), processes the document (updates, typically), and before returning, writing the output XML document to an AQ setup on that DB instance.
    BPM (installed on an OAS 10g server instance) would be utilizing the AQ adapter to dequeue this message for processing through the orchestration.
    This is where our difficulty begins. The message the SP generates is based on an enterprise schema (EBOD - currently), which is a relatively robust XSD. Currently, we're looking how to get the AQ adapter to pick up this message (should it be a clob?) off the queue and essentially cast it into our schema that we've imported into the BPM. We haven't had much success doing this so far. Implementing a ADT that is "typed" in the 9i DB by retyping the entire schema is unacceptable, for obvious reasons.
    I think what we're looking to do is take this clob and essentially "cast" it into a message format defined by our schema. Maybe there is a better way to tackle this problem, by using something besides a CLOB (XMLType isn't supported yet, but even then... would that solve our problem?), but I am unsure. We need the message in a manipulatable form in order to call additional web services (that have differing interfaces) by extracting certain elements and passing those. Additionally, we may wish to do some business logic, routing, etc.
    I can clarify what I'm looking to do, but basically 9i DB Stored Proc writes an XML doc to an AQ. BPEL is monitoring said AQ, picks up the CLOB (that type for now) and casts the message to it's schema that we've loaded (no transformation necessary, the schema is for the specific XML doc - ie. the doc validates to that schema) and we basically go forward and process the rest of the orchestration based on this message.
    Can anyone help me with this approach? Any other suggestions?

    Hi Todd,
    The AQ Adapter allows the user to pick a CLOB field within an ADT as the payload and supply a schema for its definition.(pick "Field within Object" for the Business Payload in the AQ Adapter wizard)
    Your 9i DB Store Proc would write to the queue which is defined based on the ADT, with xml payload stored in the CLOB field. The BPEL process would be able to pick up this payload thru the AQ Adapter.
    There is a sample illustrating this scenario in the installation.
    integration\orabpel\samples\tutorials\124.AQAdapter\ADT_with_CLOB_Payload
    Note the sample also uses payload header which is defined by the ADT structure to access fields other than the payload field. The use of headers is optional.
    Let me know if this is what you're looking for.

  • BPEL Question : assign one xsd:unbounded to other xsd:unbounded

    Hi, i have a problem executing a bpel which maybe im procesing bad.
    I am invoking some web services:
    response of webservice #1 returns a list of elements. (xsd:)
    request of webservice #2 receives a list with some elements from the response above (ws #1).
    [JPG helps to understand that process.|http://img230.imageshack.us/img230/6471/img1pa0.jpg]
    is there somenthing im missing when I try to assign one xsd:unbounded to other xsd:unbounded?
    runtime appserver stacktrace in the bpel process.
    BPCOR-6129:Line Number is 77
    BPCOR-6130:Activity Name is Assign_DatosGeneradorReporte
           at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.createVirtualFaultUnit(BPELInterpreter.java:250)
           at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:202)
           ... 7 more
    Caused by: com.sun.xml.transform.sware.TooManyElementsException: Too many elements: {null}cedula
           at com.sun.xml.transform.sware.impl.DOMSorter.addToSortedList(DOMSorter.java:509)
           at com.sun.xml.transform.sware.impl.DOMSorter.sort(DOMSorter.java:296)
           at com.sun.xml.transform.sware.impl.DOMSorter.sort(DOMSorter.java:413)
            ....Thanks!

    I have figured out that with xpath and copy-of operation I can copy all nodes that come in place of xsd:any from one schema to other .But beofre copying I want to change the attribute values of the node that come in place of xsd:any based on the mapping stored in the DVM.Request some one to please help .

  • XSD/JAXB question

    I'm just starting out on using XSD/JAXB, and I was wondering how best to approach this:
    <likes>
      <like val="color">red</like>
      <like val="number">7</like>
    </likes>That is, the value of the val attribute determines the type of content that the like element should accept. For example:
    <xs:simpleType name="colors">
      <xs:restriction base="xs:string">
        <xs:enumeration value="red"/>
        <xs:enumeration value="orange"/>
        <xs:enumeration value="yellow"/>
        <xs:enumeration value="green"/>
      </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="numbers">
      <xs:restriction base="xs:int">
        <xs:minInclusive value="3"/>
        <xs:maxExclusive value="20"/>
      </xs:restriction>
    </xs:simpleType>But how to use the attribute value to determine the acceptable element content? I have managed to use union to define element content that is a union of acceptable input types, but since this is not restricted by the attribute, you could end up with invalid XML like:
    <likes>
      <!-- invalid xml when content is a union of types -->
      <like val="color">7</like>
      <like val="number">red</like>
    </likes>Any takers?
    Thanks, Neil

    <xs:element name="likes">
    <xs:complexType>
    <xs:sequence>
    <xs:sequence>
    <xs:element name="like" type="colors"/>
    </xs:sequence>
    <xs:sequence>
    <xs:element name="like" type="numbers"/>
    </xs:sequence>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    thanks,
    Deepak

  • An XML Scheme question - How to express a tag in XSD

    Hi.
    I'm trying to write an XSD to a certain XML (the CD_CATALOG famous example..), which has this kind of tag, which can appear in two formats:
    <PRICE value="34.9"/>
    or
    <PRICE>45.45</PRICE>
    the following expression just won't do, for it won't allow the first format.
    <xs:element name="PRICE">
    <xs:complexType>
    <xs:simpleContent>
    <xs:extension base="xs:decimal">
    <xs:attribute name="value" type="xs:decimal"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    Please Please tell me if you have any Idea..
    Guy

    Could you not add a xs:choice element, like this:
      <xs:complexType>
            <xs:choice>
                <xs:element name = 'price'>
                    <xs:complexType>
                        <xs:attribute name = 'value' type = 'xs:decimal'/>
                    </xs:complexType>
                </xs:element>
                <xs:element name = 'price'>
                    <xs:simpleType>
                        <xs:restriction base = 'xs:decimal'/>
                    </xs:simpleType>
                </xs:element>
            </xs:choice>
        </xs:complexType>

  • Question on putting/registering all XSd at one place

    Hi,
    I need to have one common location for all XSD used for project. So what is the right way to put on server and access from there instead of adding in all project physically.
    I have AIA XSD files like LocationEBO.xsd, LocationEBM.xsd and all core components xsd files.
    Now my ESB and ABCS services are based on these xsd. If i use them and put physically on project location i get duplicate namespace error, As i can have one namespace for one server.
    So i think there should be some way to deploy all xsd at common location then access them from there?
    Please provide information.
    Thanks,
    Jack

    Hi Anil,
    You can try T-code: ST03,
    or go to SE16 and check on table: RSDDSTAT,
    or go to SE37 and use this FM: SDDCVER_RFC_BW_STATISTICS
    Refer to the link below for more info:-
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/86df4254d81e1fe10000000a155106/content.htm
    And try to read up this document, you will have a better idea where to start:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc?quicklink=index&overridelayout=true
    Hope this helps.

  • IDOC - XI - IDOC scenario. I can't import XSD to Data Type

    Helo!
    I have some problem with creating data tape. I have to create data type similar to IDOC structure which i imported from SAP system. Similar becouse in this DT I need to add some more elements. Becouse the IDOC structure is large I wont to import IDOC structure to this DT automaticly. I try to eksport XSD structure of my IDOC and then import to data type but i can read the monit:
    The tag <element> is not allowed at <<xsd:schema><xsd:element><xsd:element>>.
    I'm beginer in XSD so I don't now how to change this file.
    Can somebody help me on that or explain whot I can do to make this DT.
    Thanks for answer!

    Hi,
    U can import the IDoc XSD to External defination and use it in your Message Mapping and Interfacing Mapping.
    There is no need to create a data type of message type for IDoc.
    External Defination
    <b>External Definition</b> enables you to import a local WSDL, XSD, or DTD file to the Integration Repository and specify which parts of the schema to be used as a description for a message.
    U can use this ED as
    1.Inbound/Outbound in the Message Interface.
    2.Source/Target structure for the Message Mapping.
    In a scenario If there is a necessitity for changing the Occurance of some segment of the IDOC steps u perform is.
    1.Import the IDoc to XI.
    2.Export the IDoc(i.e XSD format) and save it to the local machine.
    3.Make changes to the IDoc structure by modifying the XSD file in the local machine.
    4.Save it as an XSD file Itself.
    5.Import the XSD file in the IR under the External Defination.
    6.Use this XSD in your Message Interface/Mapping which is same as IDoc structure but with some changes that u have made.
    Go Thru this Blog <a href="/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change Bundling - Trick without BPM</a> BY Michal Krawczyk where the Occurance of the IDoc is changed to 1...Unbounded from 1...999999999 by using the XSD.
    Regards
    Santhosh
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Use a Good Subject Line, One Question Per Posting - Award Points

Maybe you are looking for

  • Calculate Base Valune in MIGO

    Dear Friends, While doing MIGO If user put all details of EXCISE Amount ( BED, ECS, HCESS etc. )  by manualy then can accordingly system CHANGE BASE VALUE  ? IF Yes,  Then tel me what do I do for that. Thanks & Regards. Yogi.

  • OVI Player question and compatibility

    First question, how do I install OVI Player on a PC that is not connected to the net, the downloadable installation file is only 1.1MB.           I only want the music transfer to the phone feature of OVI Player as this is not available in the PC sui

  • Disable period selection subscreen screen 1000

    Hi, I am trying to disable the period selection subscreen on screen 1000 (hr - pnp), so only the payroll period selection subscreen is visible. Can anyone help me? thanks, Nathalie

  • How to synchronize section within a sequence runnin over parallel model

    Have this sequence using the parallel model, I want to synchronize some section of it such that the steps been executed only in one of the executions; the Batch Synchronization steps didn't worked, apparently they work only if running the batch model

  • One printer two iMacs

    I have two iMacs. One is a G3 with OS 10.2.8 and the other one is a new G5 Inel IMac with OS 10.5.1. Both are hooked to a DLink four port router to get to the internet. I have an older HP PSC 1210v hooked up to the G3 iMac. Printer sharing is turned