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.

Similar Messages

  • 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

  • How to generate an XML file following a XSD schema

    hi, i have a XML Schema (.xsd) and i have to generate automatically the structure of the XML according to the XSD Schema.I have been searching on the internet and found some solutions using XMLBeans and JAXB, but that`s not exactly what i am looking for. I use JDOM to parse XML and i'd wish to use only Jdom to generate XML if it's possible....Thank's

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • 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.

  • Manipulating xsd schemas through java api

    Hi,
    I am working on an aplication that requires on-line creation of new xsd schemas. I am looking for a package that will allow me to create such schemas (i dont want to have to understand all the schema logic myself and create just a regular xml document).
    I also require a way to be able to easily extract restrcitions regarding certain elements in the schema (i need to be able to answer questions such as what restrictions does X node have).
    Does anyone happen to know of a package that may help me?
    thanks!
    shahar

    Hi,
    I am working on an aplication that requires on-line creation of new xsd schemas. I am looking for a package that will allow me to create such schemas (i dont want to have to understand all the schema logic myself and create just a regular xml document).
    I also require a way to be able to easily extract restrcitions regarding certain elements in the schema (i need to be able to answer questions such as what restrictions does X node have).
    Does anyone happen to know of a package that may help me?
    thanks!
    shahar

  • Exception - Cannot Build Schema (Question)

    Friends,
    I have a quick question which is driving me crazy. New to SOA, please help.
    I defined a variable of type "element" by refering it to an pre-existing xsd. I know the xsd is valid. When I try to use the variable in an assign activiity it does not show the child element and gives error "Exception - Cannot build Schema". While creating variable I refer to element "FetchCustomerInfoResponse".
    Following is the xsd for your reference :-
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="FetchCustomerInfoResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="XYX_ONT_ACCOUNT_ORDERS">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="XYZ_ONT_ACCOUNT_ORDER" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:attribute name="ordered_date" type="xsd:string"/>
    <xsd:attribute name="cust_po_number" type="xsd:string"/>
    <xsd:attribute name="order_number" type="xsd:integer"/>
    <xsd:attribute name="header_id" type="xsd:integer"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    Hi,
    using the schema you gave, i was able to create a variable inside the BPEL by referring to the FetchCustomerInfoResponse element, and also i was able to do the copy operation inside the assign activity.
    Please try the same again, may be create the variable again...it should work...
    Thanks
    N

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Based on an xsd schema create a table

    Hi all,
    i need a way that allow me to create a table having an xsd file, in others word i load the xsd schema and create a table accordingly to the element that the xsd schema has respecting also the datatype of every element.
    Is the some functionality that allow me to do a thing like that?
    thanks to every one
    Francesco
    Italy

    I should now give the following output
    Connected.
    SQL> set termout on
    SQL> set feed on
    SQL>
    SQL> drop user test cascade;
    User dropped.
    SQL>
    SQL> purge dba_recyclebin;
    DBA Recyclebin purged.
    SQL>
    SQL> create user test identified by test;
    User created.
    SQL>
    SQL> grant xdbadmin, dba to test;
    Grant succeeded.
    SQL>
    SQL>
    SQL> connect test/test
    Connected.
    SQL>
    SQL> set echo on
    SQL> set termout on
    SQL> set feed on
    SQL> set long 100000
    SQL> set pages 5000
    SQL>
    SQL> var schemaPath varchar2(256)
    SQL> var schemaURL  varchar2(256)
    SQL>
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Create an XML Schema root.xsd in directory /public/
    SQL>
    SQL> ----------------------------------------------------------
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      6              xmlns:xdb="http://xmlns.oracle.com/xdb"
      7              elementFormDefault="qualified"
      8              attributeFormDefault="unqualified"
      9              xdb:storeVarrayAsTable="true">
    10   <xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
    11    <xs:annotation>
    12     <xs:documentation>Example XML Schema</xs:documentation>
    13    </xs:annotation>
    14    <xs:complexType xdb:maintainDOM="false">
    15     <xs:sequence>
    16      <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
    17      <xs:element ref="INFO" xdb:SQLInline="false" />
    18     </xs:sequence>
    19    </xs:complexType>
    20   </xs:element>
    21   <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
    22    <xs:complexType xdb:maintainDOM="false">
    23     <xs:sequence>
    24      <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
    25      <xs:element name="INFO_CONTENT"
    26                  xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
    27     </xs:sequence>
    28    </xs:complexType>
    29   </xs:element>
    30  </xs:schema>');
    31  begin
    32  if (dbms_xdb.existsResource(:schemaPath)) then
    33      dbms_xdb.deleteResource(:schemaPath);
    34  end if;
    35   res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    36  end;
    37  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Selecting repository files and folders via XDBUriType
    SQL>
    SQL> ----------------------------------------------------------
    SQL> select xdbURIType ('/public/root.xsd').getClob()
      2  from   dual;
    XDBURITYPE('/PUBLIC/ROOT.XSD').GETCLOB()
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.o
    racle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified"
    xdb:storeVarrayAsTable="true">
      <xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
        <xs:annotation>
          <xs:documentation>Example XML Schema</xs:documentation>
        </xs:annotation>
        <xs:complexType xdb:maintainDOM="false">
          <xs:sequence>
            <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
            <xs:element ref="INFO" xdb:SQLInline="false"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
        <xs:complexType xdb:maintainDOM="false">
          <xs:sequence>
            <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/
    >
            <xs:element name="INFO_CONTENT" xdb:SQLName="TYPE_INFO_CONTENT" type="xs
    :string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    1 row selected.
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Create an XML Document root.xml in directory /public/
    SQL>
    SQL> ----------------------------------------------------------
    SQL> begin
      2    :schemaURL := 'http://www.myserver.com/root.xml';
      3    :schemaPath := '/public/root.xml';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="root.xsd">
      6   <ID>0</ID>
      7   <INFO>
      8     <INFO_ID>0</INFO_ID>
      9     <INFO_CONTENT>Text</INFO_CONTENT>
    10   </INFO>
    11  </ROOT>');
    12  begin
    13  if (dbms_xdb.existsResource(:schemaPath)) then
    14      dbms_xdb.deleteResource(:schemaPath);
    15  end if;
    16   res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    17  end;
    18  /
    PL/SQL procedure successfully completed.
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Selecting repository files and folders via XDBUriType
    SQL>
    SQL> ----------------------------------------------------------
    SQL> select xdbURIType ('/public/root.xml').getClob()
      2  from   dual;
    XDBURITYPE('/PUBLIC/ROOT.XML').GETCLOB()
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchem
    aLocation="root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>
    1 row selected.
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Register the XML Schema and create the OR objects
    SQL>
    SQL> ----------------------------------------------------------
    SQL> select * from tab;
    no rows selected
    SQL> --
    SQL> alter session set events='31098 trace name context forever';
    Session altered.
    SQL> --
    SQL> BEGIN
      2   DBMS_XMLSCHEMA.registerSchema
      3   (SCHEMAURL => 'root.xsd',
      4    SCHEMADOC => xdbURIType('/public/root.xsd').getClob(),
      5    LOCAL     => FALSE, -- local
      6    GENTYPES  => TRUE,  -- generate object types
      7    GENBEAN   => FALSE, -- no java beans
      8    GENTABLES => TRUE,  -- generate object tables
      9    OWNER     => USER
    10   );
    11  END;
    12  /
    PL/SQL procedure successfully completed.
    SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    INFO1902_TAB                   TABLE
    INFO1904_TAB                   TABLE
    ROOT_TABLE                     TABLE
    3 rows selected.
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- Insert some data with XDBURIType
    SQL>
    SQL> ----------------------------------------------------------
    SQL> DECLARE
      2     XMLData xmlType := xmlType(xdbURIType ('/public/root.xml').getClob());
      3  BEGIN
      4    for i in 1..10
      5    loop
      6        insert into ROOT_TABLE
      7        VALUES
      8        (XMLData);
      9    end loop;
    10  END;
    11  /
    PL/SQL procedure successfully completed.
    SQL> -- randomize the data a little
    SQL> update ROOT_TABLE
      2  set object_value = updateXML(object_value,
      3                              '/ROOT/ID/text()',
      4                              substr(round(dbms_random.value*100),0,2)
      5                              );
    10 rows updated.
    SQL> update ROOT_TABLE
      2  set object_value = updateXML(object_value,
      3                              '/ROOT/INFO/INFO_ID/text()',
      4                              substr(round(dbms_random.value*100),0,2)
      5                              );
    10 rows updated.
    SQL> pause
    SQL> ----------------------------------------------------------
    SQL>
    SQL> -- End Result
    SQL>
    SQL> ----------------------------------------------------------
    SQL> select count(*) from root_table;
      COUNT(*)
            10
    1 row selected.
    SQL> select * from root_table where rownum <= 2;
    SYS_NC_ROWINFO$
    <?xml version="1.0" encoding="US-ASCII"?>
    <ROOT>
      <ID>54</ID>
      <INFO>
        <INFO_ID>28</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>
    <?xml version="1.0" encoding="US-ASCII"?>
    <ROOT>
      <ID>33</ID>
      <INFO>
        <INFO_ID>35</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>
    2 rows selected.
    SQL>

  • How to read a file with data in Hierarchical Structure using XSD Schema

    Hi
    We have requirement in which we have to read a FIXED LENGTH file with FILE ADAPTER. File contains the data in hierarchical structure. Hierarchy in the file is identified by the first 3 characters of every line which could be any of these : 000,001,002,003 and 004. Rest files are followed after these. So structure is like:
    000 -- Header of File. Will come only once in file. Length of this line is 43 characters
    -- 001 -- Sub Header. Child for 000. Can repeat in file. Length of this line is 51 characters
    --- 002 -- Detail record. Child for 001. Can repeat multiple times in given 001. Length of this line is 43 characters 1353
    -- 003 -- Sub Footer record at same level of 001. Will always come once with 001 record. Child for 000. Length of this line is 48 characters
    004 -- Footer of file.At same level of 000. Will come only once in file. Length of this line is 48 characters
    Requirement is to create an XSD which should validate this Hierarchical Structure also i.e data should come in this hierarchy only else raise an error while parsing the file.
    Now while configuring the FILE ADAPTER to read this file we are using Native Schema UI to create the XSD to parse this structure using an example data file. But we are not able to create a valid XSD for this file which should validate the Hierarchy also on the file.
    Pls provide any pointers or solution for this.
    Link to download the file, file structure details and XSD that we have created:
    https://docs.google.com/file/d/0B9mCtbxc3m-oUmZuSWRlUTBIcUE/edit?usp=sharing
    Thanks
    Amit Rattan
    Edited by: user11207269 on May 28, 2013 10:16 PM
    Edited by: user11207269 on May 28, 2013 10:31 PM
    Edited by: user11207269 on May 28, 2013 10:33 PM

    Heloo.. Can anyone help me on this. I need to do Hierarchial read / validation while reading the file using File Adapter using Native XSD schema.

  • XSD schema to xml file generation using C#

    Hi fellow developers,
    I need small help with my current scenario.
    I have 2 xsd schemas one is input and other is output.
    Now my requirement is based on those xsd template or structure, i need to write a C# code that takes the 1 xsd template as input in xml format and then do some mapping and then set that values to 2 xsd template in xml format.
    Can you please guide or assist in this regards ??
    It would be helpful if we have the flexibility of configuring the schema properties.

    Hi
    Venky_Ferrari.
    Based on your description, your case related to XMLXSD, SO I will move your thread to
    Data Platform Development > XML, System.Xml, MSXML and XmlLite      
    forum for better support.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Multiple Root elements in the XSD Schema

    Hi Dear MDM gurus,
    I have manually created an XSD Schema and I can import it in the Syndicator without any problem.
    I have 3 different Root elements in the schema that I want to use and map to the corresponding table of this type.
    In my Syndicator screen in the Rood dropdown box I can see all three of the Root elements that I have in the schema.
    If I select the first Root element - everything goes fine and I can do my mapping, save the map, etc.
    The problem is that if I select the second or third root element to do the mapping for them, the syndicator does not show the structure in the Item Mapping after that.
    I tried moving the Second root element of the schema and make it first and it works with it, but then the other two are not appearing and I have the same issue.
    Does MDM support only one Root element in the Schema? If that's the case, why does it show all three of them in the dropdown?
    Here is an example:
    1. If I have them in this order in my XSD
              <xs:element name="ManufacturerGroupNumber" type="ManufacturerGroupNumbers"/>
              <xs:element name="SupplierGroupNumber" type="SupplierGroupNumbers"/>
              <xs:element name="SupplierLocationNumber" type="Suppliers"/>
    I can only see the structure when I select the "ManufacturerGroupNumber".
    2. If I have them in the Schema in this order
              <xs:element name="SupplierLocationNumber" type="Suppliers"/>
              <xs:element name="SupplierGroupNumber" type="SupplierGroupNumbers"/>
              <xs:element name="ManufacturerGroupNumber" type="ManufacturerGroupNumbers"/>
    I can only see the structure when I select the first one again "SupplierLocationNumber" and I can only do the mapping for it.
    Any help would be appreciated.
    Thanks in advance,
    Boris

    Hello Satish,
    Thank you for your quick response.
    I read some of the architectural approaches and XML specifications and depending on your design, you may have only one Root element or in rare cases Several Root elements. In my case, I was advised by our PI experts to use Multiple Root elements and this gives me the following:
    Advantages:
    u2022 The reusability of the schema definition is available for all types and all elements defined in the global namespace.
    Disadvantages:
    u2022 Since there are many global elements, there are many valid XML documents.
    I initially had the schema as you suggested, but they didn't like it in PI and advised me to change it with having multiple roots.
    What I'm trying to figure out is if there is a bug in MDM that does not allow to use the rest of the root elements, so I can open an OSS message.
    Thanks,
    Boris

  • How to validate xml file with XSD schema ??  in JDK1.4.2

    How to validate xml file with XSD schema ?? in JDK1.4.2
    i dont want to use new Xerec Jar ...
    Suggest option ...

    Please do not double-post. http://forum.java.sun.com/thread.jspa?threadID=5134447&tstart=0
    Then use Stax (Woodstock) or Saxon.
    - Saish

  • Mapping Issue- XSD (schema to BAPI)

    Hi XI Experts ,
    Scenario : XSD (Schema priovided by external partners ->XI-> SAP BAPI) of PO Creation (ZBAPI of :BAPI_PO_CREATE1)
    -When the Cost centre data is 100%   ,the GL ACCOUNT , Cost centre , Quantity , PO ITEM , Cost Area should come in one Item Node of : PO_ACCOUNT  of BAPI
    -When Cost Centre data is split into 60% , 40% in Source , thE values should occur in 2 item nodeS , 1Item with 60,00 Data
    2 item(SECOND ITEM)  with 40,00 data
    I have used Remove context , Split by value and target looks fine.
    But the Quanity , PO_ITEM value does't  spilt into both the items. The Quanity , PO_ITEM is only in the first item node.
    how do I get the values in both item node under :POACCOUNT
    Thsi is sample  Quanity xml (Part of Source structure):
    <TotalQuantity>
                <Quantity>
                  <QuantityValue>1.000</QuantityValue>
                  <UnitOfMeasurement>
                    <UOMCoded>EA</UOMCoded>
                  </UnitOfMeasurement>
                </Quantity>
              </TotalQuantity>
    Currently this is how traget looks like
    <POACCOUNT>
    <item>
    <PO_ITEM>00001</PO_ITEM><SERIAL_NO>0001</SERIAL_NO><QUANTITY>1.000</QUANTITY><DISTR_PERC>60.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000313</COSTCENTER><CO_AREA>0510</CO_AREA>
    </item>
    <item>
    <SERIAL_NO>0002</SERIAL_NO><DISTR_PERC>40.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000318</COSTCENTER><CO_AREA>0510</CO_AREA>
    </item>
    </POACCOUNT>
    Here  PO_ITEM(0001) , Qaunity is missing in second item node and this is needed for me to occur to create PO in SAP.
    You input is highly appreciated.
    Thank you ,
    Vara

    Hi Amit ,
    I tried  the logic :
    If ReferenceCoded Item|  EQUALS | Constant(Percent) |if without else   then  RefNum ( Substring extract 40.00%, 60.00%) | Remove Context | Split by Value(Each Value) | DISTR_PERC (Percentage field of BAPI)
    This worked if there are two cost centre purchase data which passed gets split into  2line items
    Thank you ,
    Best Regards,
    Varalakshmi

  • Schema Validation on attributes of an element in XML againt XSD schema

    Hi,
    I had generated artifact java classes from XSD schema file.Now i am validatiing one sample XML document by using these classes in JAXB.The XML document is validated successfully.but only elements are validated ,but not attributes of that elements.for example ,i am giving wrong element which is not defined inside the schema file,it throws validation error as expected ,whereas validation against wrong attributes of elements in XML it is not working anyway,it does not throw any validation errors,but it should throw validation errors.kindly help me to solve this issue.
    Here The sample validation code snippets :
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.bind.ValidationEventLocator;
    public class MyEventHandler implements ValidationEventHandler{
         public boolean handleEvent(ValidationEvent ve) {
              if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
                        ve .getSeverity()==ValidationEvent.ERROR){
                   ValidationEventLocator locator = ve.getLocator();
                   //Print message from valdation event
                   System.out.println("Invalid booking document: "
                             + locator.getURL());
                   System.out.println("Error: " + ve.getMessage());
                   //Output line and column number
                   System.out.println("Error at column " +
                             locator.getColumnNumber() +
                             ", line "
                             + locator.getLineNumber());
              return true;
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new MyEventHandler());

    Here is my analagous 'strange' behavior. I am jaxb processing and then marshalling generated classes to XML ( following the simple Sun 'PurchaseOrder' example )
    1. This works:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'>
    </xsd:complextType>
    </xsd:schema>
    2. This doesn't:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'/>
    <xsd:attribute name='name2'/>
    </xsd:complextType>
    </xsd:schema>
    That is, using more than one attribute line within this simple complex type causes nothing to be marshalled to XML.
    Ideas?

  • Please add XSD Schema for validating TLF data in TLF 3.0

    It would be very beneficial to have a XSD schema for validating TLF data.  Please add this to TLF 3.0.  There are a couple of posts where others have already asked for this...
    http://forums.adobe.com/message/2795099#2795099
    http://forums.adobe.com/message/2223205
    Thanks!

    Sure Gang!
    We could use the XML schema to validate the TLF markup that we are generating from our publishing system.  We generate XML files which include the TLF markup and a XML schema would be very beneficial to validate that markup to make sure we are doing everything right.

Maybe you are looking for