4 Replies Latest reply on Sep 5, 2005 9:05 AM by 435488

    Interconnect not generating XML messages with attributes

    435488
      Hi.
      I am trying to publish a message from a Database adapter and subscribe to it
      from an FTP adapter.
      the DTD I am using is
      <!ELEMENT STUDY (STUDY_NAME, ItemRef)>
      <!ELEMENT STUDY_NAME (#PCDATA)>
      <!ELEMENT ItemRef EMPTY>
      <!ATTLIST ItemRef
      ItemOID CDATA #REQUIRED
      OrderNumber CDATA #IMPLIED
      Mandatory (Yes | No) #REQUIRED
      KeySequence CDATA #IMPLIED
      >
      I am able to design the message using iStudio. But the message fails in runtime with the log file of the DB adapter recording this error
      Fri Aug 19 17:22:55 GMT+05:30 2005: **Error: db_bridge_reader_1 had an unknown error while creating or sending the message 31. Please make sure your application always creates messages correctly. The message was not sent and will be deleted from the database. Please inspect the log files for the exact error information.
      oracle.oai.agent.common.AgentRuntimeException: Specified attribute (ItemRef) does not exist in Data Type (IVRS_PROTOCOL_SETUP3_OAI_V1_P:OAI/V1). Please use iStudio to check your mappings. It is possible that you have a mapping which uses this attribute even though you have deleted it from the Data Type. It is also possible that you have changed information in iStudio which the Adapter has not picked up yet because the Adapter has metadata caching turned on, in which case, you should Push Metadata from iStudio to this adapter.
           at oracle.oai.agent.common.AttributeObjectImpl.getAttributeInfo(AttributeObjectImpl.java:72)
           at oracle.oai.agent.adapter.database.DBMessageReader.readDBMessageUsingNewOaiSchema(DBMessageReader.java:578)
           at oracle.oai.agent.adapter.database.DBMessageReader.sendDBMessage(DBMessageReader.java:648)
           at oracle.oai.agent.adapter.database.DBMessageReader.run(DBMessageReader.java:243)
           at java.lang.Thread.run(Thread.java:534)
      Is there any way around this.
      Thanks for any help,
      Goel
        • 1. Re: Interconnect not generating XML messages with attributes
          416900
          Geol,

          How is DB side application view set up? Was it imported as a table definition table in your database?
          • 2. Re: Interconnect not generating XML messages with attributes
            435488
            Hi Ian,
            The DB application view was setup using the XML DTD.
            REgards
            Goel
            • 3. Re: Interconnect not generating XML messages with attributes
              416900
              Goel (got your name right this time!)

              I always try to base my DB Application view on a DB table, usually a staging table, rather than a DTD.

              e.g. Have your staging table look something like this....

              STUDY_NAME VARCHAR2(100)
              ItemRef_ItemOID NUMBER
              ItemRef_OrderNumber NUMBER
              ItemRef_Mandatory VARCHAR2(1)
              ItemRef_KeySequence NUMBER

              iStudio will then only create the following sql script containing a "Publish" Package. (A second script _TYPES.sql, will be empty).

              a. A crMsg_[your_event]_OAI_V1 procedure.
              b. A cr-[Line_object_name] function, and
              c. A pub_[your_event]_OAI_V1 procedure

              1. Call the crMsg_[your_event]_OAI_V1 procedure first. There will be ONE IN paramter, and two OUT parameters....
              IN Parameter
              - STUDY_NAME
              OUT Parameters
              - messageObjectID and
              - aoID
              2. Pass the messageObjectID and aoID into the cr_[Line_object_name], together with your Line data.

              3. For every Line record, loop and pass your data to the A cr-[Line_object_name] function, including the messageObjectID and aoID created in step 1. When your cursor loop exits then...

              4. Call the pub_[your_event]_OAI_V1 procedure.

              If you have based your DB View on an XML DTD, then probably iStudio has created 2 sql scripts that you need to compile.

              The first script will be similar to one described above. The other script (*_TYPES.sql) should contain the ItemRef Type your DB Adapter was complaining about.

              Have a look at both scripts generated by iStudio when you Exported the PL/SQL from iStudio.

              HTH
              Yan
              • 4. Re: Interconnect not generating XML messages with attributes
                435488
                Hi Yan,
                Thanks for your reply.
                I solved this by declaring a DTD with the attributes as XML tags on the Database adapter side and transformed them while mapping on the FTP adapter side.
                Rgds
                Goel