JmsAdapter DOM Parsing Exception handling

Hi,
I'm currently facing a problem with the behaviour of the Jms Adapter.
Whenever a JMS message is put in the queue and that message is not XML valid, the Jms Adapter (consumer) throw the exception "DOM Parsing Exception in translator Exception".
That's fine, I understand that the message was not well formed. But what is not fine is that the underlying BPEL is not instanciated : meaning I can't handle the exception properly.
Is there a way to force the Jms Adapter not to crash on the DOM Parsing for the BPEL to be instanciated (and then being able to handle the exception there) ?
Or is there a way to handle the error thrown by the Jms Adapter itself ? How ?
I think I do have a workaround to this if there is no better option (if both above questions cannot be answered) but I would rather not implement it since it will involve some extra steps / complexity.
> It would be to check the "native format opaque schema" option and then use a java embedded to decode the base64 into a string for eventually parsing it.
regards,
mathieu

Hi Mathieu,
The messages that error out before being posted to the service infrastructure are referred to as rejected messages. For example, the Oracle File Adapter selects a file having data in CSV format and tries to translate it to XML format (using NXSD). If there is any error in the translation, this message is rejected and are not be posted to the target composite.
You can create rejection handlers to handle message errors. Message errors include those that occur during translation, correlation ID mismatch and XML parsing after message reception.
Docs on how to do that are here...
http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/life_cycle.htm#CIAIICJJ
Cheers,
Vlad

Similar Messages

  • Getting DOM Parsing Exception in translator while Dequeuing the message from JMS topic

    Hi All,
    Hope you all doing good.
    I have an issue.
    I am running on 11.1.1.5 SOA suite version on Linux.
    In my aplication I have 4 projects which are connected by with topic/queue.
    But in one of the communication, the JMS topic throws me the below error in the log, but dequeue happend perfectly fine and the application runs smoothly.
    [ERROR] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@530c530c] [userId: <anonymous>
    ] [ecid: 5552564bd7cf9140:-117a2347:142149c715a:-8000-00000000069dd133,0] [APP: soa-infra] JMSAdapter <project1>
    JmsConsumer_sendInboundMessage:[des
    tination = <TOPIC NAME>  subscriber = <Consumer project name>
    Error (DOM Parsing Exception in translator.[[
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
    ) while preparing to send XMLRecord JmsXMLRecord
    [ERROR] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@530c530c] [userId: <anonymous>
    ] [ecid: 5552564bd7cf9140:-117a2347:142149c715a:-8000-00000000069dd133,0] [APP: soa-infra] JMSAdapter <project name>
    java.lang.Exception: DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
            at oracle.tip.adapter.jms.inbound.JmsConsumer.translateFromNative(JmsConsumer.java:603)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.sendInboundMessage(JmsConsumer.java:403)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.send(JmsConsumer.java:1161)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.run(JmsConsumer.java:1048)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    But when I try putting the archived data on this topic, it throws me the same error but even dequeuing doesnt happen.
    I have extracted the payload and validated against the xsd, it looks fine and even the validator doesnt throw me any error.
    But I guess I am missing something, which I am immediately not getting.
    Please let me know, if I am soemthing here which is causing this erro.
    Thanks,
    Chandru

    I searched about this error, but no luck.
    First time when the message dequeues, the consumer can consume the message but throws the error in the log.
    But when I put the message back into queue from archive directory, the consumer doesnt consume message and throws me the same error.
    Does anyone faced this sort of issue.
    I checked my xsd throughly, and validated it externally. but didnt fine any error.
    if anyone knows, suggest me how to resolve this issue.
    thanks & regards
    Chandru

  • Integration between B2B and ESB error (DOM Parsing Exception in translator)

    Hello,
    We have configured a circuit that has the objective of sending a message to B2B and then the ESB dequeues that message from the IP_IN_QUEUE.
    The problem is that for some reason, the ESB cannot read message using the AQ Adapter object.
    The error is the following:
    DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    The trace is the following:
    ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139) at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819) at java.lang.Thread.run(Thread.java:595) Caused by: oracle.xml.parser.v2.XMLParseException: '=' missing in attribute. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.NonValidatingParser.parseAttrValue(NonValidatingParser.java:1609) at oracle.xml.parser.v2.NonValidatingParser.parseAttr(NonValidatingParser.java:1514) at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(NonValidatingParser.java:1447) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1286) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291) at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134) ... 8 more
    The Payload is the following:
    <?xml version="1.0" ?><OMG_O19 xmlns="urn:oracle:integration:b2b:C023D5B231EF45519AA3D9929B4990E1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" XDataVersion="2.0" Standard="HL7" Version="2.4" CreatedDate="2007-07-17T17:10:43" CreatedBy="ECXEngine_837" GUID="{D16D28B9-3821-4BCC-B4D9-0D92F8611BB5}"><Internal-Properties><Data-Structure Name="Message"><Lookup Name="MessageSendingApp">ALERT</Lookup><Lookup Name="MessageSendingAppUniversalID"></Lookup><Lookup Name="MessageSendingAppUniversalIDType"></Lookup><Lookup Name="MessageSendingFacility">CHVNG</Lookup><Lookup Name="MessageSendingFacilityUniversalID"></Lookup><Lookup Name="MessageSendingFacilityUniversalIDType"></Lookup><Lookup Name="MessageReceivingApp">RADIO</Lookup><Lookup Name="MessageReceivingAppUniversalID"></Lookup><Lookup Name="MessageReceivingAppUniversalIDType"></Lookup><Lookup Name="MessageReceivingFacility">CHVNG</Lookup><Lookup Name="MessageReceivingFacilityUniversalID"></Lookup><Lookup Name="MessageReceivingFacilityUniversalIDType"></Lookup><Lookup Name="MessageCode">OMG</Lookup><Lookup Name="TriggerEvent">O19</Lookup><Lookup Name="MessageStructure">OMG_O19</Lookup><Lookup Name="MessageVersion">2.4</Lookup><Lookup Name="InternatCodeID"></Lookup><Lookup Name="InternatCodeText"></Lookup><Lookup Name="InternatCodeSystem"></Lookup><Lookup Name="InternatCodeAlternateID"></Lookup><Lookup Name="InternatCodeAlternateText"></Lookup><Lookup Name="InternatCodeAlternateSystem"></Lookup><Lookup Name="InternationalVersionID"></Lookup><Lookup Name="InternationalVersionIDText"></Lookup><Lookup Name="InternationalVersionIDSystem"></Lookup><Lookup Name="InternationalVersionIDAlternateID"></Lookup><Lookup Name="InternationalVersionIDAlternateText"></Lookup><Lookup Name="InternationalVersionIDAlternateSystem"></Lookup><Lookup Name="Standard">HL7</Lookup><Property Name="MessageEncodingCharacters">^~\&amp;</Property><Property Name="MessageSendingApp">ALERT</Property><Property Name="MessageSendingAppUniversalID"></Property><Property Name="MessageSendingAppUniversalIDType"></Property><Property Name="MessageSendingFacility">CHVNG</Property><Property Name="MessageSendingFacilityUniversalID"></Property><Property Name="MessageSendingFacilityUniversalIDType"></Property><Property Name="MessageReceivingApp">RADIO</Property><Property Name="MessageReceivingAppUniversalID"></Property><Property Name="MessageReceivingAppUniversalIDType"></Property><Property Name="MessageReceivingFacility">CHVNG</Property><Property Name="MessageReceivingFacilityUniversalID"></Property><Property Name="MessageReceivingFacilityUniversalIDType"></Property><Property Name="MessageDate">20070705161247+0000</Property><Property Name="MessageDateTimePrecision"></Property><Property Name="MessageSecurity"></Property><Property Name="MessageCode">OMG</Property><Property Name="TriggerEvent">O19</Property><Property Name="MessageStructure">OMG_O19</Property><Property Name="MessageControlID">1709</Property><Property Name="ProcessingID">P</Property><Property Name="ProcessingMode"></Property><Property Name="MessageVersion">2.4</Property><Property Name="InternatCodeID"></Property><Property Name="InternatCodeText"></Property><Property Name="InternatCodeSystem"></Property><Property Name="InternatCodeAlternateID"></Property><Property Name="InternatCodeAlternateText"></Property><Property Name="InternatCodeAlternateSystem"></Property><Property Name="InternationalVersionID"></Property><Property Name="InternationalVersionIDText"></Property><Property Name="InternationalVersionIDSystem"></Property><Property Name="InternationalVersionIDAlternateID"></Property><Property Name="InternationalVersionIDAlternateText"></Property><Property Name="InternationalVersionIDAlternateSystem"></Property><Property Name="SequenceNumber"></Property><Property Name="ContinuationPointer"></Property><Property Name="AcceptAckType"></Property><Property Name="AppAckType"></Property><Property Name="CountryCode"></Property><Property Name="CharacterSet"></Property><Property Name="LanguageID"></Property><Property Name="LanguageText"></Property><Property Name="LanguageSystem"></Property><Property Name="LanguageAlternateID"></Property><Property Name="LanguageAlternateText"></Property><Property Name="LanguageAlternateSystem"></Property><Property Name="AlternateCharacterSetSchema"></Property><Property Name="ConformanceStatementID"></Property><Property Name="MessageProfileNamespaceID"></Property><Property Name="MessageProfileUniversalID"></Property><Property Name="MessageProfileUniversalIDType"></Property><Property Name="DecimalSeparator"></Property><Property Name="ElementDelimiter">0x7c</Property><Property Name="ReleaseCharacter">0x5c</Property><Property Name="RepeatingSeparator">0x7e</Property><Property Name="SegmentDelimiter">0xd</Property><Property Name="SubcomponentDelimiter">0x26</Property><Property Name="SubelementDelimiter">0x5e</Property></Data-Structure></Internal-Properties><MSH><MSH.1>|</MSH.1><MSH.2>^~\&amp;</MSH.2><MSH.3><HD.1>ALERT</HD.1></MSH.3><MSH.4><HD.1>CHVNG</HD.1></MSH.4><MSH.5><HD.1>RADIO</HD.1></MSH.5><MSH.6><HD.1>CHVNG</HD.1></MSH.6><MSH.7><TS.1>20070705161247+0000</TS.1></MSH.7><MSH.8 xsi:nil="true"></MSH.8><MSH.9><MSG.1>OMG</MSG.1><MSG.2>O19</MSG.2><MSG.3>OMG_O19</MSG.3></MSH.9><MSH.10>1709</MSH.10><MSH.11><PT.1>P</PT.1></MSH.11><MSH.12><VID.1>2.4</VID.1></MSH.12><MSH.13 xsi:nil="true"></MSH.13></MSH><Extra-
    PID><Extra-
    PID.1 xsi:nil="true"></Extra-
    PID.1><Extra-
    PID.2 xsi:nil="true"></Extra-
    PID.2><Extra-
    PID.3><Extra-
    PID.3.1>390971</Extra-
    PID.3.1><Extra-
    PID.3.2 xsi:nil="true"></Extra-
    PID.3.2><Extra-
    PID.3.3 xsi:nil="true"></Extra-
    PID.3.3><Extra-
    PID.3.4>CHVNG</Extra-
    PID.3.4><Extra-
    PID.3.5>NS</Extra-
    PID.3.5></Extra-
    PID.3><Extra-
    PID.4 xsi:nil="true"></Extra-
    PID.4><Extra-
    PID.5><Extra-
    PID.5.1>Santos</Extra-
    PID.5.1><Extra-
    PID.5.2>Paula</Extra-
    PID.5.2><Extra-
    PID.5.3>Cristina Silva Lopes</Extra-
    PID.5.3></Extra-
    PID.5><Extra-
    PID.6 xsi:nil="true"></Extra-
    PID.6><Extra-
    PID.7>19720117000000+0000</Extra-
    PID.7><Extra-
    PID.8 xsi:nil="true"></Extra-
    PID.8><Extra-
    PID.9 xsi:nil="true"></Extra-
    PID.9><Extra-
    PID.10 xsi:nil="true"></Extra-
    PID.10><Extra-
    PID.11><Extra-
    PID.11.1>R Bernardino Costa 358 Bl D Hab 04</Extra-
    PID.11.1><Extra-
    PID.11.2 xsi:nil="true"></Extra-
    PID.11.2><Extra-
    PID.11.3>Valadares</Extra-
    PID.11.3><Extra-
    PID.11.4 xsi:nil="true"></Extra-
    PID.11.4><Extra-
    PID.11.5>4405</Extra-
    PID.11.5></Extra-
    PID.11><Extra-
    PID.12 xsi:nil="true"></Extra-
    PID.12><Extra-
    PID.13 xsi:nil="true"></Extra-
    PID.13><Extra-
    PID.14 xsi:nil="true"></Extra-
    PID.14><Extra-
    PID.15 xsi:nil="true"></Extra-
    PID.15><Extra-
    PID.16 xsi:nil="true"></Extra-
    PID.16><Extra-
    PID.17 xsi:nil="true"></Extra-
    PID.17><Extra-
    PID.18>7011588</Extra-
    PID.18><Extra-
    PID.19 xsi:nil="true"></Extra-
    PID.19></Extra-
    PID><Extra-
    PV1><Extra-
    PV1.1 xsi:nil="true"></Extra-
    PV1.1><Extra-
    PV1.2>URG</Extra-
    PV1.2><Extra-
    PV1.3><Extra-
    PV1.3.1>1</Extra-
    PV1.3.1><Extra-
    PV1.3.2 xsi:nil="true"></Extra-
    PV1.3.2><Extra-
    PV1.3.3 xsi:nil="true"></Extra-
    PV1.3.3><Extra-
    PV1.3.4>CHVNG</Extra-
    PV1.3.4></Extra-
    PV1.3><Extra-
    PV1.4 xsi:nil="true"></Extra-
    PV1.4><Extra-
    PV1.5 xsi:nil="true"></Extra-
    PV1.5><Extra-
    PV1.6 xsi:nil="true"></Extra-
    PV1.6><Extra-
    PV1.7 xsi:nil="true"></Extra-
    PV1.7><Extra-
    PV1.8 xsi:nil="true"></Extra-
    PV1.8><Extra-
    PV1.9 xsi:nil="true"></Extra-
    PV1.9><Extra-
    PV1.10 xsi:nil="true"></Extra-
    PV1.10><Extra-
    PV1.11 xsi:nil="true"></Extra-
    PV1.11><Extra-
    PV1.12 xsi:nil="true"></Extra-
    PV1.12><Extra-
    PV1.13 xsi:nil="true"></Extra-
    PV1.13><Extra-
    PV1.14 xsi:nil="true"></Extra-
    PV1.14><Extra-
    PV1.15 xsi:nil="true"></Extra-
    PV1.15><Extra-
    PV1.16 xsi:nil="true"></Extra-
    PV1.16><Extra-
    PV1.17 xsi:nil="true"></Extra-
    PV1.17><Extra-
    PV1.18>URG</Extra-
    PV1.18><Extra-
    PV1.19><Extra-
    PV1.19.1>7088430</Extra-
    PV1.19.1><Extra-
    PV1.19.2 xsi:nil="true"></Extra-
    PV1.19.2><Extra-
    PV1.19.3 xsi:nil="true"></Extra-
    PV1.19.3><Extra-
    PV1.19.4>SONHO</Extra-
    PV1.19.4></Extra-
    PV1.19><Extra-
    PV1.20 xsi:nil="true"></Extra-
    PV1.20><Extra-
    PV1.21 xsi:nil="true"></Extra-
    PV1.21><Extra-
    PV1.22 xsi:nil="true"></Extra-
    PV1.22><Extra-
    PV1.23 xsi:nil="true"></Extra-
    PV1.23><Extra-
    PV1.24 xsi:nil="true"></Extra-
    PV1.24><Extra-
    PV1.25 xsi:nil="true"></Extra-
    PV1.25><Extra-
    PV1.26 xsi:nil="true"></Extra-
    PV1.26><Extra-
    PV1.27 xsi:nil="true"></Extra-
    PV1.27><Extra-
    PV1.28 xsi:nil="true"></Extra-
    PV1.28><Extra-
    PV1.29 xsi:nil="true"></Extra-
    PV1.29><Extra-
    PV1.30 xsi:nil="true"></Extra-
    PV1.30><Extra-
    PV1.31 xsi:nil="true"></Extra-
    PV1.31><Extra-
    PV1.32 xsi:nil="true"></Extra-
    PV1.32><Extra-
    PV1.33 xsi:nil="true"></Extra-
    PV1.33><Extra-
    PV1.34 xsi:nil="true"></Extra-
    PV1.34><Extra-
    PV1.35 xsi:nil="true"></Extra-
    PV1.35><Extra-
    PV1.36 xsi:nil="true"></Extra-
    PV1.36><Extra-
    PV1.37 xsi:nil="true"></Extra-
    PV1.37><Extra-
    PV1.38 xsi:nil="true"></Extra-
    PV1.38><Extra-
    PV1.39 xsi:nil="true"></Extra-
    PV1.39><Extra-
    PV1.40 xsi:nil="true"></Extra-
    PV1.40><Extra-
    PV1.41 xsi:nil="true"></Extra-
    PV1.41><Extra-
    PV1.42 xsi:nil="true"></Extra-
    PV1.42><Extra-
    PV1.43 xsi:nil="true"></Extra-
    PV1.43><Extra-
    PV1.44>20070705154838+0000</Extra-
    PV1.44><Extra-
    PV1.45 xsi:nil="true"></Extra-
    PV1.45><Extra-
    PV1.46 xsi:nil="true"></Extra-
    PV1.46><Extra-
    PV1.47 xsi:nil="true"></Extra-
    PV1.47><Extra-
    PV1.48 xsi:nil="true"></Extra-
    PV1.48><Extra-
    PV1.49 xsi:nil="true"></Extra-
    PV1.49><Extra-
    PV1.50 xsi:nil="true"></Extra-
    PV1.50><Extra-
    PV1.51>V</Extra-
    PV1.51><Extra-
    PV1.52 xsi:nil="true"></Extra-
    PV1.52></Extra-
    PV1><Extra-
    ORC><Extra-
    ORC.1>NW</Extra-
    ORC.1><Extra-
    ORC.2><Extra-
    ORC.2.1>19013</Extra-
    ORC.2.1><Extra-
    ORC.2.2>ALERT</Extra-
    ORC.2.2></Extra-
    ORC.2><Extra-
    ORC.3 xsi:nil="true"></Extra-
    ORC.3><Extra-
    ORC.4 xsi:nil="true"></Extra-
    ORC.4><Extra-
    ORC.5>NW</Extra-
    ORC.5><Extra-
    ORC.6 xsi:nil="true"></Extra-
    ORC.6><Extra-
    ORC.7 xsi:nil="true"></Extra-
    ORC.7><Extra-
    ORC.8 xsi:nil="true"></Extra-
    ORC.8><Extra-
    ORC.9 xsi:nil="true"></Extra-
    ORC.9><Extra-
    ORC.10 xsi:nil="true"></Extra-
    ORC.10><Extra-
    ORC.11 xsi:nil="true"></Extra-
    ORC.11><Extra-
    ORC.12><Extra-
    ORC.12.1>4292</Extra-
    ORC.12.1><Extra-
    ORC.12.2>Martinez</Extra-
    ORC.12.2><Extra-
    ORC.12.3>Cristina</Extra-
    ORC.12.3></Extra-
    ORC.12><Extra-
    ORC.13 xsi:nil="true"></Extra-
    ORC.13></Extra-
    ORC><Extra-
    OBR><Extra-
    OBR.1>1</Extra-
    OBR.1><Extra-
    OBR.2><Extra-
    OBR.2.1>19013</Extra-
    OBR.2.1><Extra-
    OBR.2.2>ALERT</Extra-
    OBR.2.2></Extra-
    OBR.2><Extra-
    OBR.3 xsi:nil="true"></Extra-
    OBR.3><Extra-
    OBR.4><Extra-
    OBR.4.1>10781</Extra-
    OBR.4.1><Extra-
    OBR.4.2>M<escape V="XE3"/>o direita, duas incid<escape V="XEA"/>ncias</Extra-
    OBR.4.2><Extra-
    OBR.4.3>CHVNG</Extra-
    OBR.4.3></Extra-
    OBR.4><Extra-
    OBR.5 xsi:nil="true"></Extra-
    OBR.5><Extra-
    OBR.6 xsi:nil="true"></Extra-
    OBR.6><Extra-
    OBR.7 xsi:nil="true"></Extra-
    OBR.7><Extra-
    OBR.8 xsi:nil="true"></Extra-
    OBR.8><Extra-
    OBR.9 xsi:nil="true"></Extra-
    OBR.9><Extra-
    OBR.10 xsi:nil="true"></Extra-
    OBR.10><Extra-
    OBR.11 xsi:nil="true"></Extra-
    OBR.11><Extra-
    OBR.12 xsi:nil="true"></Extra-
    OBR.12><Extra-
    OBR.13 xsi:nil="true"></Extra-
    OBR.13><Extra-
    OBR.14 xsi:nil="true"></Extra-
    OBR.14><Extra-
    OBR.15 xsi:nil="true"></Extra-
    OBR.15><Extra-
    OBR.16><Extra-
    OBR.16.1>4292</Extra-
    OBR.16.1><Extra-
    OBR.16.2>Martinez</Extra-
    OBR.16.2><Extra-
    OBR.16.3>Cristina</Extra-
    OBR.16.3></Extra-
    OBR.16><Extra-
    OBR.17 xsi:nil="true"></Extra-
    OBR.17><Extra-
    OBR.18 xsi:nil="true"></Extra-
    OBR.18><Extra-
    OBR.19 xsi:nil="true"></Extra-
    OBR.19><Extra-
    OBR.20 xsi:nil="true"></Extra-
    OBR.20><Extra-
    OBR.21 xsi:nil="true"></Extra-
    OBR.21><Extra-
    OBR.22 xsi:nil="true"></Extra-
    OBR.22><Extra-
    OBR.23 xsi:nil="true"></Extra-
    OBR.23><Extra-
    OBR.24 xsi:nil="true"></Extra-
    OBR.24><Extra-
    OBR.25 xsi:nil="true"></Extra-
    OBR.25><Extra-
    OBR.26 xsi:nil="true"></Extra-
    OBR.26><Extra-
    OBR.27><Extra-
    OBR.27.1 xsi:nil="true"></Extra-
    OBR.27.1><Extra-
    OBR.27.2 xsi:nil="true"></Extra-
    OBR.27.2><Extra-
    OBR.27.3 xsi:nil="true"></Extra-
    OBR.27.3><Extra-
    OBR.27.4>20070705161237+0000</Extra-
    OBR.27.4></Extra-
    OBR.27><Extra-
    OBR.28 xsi:nil="true"></Extra-
    OBR.28></Extra-
    OBR><Extra-
    NTE><Extra-
    NTE.1>1</Extra-
    NTE.1><Extra-
    NTE.2 xsi:nil="true"></Extra-
    NTE.2></Extra-
    NTE><Extra-
    DG1><Extra-
    DG1.1>1</Extra-
    DG1.1><Extra-
    DG1.2 xsi:nil="true"></Extra-
    DG1.2><Extra-
    DG1.3><Extra-
    DG1.3.1>9233</Extra-
    DG1.3.1><Extra-
    DG1.3.2>Contusao De Dedo Da Mao</Extra-
    DG1.3.2><Extra-
    DG1.3.3>ICD9</Extra-
    DG1.3.3></Extra-
    DG1.3><Extra-
    DG1.4 xsi:nil="true"></Extra-
    DG1.4><Extra-
    DG1.5 xsi:nil="true"></Extra-
    DG1.5><Extra-
    DG1.6>D</Extra-
    DG1.6></Extra-
    DG1></OMG_O19>
    I think that the problem should be because of the "Extra" (eg. <Extra-
    PID.1 xsi:nil="true">) word that B2B puts in every tag.
    The strange thing is that, this already worked until two days ago....
    What could it be?
    Thanks for your help.
    Best Regards,
    Nuno Fernandes

    Hello,
    We have configured a circuit that has the objective of sending a message to B2B and then the ESB dequeues that message from the IP_IN_QUEUE.
    The problem is that for some reason, the ESB cannot read message using the AQ Adapter object.
    The error is the following:
    DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    The trace is the following:
    ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:139) at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819) at java.lang.Thread.run(Thread.java:595) Caused by: oracle.xml.parser.v2.XMLParseException: '=' missing in attribute. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.NonValidatingParser.parseAttrValue(NonValidatingParser.java:1609) at oracle.xml.parser.v2.NonValidatingParser.parseAttr(NonValidatingParser.java:1514) at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(NonValidatingParser.java:1447) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1286) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291) at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:134) ... 8 more
    The Payload is the following:
    <?xml version="1.0" ?><OMG_O19 xmlns="urn:oracle:integration:b2b:C023D5B231EF45519AA3D9929B4990E1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" XDataVersion="2.0" Standard="HL7" Version="2.4" CreatedDate="2007-07-17T17:10:43" CreatedBy="ECXEngine_837" GUID="{D16D28B9-3821-4BCC-B4D9-0D92F8611BB5}"><Internal-Properties><Data-Structure Name="Message"><Lookup Name="MessageSendingApp">ALERT</Lookup><Lookup Name="MessageSendingAppUniversalID"></Lookup><Lookup Name="MessageSendingAppUniversalIDType"></Lookup><Lookup Name="MessageSendingFacility">CHVNG</Lookup><Lookup Name="MessageSendingFacilityUniversalID"></Lookup><Lookup Name="MessageSendingFacilityUniversalIDType"></Lookup><Lookup Name="MessageReceivingApp">RADIO</Lookup><Lookup Name="MessageReceivingAppUniversalID"></Lookup><Lookup Name="MessageReceivingAppUniversalIDType"></Lookup><Lookup Name="MessageReceivingFacility">CHVNG</Lookup><Lookup Name="MessageReceivingFacilityUniversalID"></Lookup><Lookup Name="MessageReceivingFacilityUniversalIDType"></Lookup><Lookup Name="MessageCode">OMG</Lookup><Lookup Name="TriggerEvent">O19</Lookup><Lookup Name="MessageStructure">OMG_O19</Lookup><Lookup Name="MessageVersion">2.4</Lookup><Lookup Name="InternatCodeID"></Lookup><Lookup Name="InternatCodeText"></Lookup><Lookup Name="InternatCodeSystem"></Lookup><Lookup Name="InternatCodeAlternateID"></Lookup><Lookup Name="InternatCodeAlternateText"></Lookup><Lookup Name="InternatCodeAlternateSystem"></Lookup><Lookup Name="InternationalVersionID"></Lookup><Lookup Name="InternationalVersionIDText"></Lookup><Lookup Name="InternationalVersionIDSystem"></Lookup><Lookup Name="InternationalVersionIDAlternateID"></Lookup><Lookup Name="InternationalVersionIDAlternateText"></Lookup><Lookup Name="InternationalVersionIDAlternateSystem"></Lookup><Lookup Name="Standard">HL7</Lookup><Property Name="MessageEncodingCharacters">^~\&amp;</Property><Property Name="MessageSendingApp">ALERT</Property><Property Name="MessageSendingAppUniversalID"></Property><Property Name="MessageSendingAppUniversalIDType"></Property><Property Name="MessageSendingFacility">CHVNG</Property><Property Name="MessageSendingFacilityUniversalID"></Property><Property Name="MessageSendingFacilityUniversalIDType"></Property><Property Name="MessageReceivingApp">RADIO</Property><Property Name="MessageReceivingAppUniversalID"></Property><Property Name="MessageReceivingAppUniversalIDType"></Property><Property Name="MessageReceivingFacility">CHVNG</Property><Property Name="MessageReceivingFacilityUniversalID"></Property><Property Name="MessageReceivingFacilityUniversalIDType"></Property><Property Name="MessageDate">20070705161247+0000</Property><Property Name="MessageDateTimePrecision"></Property><Property Name="MessageSecurity"></Property><Property Name="MessageCode">OMG</Property><Property Name="TriggerEvent">O19</Property><Property Name="MessageStructure">OMG_O19</Property><Property Name="MessageControlID">1709</Property><Property Name="ProcessingID">P</Property><Property Name="ProcessingMode"></Property><Property Name="MessageVersion">2.4</Property><Property Name="InternatCodeID"></Property><Property Name="InternatCodeText"></Property><Property Name="InternatCodeSystem"></Property><Property Name="InternatCodeAlternateID"></Property><Property Name="InternatCodeAlternateText"></Property><Property Name="InternatCodeAlternateSystem"></Property><Property Name="InternationalVersionID"></Property><Property Name="InternationalVersionIDText"></Property><Property Name="InternationalVersionIDSystem"></Property><Property Name="InternationalVersionIDAlternateID"></Property><Property Name="InternationalVersionIDAlternateText"></Property><Property Name="InternationalVersionIDAlternateSystem"></Property><Property Name="SequenceNumber"></Property><Property Name="ContinuationPointer"></Property><Property Name="AcceptAckType"></Property><Property Name="AppAckType"></Property><Property Name="CountryCode"></Property><Property Name="CharacterSet"></Property><Property Name="LanguageID"></Property><Property Name="LanguageText"></Property><Property Name="LanguageSystem"></Property><Property Name="LanguageAlternateID"></Property><Property Name="LanguageAlternateText"></Property><Property Name="LanguageAlternateSystem"></Property><Property Name="AlternateCharacterSetSchema"></Property><Property Name="ConformanceStatementID"></Property><Property Name="MessageProfileNamespaceID"></Property><Property Name="MessageProfileUniversalID"></Property><Property Name="MessageProfileUniversalIDType"></Property><Property Name="DecimalSeparator"></Property><Property Name="ElementDelimiter">0x7c</Property><Property Name="ReleaseCharacter">0x5c</Property><Property Name="RepeatingSeparator">0x7e</Property><Property Name="SegmentDelimiter">0xd</Property><Property Name="SubcomponentDelimiter">0x26</Property><Property Name="SubelementDelimiter">0x5e</Property></Data-Structure></Internal-Properties><MSH><MSH.1>|</MSH.1><MSH.2>^~\&amp;</MSH.2><MSH.3><HD.1>ALERT</HD.1></MSH.3><MSH.4><HD.1>CHVNG</HD.1></MSH.4><MSH.5><HD.1>RADIO</HD.1></MSH.5><MSH.6><HD.1>CHVNG</HD.1></MSH.6><MSH.7><TS.1>20070705161247+0000</TS.1></MSH.7><MSH.8 xsi:nil="true"></MSH.8><MSH.9><MSG.1>OMG</MSG.1><MSG.2>O19</MSG.2><MSG.3>OMG_O19</MSG.3></MSH.9><MSH.10>1709</MSH.10><MSH.11><PT.1>P</PT.1></MSH.11><MSH.12><VID.1>2.4</VID.1></MSH.12><MSH.13 xsi:nil="true"></MSH.13></MSH><Extra-
    PID><Extra-
    PID.1 xsi:nil="true"></Extra-
    PID.1><Extra-
    PID.2 xsi:nil="true"></Extra-
    PID.2><Extra-
    PID.3><Extra-
    PID.3.1>390971</Extra-
    PID.3.1><Extra-
    PID.3.2 xsi:nil="true"></Extra-
    PID.3.2><Extra-
    PID.3.3 xsi:nil="true"></Extra-
    PID.3.3><Extra-
    PID.3.4>CHVNG</Extra-
    PID.3.4><Extra-
    PID.3.5>NS</Extra-
    PID.3.5></Extra-
    PID.3><Extra-
    PID.4 xsi:nil="true"></Extra-
    PID.4><Extra-
    PID.5><Extra-
    PID.5.1>Santos</Extra-
    PID.5.1><Extra-
    PID.5.2>Paula</Extra-
    PID.5.2><Extra-
    PID.5.3>Cristina Silva Lopes</Extra-
    PID.5.3></Extra-
    PID.5><Extra-
    PID.6 xsi:nil="true"></Extra-
    PID.6><Extra-
    PID.7>19720117000000+0000</Extra-
    PID.7><Extra-
    PID.8 xsi:nil="true"></Extra-
    PID.8><Extra-
    PID.9 xsi:nil="true"></Extra-
    PID.9><Extra-
    PID.10 xsi:nil="true"></Extra-
    PID.10><Extra-
    PID.11><Extra-
    PID.11.1>R Bernardino Costa 358 Bl D Hab 04</Extra-
    PID.11.1><Extra-
    PID.11.2 xsi:nil="true"></Extra-
    PID.11.2><Extra-
    PID.11.3>Valadares</Extra-
    PID.11.3><Extra-
    PID.11.4 xsi:nil="true"></Extra-
    PID.11.4><Extra-
    PID.11.5>4405</Extra-
    PID.11.5></Extra-
    PID.11><Extra-
    PID.12 xsi:nil="true"></Extra-
    PID.12><Extra-
    PID.13 xsi:nil="true"></Extra-
    PID.13><Extra-
    PID.14 xsi:nil="true"></Extra-
    PID.14><Extra-
    PID.15 xsi:nil="true"></Extra-
    PID.15><Extra-
    PID.16 xsi:nil="true"></Extra-
    PID.16><Extra-
    PID.17 xsi:nil="true"></Extra-
    PID.17><Extra-
    PID.18>7011588</Extra-
    PID.18><Extra-
    PID.19 xsi:nil="true"></Extra-
    PID.19></Extra-
    PID><Extra-
    PV1><Extra-
    PV1.1 xsi:nil="true"></Extra-
    PV1.1><Extra-
    PV1.2>URG</Extra-
    PV1.2><Extra-
    PV1.3><Extra-
    PV1.3.1>1</Extra-
    PV1.3.1><Extra-
    PV1.3.2 xsi:nil="true"></Extra-
    PV1.3.2><Extra-
    PV1.3.3 xsi:nil="true"></Extra-
    PV1.3.3><Extra-
    PV1.3.4>CHVNG</Extra-
    PV1.3.4></Extra-
    PV1.3><Extra-
    PV1.4 xsi:nil="true"></Extra-
    PV1.4><Extra-
    PV1.5 xsi:nil="true"></Extra-
    PV1.5><Extra-
    PV1.6 xsi:nil="true"></Extra-
    PV1.6><Extra-
    PV1.7 xsi:nil="true"></Extra-
    PV1.7><Extra-
    PV1.8 xsi:nil="true"></Extra-
    PV1.8><Extra-
    PV1.9 xsi:nil="true"></Extra-
    PV1.9><Extra-
    PV1.10 xsi:nil="true"></Extra-
    PV1.10><Extra-
    PV1.11 xsi:nil="true"></Extra-
    PV1.11><Extra-
    PV1.12 xsi:nil="true"></Extra-
    PV1.12><Extra-
    PV1.13 xsi:nil="true"></Extra-
    PV1.13><Extra-
    PV1.14 xsi:nil="true"></Extra-
    PV1.14><Extra-
    PV1.15 xsi:nil="true"></Extra-
    PV1.15><Extra-
    PV1.16 xsi:nil="true"></Extra-
    PV1.16><Extra-
    PV1.17 xsi:nil="true"></Extra-
    PV1.17><Extra-
    PV1.18>URG</Extra-
    PV1.18><Extra-
    PV1.19><Extra-
    PV1.19.1>7088430</Extra-
    PV1.19.1><Extra-
    PV1.19.2 xsi:nil="true"></Extra-
    PV1.19.2><Extra-
    PV1.19.3 xsi:nil="true"></Extra-
    PV1.19.3><Extra-
    PV1.19.4>SONHO</Extra-
    PV1.19.4></Extra-
    PV1.19><Extra-
    PV1.20 xsi:nil="true"></Extra-
    PV1.20><Extra-
    PV1.21 xsi:nil="true"></Extra-
    PV1.21><Extra-
    PV1.22 xsi:nil="true"></Extra-
    PV1.22><Extra-
    PV1.23 xsi:nil="true"></Extra-
    PV1.23><Extra-
    PV1.24 xsi:nil="true"></Extra-
    PV1.24><Extra-
    PV1.25 xsi:nil="true"></Extra-
    PV1.25><Extra-
    PV1.26 xsi:nil="true"></Extra-
    PV1.26><Extra-
    PV1.27 xsi:nil="true"></Extra-
    PV1.27><Extra-
    PV1.28 xsi:nil="true"></Extra-
    PV1.28><Extra-
    PV1.29 xsi:nil="true"></Extra-
    PV1.29><Extra-
    PV1.30 xsi:nil="true"></Extra-
    PV1.30><Extra-
    PV1.31 xsi:nil="true"></Extra-
    PV1.31><Extra-
    PV1.32 xsi:nil="true"></Extra-
    PV1.32><Extra-
    PV1.33 xsi:nil="true"></Extra-
    PV1.33><Extra-
    PV1.34 xsi:nil="true"></Extra-
    PV1.34><Extra-
    PV1.35 xsi:nil="true"></Extra-
    PV1.35><Extra-
    PV1.36 xsi:nil="true"></Extra-
    PV1.36><Extra-
    PV1.37 xsi:nil="true"></Extra-
    PV1.37><Extra-
    PV1.38 xsi:nil="true"></Extra-
    PV1.38><Extra-
    PV1.39 xsi:nil="true"></Extra-
    PV1.39><Extra-
    PV1.40 xsi:nil="true"></Extra-
    PV1.40><Extra-
    PV1.41 xsi:nil="true"></Extra-
    PV1.41><Extra-
    PV1.42 xsi:nil="true"></Extra-
    PV1.42><Extra-
    PV1.43 xsi:nil="true"></Extra-
    PV1.43><Extra-
    PV1.44>20070705154838+0000</Extra-
    PV1.44><Extra-
    PV1.45 xsi:nil="true"></Extra-
    PV1.45><Extra-
    PV1.46 xsi:nil="true"></Extra-
    PV1.46><Extra-
    PV1.47 xsi:nil="true"></Extra-
    PV1.47><Extra-
    PV1.48 xsi:nil="true"></Extra-
    PV1.48><Extra-
    PV1.49 xsi:nil="true"></Extra-
    PV1.49><Extra-
    PV1.50 xsi:nil="true"></Extra-
    PV1.50><Extra-
    PV1.51>V</Extra-
    PV1.51><Extra-
    PV1.52 xsi:nil="true"></Extra-
    PV1.52></Extra-
    PV1><Extra-
    ORC><Extra-
    ORC.1>NW</Extra-
    ORC.1><Extra-
    ORC.2><Extra-
    ORC.2.1>19013</Extra-
    ORC.2.1><Extra-
    ORC.2.2>ALERT</Extra-
    ORC.2.2></Extra-
    ORC.2><Extra-
    ORC.3 xsi:nil="true"></Extra-
    ORC.3><Extra-
    ORC.4 xsi:nil="true"></Extra-
    ORC.4><Extra-
    ORC.5>NW</Extra-
    ORC.5><Extra-
    ORC.6 xsi:nil="true"></Extra-
    ORC.6><Extra-
    ORC.7 xsi:nil="true"></Extra-
    ORC.7><Extra-
    ORC.8 xsi:nil="true"></Extra-
    ORC.8><Extra-
    ORC.9 xsi:nil="true"></Extra-
    ORC.9><Extra-
    ORC.10 xsi:nil="true"></Extra-
    ORC.10><Extra-
    ORC.11 xsi:nil="true"></Extra-
    ORC.11><Extra-
    ORC.12><Extra-
    ORC.12.1>4292</Extra-
    ORC.12.1><Extra-
    ORC.12.2>Martinez</Extra-
    ORC.12.2><Extra-
    ORC.12.3>Cristina</Extra-
    ORC.12.3></Extra-
    ORC.12><Extra-
    ORC.13 xsi:nil="true"></Extra-
    ORC.13></Extra-
    ORC><Extra-
    OBR><Extra-
    OBR.1>1</Extra-
    OBR.1><Extra-
    OBR.2><Extra-
    OBR.2.1>19013</Extra-
    OBR.2.1><Extra-
    OBR.2.2>ALERT</Extra-
    OBR.2.2></Extra-
    OBR.2><Extra-
    OBR.3 xsi:nil="true"></Extra-
    OBR.3><Extra-
    OBR.4><Extra-
    OBR.4.1>10781</Extra-
    OBR.4.1><Extra-
    OBR.4.2>M<escape V="XE3"/>o direita, duas incid<escape V="XEA"/>ncias</Extra-
    OBR.4.2><Extra-
    OBR.4.3>CHVNG</Extra-
    OBR.4.3></Extra-
    OBR.4><Extra-
    OBR.5 xsi:nil="true"></Extra-
    OBR.5><Extra-
    OBR.6 xsi:nil="true"></Extra-
    OBR.6><Extra-
    OBR.7 xsi:nil="true"></Extra-
    OBR.7><Extra-
    OBR.8 xsi:nil="true"></Extra-
    OBR.8><Extra-
    OBR.9 xsi:nil="true"></Extra-
    OBR.9><Extra-
    OBR.10 xsi:nil="true"></Extra-
    OBR.10><Extra-
    OBR.11 xsi:nil="true"></Extra-
    OBR.11><Extra-
    OBR.12 xsi:nil="true"></Extra-
    OBR.12><Extra-
    OBR.13 xsi:nil="true"></Extra-
    OBR.13><Extra-
    OBR.14 xsi:nil="true"></Extra-
    OBR.14><Extra-
    OBR.15 xsi:nil="true"></Extra-
    OBR.15><Extra-
    OBR.16><Extra-
    OBR.16.1>4292</Extra-
    OBR.16.1><Extra-
    OBR.16.2>Martinez</Extra-
    OBR.16.2><Extra-
    OBR.16.3>Cristina</Extra-
    OBR.16.3></Extra-
    OBR.16><Extra-
    OBR.17 xsi:nil="true"></Extra-
    OBR.17><Extra-
    OBR.18 xsi:nil="true"></Extra-
    OBR.18><Extra-
    OBR.19 xsi:nil="true"></Extra-
    OBR.19><Extra-
    OBR.20 xsi:nil="true"></Extra-
    OBR.20><Extra-
    OBR.21 xsi:nil="true"></Extra-
    OBR.21><Extra-
    OBR.22 xsi:nil="true"></Extra-
    OBR.22><Extra-
    OBR.23 xsi:nil="true"></Extra-
    OBR.23><Extra-
    OBR.24 xsi:nil="true"></Extra-
    OBR.24><Extra-
    OBR.25 xsi:nil="true"></Extra-
    OBR.25><Extra-
    OBR.26 xsi:nil="true"></Extra-
    OBR.26><Extra-
    OBR.27><Extra-
    OBR.27.1 xsi:nil="true"></Extra-
    OBR.27.1><Extra-
    OBR.27.2 xsi:nil="true"></Extra-
    OBR.27.2><Extra-
    OBR.27.3 xsi:nil="true"></Extra-
    OBR.27.3><Extra-
    OBR.27.4>20070705161237+0000</Extra-
    OBR.27.4></Extra-
    OBR.27><Extra-
    OBR.28 xsi:nil="true"></Extra-
    OBR.28></Extra-
    OBR><Extra-
    NTE><Extra-
    NTE.1>1</Extra-
    NTE.1><Extra-
    NTE.2 xsi:nil="true"></Extra-
    NTE.2></Extra-
    NTE><Extra-
    DG1><Extra-
    DG1.1>1</Extra-
    DG1.1><Extra-
    DG1.2 xsi:nil="true"></Extra-
    DG1.2><Extra-
    DG1.3><Extra-
    DG1.3.1>9233</Extra-
    DG1.3.1><Extra-
    DG1.3.2>Contusao De Dedo Da Mao</Extra-
    DG1.3.2><Extra-
    DG1.3.3>ICD9</Extra-
    DG1.3.3></Extra-
    DG1.3><Extra-
    DG1.4 xsi:nil="true"></Extra-
    DG1.4><Extra-
    DG1.5 xsi:nil="true"></Extra-
    DG1.5><Extra-
    DG1.6>D</Extra-
    DG1.6></Extra-
    DG1></OMG_O19>
    I think that the problem should be because of the "Extra" (eg. <Extra-
    PID.1 xsi:nil="true">) word that B2B puts in every tag.
    The strange thing is that, this already worked until two days ago....
    What could it be?
    Thanks for your help.
    Best Regards,
    Nuno Fernandes

  • DOM Parsing Exception in translator. Dequeuing is failing

    Hi,
    -> I am working on EDI HIPPA File Protocol.
    -> My b2b configuration is working. I am getting the payload xml in IP_IN_QUEUE.
    But ESB with AQAdaptor is failing giving the below Exception.
    -> ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:202) at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814) at java.lang.Thread.run(Thread.java:595) Caused by: oracle.xml.parser.v2.XMLParseException: Expected name instead of >. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1151) at oracle.xml.parser.v2.XMLReader.scanQName(XMLReader.java:1928) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291) at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:197)
    -> I have taken the payload xml from rejectedMessages folder from SOA HOME and written a DOM Parser program
    to parse that file.It is throwing org.xml.sax.SAXParseException.
    -> I validated this xml with xsd I provide both in Oracle B2b config and in ESB using Altova software, it is throwing errors saying the xml is not valid.
    -> So I understood that xml which is gettign generated is not the valid one.
    Could you please tell me if I have to make any changes.
    Thanks
    Praveena

    Hi Dheeraj,
    I did this, I have selected Oracle Integration B2B while generating the xsd, then saved the xsd and then saved ecs.
    I gave these ecs and xsd file in my Oracle B2B configruation for Document protocol page.
    Then also, I parsed the file which is generated.It is failing in parsing.
    I can see that set of empty tags <></> are getting generated before <Segment-SE> tag and after <Loop-2000> as shown below:
    </Loop-2100></Loop-2000>&lt&gt&lt/&gt<Segment-SE><Element-96>
    (I don't why I am able to see symbols for tags when I am editing this message but once I save the message it is not shown in the forum.actually empty tags are getting geneated.)
    I removed these empty tags and parsed it again, then it is parsed successfully.
    Could you please tell me what I need to do for not generating these extra empty tags.
    my xsd looks as below(pastign for this particular part:
    <xsd:element name="Transaction-835">
    <xsd:annotation>
    <xsd:documentation>Health Care Claim Payment/Advice</xsd:documentation>
    <xsd:documentation>This Draft Standard for Trial Use contains the format and establishes the data contents of the Health Care Claim Payment/Advice Transaction Set (835) for use within the context of the Electronic Data Interchange (EDI) environment. This transaction set can be used to make a payment, send an Explanation of Benefits (EOB) remittance advice, or make a payment and send an EOB remittance advice only from a health insurer to a health care provider either directly or via a financial institution.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="Internal-Properties" minOccurs="0"/>
    <xsd:element ref="Segment-ST"/>
    <xsd:element ref="Segment-BPR"/>
    <xsd:element ref="Segment-TRN"/>
    <xsd:element ref="Segment-REF" minOccurs="0"/>
    <xsd:element ref="Segment-DTM" minOccurs="0"/>
    <xsd:choice maxOccurs="2" minOccurs="2">
    <xsd:element ref="Loop-1000A"/>
    <xsd:element ref="Loop-1000B"/>
    </xsd:choice>
    <xsd:element ref="Loop-2000" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element ref="Segment-SE"/>
    </xsd:sequence>
    <xsd:attribute name="Type" default="Transaction" type="xsd:string"/>
    <xsd:attribute name="XDataVersion" fixed="1.0" type="xsd:string"/>
    <xsd:attribute name="Standard" fixed="HIPAA" type="xsd:string"/>
    <xsd:attribute name="Version" default="V4010X091A1" type="xsd:string"/>
    <xsd:attribute name="GUID" default="" type="xsd:string"/>
    <xsd:attribute name="CreatedBy" type="xsd:string"/>
    <xsd:attribute name="CreatedDate" type="xsd:dateTime"/>
    </xsd:complexType>
    </xsd:element>
    Edited by: Praveena Paruchuru on Mar 10, 2009 6:33 AM
    Edited by: Praveena Paruchuru on Mar 10, 2009 6:49 AM

  • DOM Parsing Exception in translator

    Hi
    We are hitting one issue in B2B/SOA 11g.
    BPEL instance is not getting created in 11g. Messages are picked from B2B queue and BPEL is failing while dequeing.
    It says that
    DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Please make sure that the xml data is valid.
    Is it due to large size of the message. I have seen the message size and it is more than 3 MB.
    Pls help
    Thanks
    Simarjeet

    Hi Anuj
    I have analysed the issue in detail. B2B is not generating the payload for one of the message so dequeue is failing and message is rejected.
    Say in one EDI file, we have 6 messages then B2B is able to create 6 separate messages while debatching but one of the message payload is empty. Error in log is
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
         at oracle.tip.adapter.aq.v2.database.MessageConverter.translateMessageBytes(MessageConverter.java:510)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.getSTRUCTPayload(MessageConverter.java:404)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.getPayload(MessageConverter.java:139)
         at oracle.tip.adapter.aq.v2.database.XMLRecordMessageConverter.getRecord(XMLRecordMessageConverter.java:88)
         at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent.getInputRecord(AbstractDequeueAgent.java:236)
         at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent.run(AbstractDequeueAgent.java:101)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:607)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.translateMessageBytes(MessageConverter.java:506)
         ... 8 more
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:380)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:321)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:601)
         ... 9 more
    I have also tested the file using various modes unix/pc and ansi/utf-8 encoding. Is this issue related with performance tuning, tablespace etc?

  • DOM parsing exception in inbound XSD translator while parsing InputStream.

    Hi
    I am using 10.1.3.3.0 version of SOA Suite.
    I deployed my ESB which is having AQ adaptor.
    I have correctlry given the XSD.The input xml which is coming to this AQ adaptor will be as per the XSD I supplied but it is still throwing this error.
    Can anybody tell me if I have to instqall any patch for this?
    or any solution for this.
    Thanks
    Praveena

    Hi
    I am using 10.1.3.3.0 version of SOA Suite.
    I deployed my ESB which is having AQ adaptor.
    I have correctlry given the XSD.The input xml which is coming to this AQ adaptor will be as per the XSD I supplied but it is still throwing this error.
    Can anybody tell me if I have to instqall any patch for this?
    or any solution for this.
    Thanks
    Praveena

  • White spaces handling by WL DOM parser

    hi,
    Does anybody has some ideas about how to preserve white spaces if they
    appear in the xml data. i tried xml:space='preserve' option but it do not
    seems to work. I am using WL DOM parser.
    /thanks Tapan

    In case anybody is interested here is what I've been able to find...thanks to a little helpful book "XML and Java 2nd Edition" [Maruyama, Tamra, Uramoto, Murata, Clark]
    Since I'm using a SAX parser the example doesn't really help. However the book references a DOM parser and uses a "getIsIgnorableWhitespace()" method which as my luck may have it is not available in SAX...
    The book goes on to state there are two ways to tell an XML processor or an application if certain whitespace is significant:
    1) "Define the significant whitespace in the content models in the DTD"
    2) "Specify the xml:space="preserve" attribute in an XML document in order to indicate the intent that applications preservce all whitespace"
    Can anybody elaborate on the above, especially #1 or even provide an example that would work with SAX. Thanks...

  • Context change by DOM parsing Java Mapping in XI

    Hi Team,
    I would like to know that how can I handle Context Change by DOM Parser Java Mapping in XI.?
    Suppose  the source XML structure I have like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <FileName>
          <filesub>
             <subname>a</subname>
             <subname>b</subname>
             <subname>c</subname>
          </filesub>
       </FileName>
       <FileName>
          <filesub>
             <subname>d</subname>
             <subname>e</subname>
             <subname>f</subname>
          </filesub>
       </FileName>
    </ns0:Header>
    Where the field FileName can occur maximum thrice(0...3) but the subname field is (0....unbounded) but in the target source I would like to have as given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
        </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
       </Header>
    Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
       </Header>
    </MT_Test4>
    That means the first value from every context of the source field is forming my first and second value in my target first context.Thensecond value from every context is forming my 1st and 2nd value of my target 2nd context and finally 3rd value of every context is forming my 1st and 2nd value of my target 3rd context.Is this possible to done through DOM parsing or we have to do it by UDF only?

    Hi Atanu,
        In my last post I gave an alogorithm to solve the mapping problem. Here is the complete program for the mapping.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class DOMParser1  implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /input document in form of XML/
                   Document docIn=builderel.parse(in);
                   /document after parsing/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1=null;
                   Node textChild;
                   NodeList l;
                   int i,n1,j,div,k;
                   String s[];
                   root=docOut.createElement("MT_Test4");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   l=docIn.getElementsByTagName("subname");
                   n1=l.getLength();
                   s=new String[n1];
                   for(i=0;i<n1;++i)
                             s<i>=l.item(i).getFirstChild().getNodeValue();
                   l=docIn.getElementsByTagName("filesub");
                   div=l.getLength();
                   j=n1/div;
                   for(i=0,k=0;i<j;++i)
                        child1=docOut.createElement("Header");
                        root.appendChild(child1);
                        child=docOut.createElement("FileName");
                        textChild=docOut.createTextNode(s[k]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        child=docOut.createElement("FileName1");
                        textChild=docOut.createTextNode(s [ k + j ]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        ++k;
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));     
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
         public static void main(String[] args) {
              try{
                   DOMParser1 genFormat=new DOMParser1();
                   FileInputStream in=new FileInputStream("C:/Apps/my dw/sdnq/apps.xml");
                   FileOutputStream out=new FileOutputStream("C:/Apps/my dw/sdnq/tgt1.xml");
                   genFormat.execute(in,out);
              catch(Exception e)
                   e.printStackTrace();
    source ->  apps.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    - <FileName>
    - <filesub>
      <subname>a</subname>
      <subname>b</subname>
      <subname>c</subname>
      </filesub>
      </FileName>
    - <FileName>
    - <filesub>
      <subname>d</subname>
      <subname>e</subname>
      <subname>f</subname>
      </filesub>
      </FileName>
      </ns0:Header>
    target structure ->  tgt1.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
      </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
      </Header>
    - <Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
      </Header>
      </MT_Test4>
    Hope this helps
    one more thing  in this line "textChild=docOut.createTextNode(s k + j );"   somehow the the third braces one opening  before k and one closing after j is missing for unknown reasons. Please correct it when you actually run this code.
    regards
    Anupam
    Edited by: anupamsap on Mar 7, 2011 12:47 PM

  • Removing Exception Handling Causes Compiler Error

    I am very new to Java. I have a background in other programming languages including Ruby. I am in need of a convenient means to parse XML code. I picked up the code shown at the end of this message on the Internet. In its original form, it works perfectly. I experimented by trying to comment out the try block as you can see. I was surprised to find that in that form it wouldn't compile. In essence, I thought what I was doing was simply removing exception handling. I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. (I understand that I would not want to do this in production mode.) Can someone please explain to me why removing the exception handling causes the program to fail to compile?
    Thanks for any input.
    ... doug
    /* Experimental Code */
    /* http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/ */
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.Element;
    import java.io.File;
    public class ReadXMLFile {
    public static void main(String argv[]) {
    try {
    File fXmlFile = new File("ReadXMLFile.xml");
    DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
    Document doc = dBuilder.parse(fXmlFile);
    doc.getDocumentElement().normalize();
    System.out.println("Root element :" + doc.getDocumentElement().getNodeName());
    NodeList nList = doc.getElementsByTagName("staff");
    System.out.println("-----------------------");
    for (int temp = 0; temp < nList.getLength(); temp++) {
    Node nNode = nList.item(temp);     
    if (nNode.getNodeType() == Node.ELEMENT_NODE) {
    Element eElement = (Element) nNode;
    System.out.println("First Name : " + getTagValue("firstname",eElement));
    System.out.println("Last Name : " + getTagValue("lastname",eElement));
    System.out.println("Nick Name : " + getTagValue("nickname",eElement));
    System.out.println("Salary : " + getTagValue("salary",eElement));
    } catch (Exception e) {
    e.printStackTrace();
    private static String getTagValue(String sTag, Element eElement){
    NodeList nlList= eElement.getElementsByTagName(sTag).item(0).getChildNodes();
    Node nValue = (Node) nlList.item(0);
    return nValue.getNodeValue();
    }

    877757 wrote:
    I figured that since the code worked and there were no exceptions being thrown, it would work just fine for experimentation purposes. The compiler doesn't know that your code works. It only knows that some method you call can throw some checked exception, and it requires you to catch it or declare that you don't.

  • RFC: Exception handling

    Hi there,
    after playing a bit with external xml files provided by my
    application i'm ready to go to the next topic on my ToDo-List.
    How could one implement a good and stable technique for
    exception handling? I'm talking about the interaction from spry to
    our Web Framework which throws an error sometimes.
    My current idea is that the server side framework could
    return some kind of Error XML format which contains the exception
    message and so on. This would require functions on client side to
    precheck the server output.
    Imho the best place for this is inside the XMLDataSet
    constructor. When catching some bad XML file internal error
    messages could be send using the already existing techniques OR by
    providing an public function which then should be overriden by an
    selfwritten one, e.g. to put it into my own `error box`.
    Also, some kind of internal statemachine in XMLDataSet may
    help a lot. That way each access to functions which aren't working
    at the moment could be loggend and catched by an selfwritten
    function.
    I hope you get the idea,
    what do you think?
    Best regards,
    Sebastian

    Better error handling and error handling hooks is on the list
    of things to do.
    The way I see it, there are several types of errors that can
    occur:
    1. Server returns valid XML, but it's XML that describes an
    error instead of the data requested.
    - I believe this is what Sebastian was mentioning. I was
    actually thinking of allowing a hook for developers to catch and
    handle this case and perhaps leverage the states mechanism to let
    them change the dynamic region markup used to display the error
    since the data references in this error XML would be different.
    2. The server returns an error. (Invalid URL or Server Error)
    - This could be handled with states, but we need to expose
    some data references, or set the data set to contain a known data
    set schema that would allow the designer to show more info about
    the error.
    3. The server returns XML but uses a mime-type that is not
    understood by Spy or the XML parsing code built-into the browser.
    - I believe it was Doug [?] that had a patch that *always*
    forced the data set to try and parse the XML string in the response
    if the response didn't contain an XML DOM. My one paranoia about
    that is that the server could actually be returning something that
    is not XML, in which we would still fail and perhaps choke
    somewhere else. I need to do some testing in that area.
    I was thinking perhaps we should add something to the
    XMLDataSet constructor that allowed a user to specify mime-types
    for formats they knew were XML, but didn't use one of the standard
    XML formats.
    4. The browser chokes on "not-well-formed" XML.
    - This is an interesting problem. IE silently fails when the
    parser chokes, but Mozilla creates an XML DOM tree that reports the
    error which does *not* match the XML string from the request
    response. I had to add code to spry to detect when this happens.
    5. An exception is thrown during Spry processing of XML data.
    - This will require more programming on our part to handle
    more cases.
    --== Kin ==--

  • Strange Problem about Dom Parser

    Hi, all
    I am using Dom parser to extract content from one xml file, and it works this afternoon, then tonight when i tried to run again, it gives me an exception:
    org.xml.sax.SAXParseException: Document root element "Total", must match DOCTYPE root "null".
    In my xml file, i don't have <!DOCTYPE ....>, but it is the same xml file i run this afternoon, also, as far as i know, <!DOCTYPE> is not necessary, right?
    Please help me, really frustrated here!

    The parser class only supports a class derived from the java.io.Reader class. I am not sure if there is a class that derives from such that would handle a url string. You may need to obtain the file using java.net for the url and then pass that to a FileReader object.
    One thing that i just thought of that might work is this:
    parser.parse(new File(url));

  • Oracle XML DOM parser - attribute values are not printing on the screen ??

    Hi Everyone,
    I am just trying to use oracle DOM parser to paerse one of my xml file, java file can be compiled and run agianst a xml file, But I cannot see any attribute values printing on the screen..
    Appreciate if anyone can help, where I have gone wrong please?
    Below is the java file:
    // menna puthe DOMSample eka - duwanawa 19/12/2005
    import java.io.*;
    import java.net.*;
    import org.w3c.dom.*;
    import org.w3c.dom.Node;
    import oracle.xml.parser.v2.*;
    public class DOMSample {  //public class eka ***
    static public void main(String[] argv){  // main method eka ###
    try {
    if (argv.length != 1){
    // Must pass in the name of the XML file...
    System.err.println("Usage: java DOMSample filename");
    System.exit(1);
    // Get an instance of the parser
    DOMParser parser = new DOMParser();
    // Generate a URL from the filename.
    URL url = createURL(argv[0]);
    // Set various parser options: validation on,
    // warnings shown, error stream set to stderr.
    parser.setErrorStream(System.err);
    parser.showWarnings(true);
    // Parse the document.
    parser.parse(url);
    // Obtain the document.
    Document doc = parser.getDocument();
    // Print document elements
    System.out.print("The elements are: ");
    printElements(doc);
    // Print document element attributes
    System.out.println("The attributes of each element are: ");
    printElementAttributes(doc);
    catch (Exception e){
    System.out.println(e.toString());
    } // main method eka ###
    static void printElements(Document doc) {
    NodeList nl = doc.getElementsByTagName("*");
    Node n;
    for (int i=0; i<nl.getLength(); i++){
    n = nl.item(i);
    System.out.print(n.getNodeName() + " ");
    System.out.println();
    static void printElementAttributes(Document doc){
    NodeList nl = doc.getElementsByTagName("*");
    Element e;
    Node n;
    NamedNodeMap nnm;
    String attrname;
    String attrval;
    int i, len;
    len = nl.getLength();
    for (int j=0; j < len; j++){
    e = (Element)nl.item(j);
    System.out.println(e.getTagName() + ":");
    nnm = e.getAttributes();
    if (nnm != null){
    for (i=0; i<nnm.getLength(); i++){
    n = nnm.item(i);
    attrname = n.getNodeName();
    attrval = n.getNodeValue();
    System.out.print(" " + attrname + " = " + attrval);
    System.out.println();
    static URL createURL(String filename) {  // podi 3 Start
    URL url = null;
    try {
    url = new URL(filename);
    } catch (MalformedURLException ex) { /// BBBBBB
    try {
    File f = new File(filename);
    url = f.toURL();
    } catch (MalformedURLException e) {
    System.out.println("Cannot create URL for: " + filename);
    System.exit(0);
    } // BBBBBB
    return url;
    } // podi 3 End
    } //public class eka ***
    // End of program
    output comes as below:
    Isbn:
    Title:
    Price:
    Author:
    Message was edited by:
    chandanal

    Hi Chandanal,
    I edited your code slightly and I was able to get the correct output.
    I changed the following line:
    for (int j=0; j >< len; j++)to:
    for (int j=0; j < len; j++)I have included the complete source below:
    // menna puthe DOMSample eka - duwanawa 19/12/2005
    import java.io.*;
    import java.net.*;
    import org.w3c.dom.*;
    import org.w3c.dom.Node;
    import oracle.xml.parser.v2.*;
    public class DOMSample {
        //public class eka ***
        public static void main(String[] argv) {
            // main method eka ###
            try {
                if (argv.length != 1) {
                    // Must pass in the name of the XML file...
                    System.err.println("Usage: java DOMSample filename");
                    System.exit(1);
                // Get an instance of the parser
                DOMParser parser = new DOMParser();
                // Generate a URL from the filename.
                URL url = createURL(argv[0]);
                // Set various parser options: validation on,
                // warnings shown, error stream set to stderr.
                parser.setErrorStream(System.err);
                parser.showWarnings(true);
                // Parse the document.
                parser.parse(url);
                // Obtain the document.
                Document doc = parser.getDocument();
                // Print document elements
                System.out.print("The elements are: ");
                printElements(doc);
                // Print document element attributes
                System.out.println("The attributes of each element are: ");
                printElementAttributes(doc);
            } catch (Exception e) {
                System.out.println(e.toString());
        // main method eka ###
        static void printElements(Document doc) {
            NodeList nl = doc.getElementsByTagName("*");
            Node n;
            for (int i = 0; i < nl.getLength(); i++) {
                n = nl.item(i);
                System.out.print(n.getNodeName() + " ");
            System.out.println();
        static void printElementAttributes(Document doc) {
            NodeList nl = doc.getElementsByTagName("*");
            Element e;
            Node n;
            NamedNodeMap nnm;
            String attrname;
            String attrval;
            int i, len;
            len = nl.getLength();
            for (int j = 0; j < len; j++) {
                e = (Element)nl.item(j);
                System.out.println(e.getTagName() + ":");
                nnm = e.getAttributes();
                if (nnm != null) {
                    for (i = 0; i < nnm.getLength(); i++) {
                        n = nnm.item(i);
                        attrname = n.getNodeName();
                        attrval = n.getNodeValue();
                        System.out.print(" " + attrname + " = " + attrval);
                System.out.println();
        static URL createURL(String filename) {
            // podi 3 Start
            URL url = null;
            try {
                url = new URL(filename);
            } catch (MalformedURLException ex) {
                /// BBBBBB
                try {
                    File f = new File(filename);
                    url = f.toURL();
                } catch (MalformedURLException e) {
                    System.out.println("Cannot create URL for: " + filename);
                    System.exit(0);
            // BBBBBB
            return url;
        // podi 3 End
    } //public class eka ***-Blaise

  • DOM parsing In Applet (URgent)

    Is it possible to implement DOM parsing in Applet?
    I am getting classnotfoundException .
    I am giving the code below. pl read the code.
    Applet.(parserapplet.java)
    =========================
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.util.*;
    import java.applet.*;
    import com.security.*;
    // for DOM parsing ....
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    public class parserapplet extends Applet
    public void init()
    public void start()
    try
    if (Class.forName("com.ms.security.PolicyEngine") != null)
    {  // required for IE
         PolicyEngine.assertPermission( PermissionID.SYSTEM );
    catch (Throwable cnfe)
         System.out.println("Policy Engine Exception: " + cnfe);
    try
         String str = "<?xml
    version=\"1.0\"?><html><body></body></html>";
         ByteArrayInputStream bis = new
    ByteArrayInputStream(str.getBytes());
         System.out.println("After creating input stream");
         BufferedInputStream bufIn     = new BufferedInputStream(new
    DataInputStream(bis));
         parseXMLMessage     (bufIn);
    catch(Exception e){}
    // Actual DOM parsing goes here.....
    public void parseXMLMessage(InputStream xmlMessage)
    Document document      = null;
         DocumentBuilder documentBuilder           = null;
         DocumentBuilderFactory documentBuilderFactory     = null;
         try
         documentBuilderFactory = DocumentBuilderFactory.newInstance();
         documentBuilder     = documentBuilderFactory.newDocumentBuilder();
         document     = documentBuilder.parse(xmlMessage);
         System.out.println("Document node: " + document);
         catch(FactoryConfigurationError fce)
         System.out.println("Exception Factory configuration error " + fce);
         catch(ParserConfigurationException pce)
         System.out.println("Exception Parser configuration Exception " pce);
         catch(SAXException saxe)
         System.out.println("Exception SAX error " + saxe);
         catch(Exception e)
         System.out.println("Exception " + e);
    Html code:
    =========
    <html>
    <body>
    <APPLET code="parserapplet.class" archive = "xalan.jar" width=0
    height=0
    MAYSCRIPT>
    <param name=cabbase value=MyApplet.cab>
    </APPLET>
    </body>
    </html>
    I have signed the Applet using signcode utility and i have put the
    parserapplet.class in the MyApplet cab file and signed it. On invoking
    the html file, it request for permission, and after clicking yes, the
    applet loads.Fine.
    No problem upto this stage.
    But after loading of the applet the following exception is thrown in
    Javaconsole.
    Exception:
    =========
    com.ms.security.SecurityExceptionEx[Host]: cannot access file
    C:\WINNT\Java\lib\jaxp.properties
    at com/ms/security/permissions/FileIOPermission.check
    at com/ms/security/PolicyEngine.deepCheck
    at com/ms/security/PolicyEngine.checkPermission
    at com/ms/security/StandardSecurityManager.chk
    at com/ms/security/StandardSecurityManager.checkRead
    at java/io/File.exists
    at javax/xml/parsers/DocumentBuilderFactory.findFactory
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    javax.xml.parsers.FactoryConfigurationError:
    java.lang.ClassNotFoundException:
    org/apache/crimson/jaxp/DocumentBuilderFactoryImpl
    at javax/xml/parsers/DocumentBuilderFactory.newInstance
    at parserapplet.parseXMLMessage
    at parserapplet.init
    at com/ms/applet/AppletPanel.securedCall0
    at com/ms/applet/AppletPanel.securedCall
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    I dont know which .jar file to archive (i tried xalan,crimson, jaxp
    but which of no use). I was surprised why the security Exception is
    thrown , when parsing.
    I have not accessed the System files!( but it searches for
    jaxp.properties file!). I think the jar file is not downloaded. How to
    verify that it is downloaded in applet?
    The above code is only for sample.
    If anybody who knows how to correct it please mail me at:
    "[email protected]" with corrected code. I want this very
    urgently.
    Help meeeeeeeeeeeeeeeeeeee!!!!!
    Prasanna.

    Have you found the answer to this problem? I am having a similar problem when running the parser in an ActiveX Bean.
    THanks

  • Dom Parsing and BR tag problem...

    hi all,
    I have a Dom parser which examines an xml file and creates a Jtree from its content... it works fine except that when it meets a </br> tag it creates a new node for it in the tree... is there anyway to get it to consider the two "node" as one...
    example:
    - <p>
    some text 1
    some text 2
    </p>
    should be added in one node as some text 1 some text 2 instead it puts some text 1 in one node and some text 2 in another....
    thanks
    Lila

    oooh sorry i didnt check how the message looked this is the question:
    hi all, I have a Dom parser which examines an xml file and creates a Jtree from its content... it works fine except that when it meets a / BR tag it creates a new node for it in the tree... is there anyway to get it to consider the two "node" as one... example: -
    < p >
    some text 1
    < / BR > <--- THIS NODE IS PROBLEM
    some text 2
    < / p >
    should be added in one node as some text 1 some text 2 instead it puts some text 1 in one node and some text 2 in another....
    thanks
    Lila

  • DOM Parsing problems... (newbie in trouble)

    I am trying to get a DOM Parser contruct a DOM Object from an XML file... I am having trouble getting the code validate against my XML Schema: <p>
    <?xml version="1.0" encoding="UTF-8"?> <
    <!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Fedro E. Ponce de Leon Luengas (ASI Consulores, S.A. de C.V.) -->
    <xs:schema targetNamespace="http://palaciohierro.com.mx/mde/expe" xmlns="http://palaciohierro.com.mx/mde/expe" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="existencia-peticion" type="epType">
    <xs:annotation>
    <xs:documentation>Peticion de existencias para la Mesa de Eventos Web</xs:documentation>
    </xs:annotation>
    </xs:element>
    <xs:complexType name="epType">
    <xs:annotation>
    <xs:documentation>peticion de existencia</xs:documentation>
    </xs:annotation>
    <xs:sequence>
    <xs:element name="articulo" type="articuloType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="articuloType">
    <xs:annotation>
    <xs:documentation>articulo</xs:documentation>
    </xs:annotation>
    <xs:attribute name="id_articulo" type="IdentifierType" use="required"/>
    <xs:attribute name="sku" type="skuType" use="required"/>
    </xs:complexType>
    <xs:simpleType name="IdentifierType">
    <xs:annotation>
    <xs:documentation>identificador</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:long">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="999999999999999999"/>
    <xs:totalDigits value="22"/>
    <xs:fractionDigits value="0"/>
    </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="skuType">
    <xs:annotation>
    <xs:documentation>sku</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
    <xs:minLength value="11"/>
    <xs:maxLength value="20"/>
    <xs:pattern value="\d{11,20}"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>
    taking this sample XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <expe:existencia-peticion xmlns:expe="http://palaciohierro.com.mx/mde/expe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://palaciohierro.com.mx/mde/expe
    C:\oracle\Oracle9iDS\jdev\mywork\testCompra\MesaEventos\src\ph\mesaeventos\schema\existencia-peticion.xsd">
    <articulo id_articulo="450" sku="12245110021"/>
    <articulo id_articulo="15" sku="45421213223"/>
    <articulo id_articulo="12" sku="121131231858"/>
    <articulo id_articulo="74" sku="4101031234545"/>
    <articulo id_articulo="871" sku="022324563212"/>
    </expe:existencia-peticion>
    with the following code:
    public Document getDOM( String existenciapeticionXML ) throws Exception
    // Obtain parser instance and parse the document
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating( true );
    factory.setNamespaceAware( true );
    DocumentBuilder builder = factory.newDocumentBuilder();
    byte buf[] = existenciapeticionXML.getBytes();
    ByteArrayInputStream stream = new ByteArrayInputStream( buf );
    Document doc = builder.parse( stream );
    return doc;
    I am getting the following Exception:
    oracle.xml.parser.v2.XMLParseException: Element 'expe:existencia-peticion' used but not declared.
    void oracle.xml.parser.v2.XMLError.flushErrors()
    XMLError.java:145
    void oracle.xml.parser.v2.NonValidatingParser.parseDocument()
    NonValidatingParser.java:263
    void oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
    XMLParser.java:141
    org.w3c.dom.Document oracle.xml.jaxp.JXDocumentBuilder.parse(org.xml.sax.InputSource)
    JXDocumentBuilder.java:96
    org.w3c.dom.Document javax.xml.parsers.DocumentBuilder.parse(java.io.InputStream)
    DocumentBuilder.java:119
    org.w3c.dom.Document ph.mesaeventos.mesa.xml.ExistenciaPeticionDOM.getDOM(java.lang.String)
    ExistenciaPeticionDOM.java:26
    void ph.mesaeventos.mesa.xml.Test.main(java.lang.String[])
    Test.java:38
    What am I doing wrong? I am clueless... please help!
    Thanks,

    I finally managed to make it work.... well quite!
    Having an XML Doc like this:
    <?xml version="1.0"?>
    <existencia-peticion xmlns = "http://palaciohierro.com.mx/mde/expe">
    <articulo id_articulo="10" sku="00000000010"></articulo>
    <articulo id_articulo="11" sku="00000000011"></articulo>
    <articulo id_articulo="12" sku="00000000012"></articulo>
    <articulo id_articulo="13" sku="00000000013"></articulo>
    </existencia-peticion>
    with an schema like:
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://palaciohierro.com.mx/mde/expe"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:expe="http://palaciohierro.com.mx/mde/expe"
    elementFormDefault="qualified">
    <annotation>
    <documentation xml:lang="es">
    Esquema de peticion de existencias para la Mesa de Eventos Web
    Copyright 2002 palaciodehierro.com.mx. Todos los derechos reservados.
    </documentation>
    </annotation>
    <element name="existencia-peticion" type="expe:epType">
    <unique name="id_articulo">
    <selector xpath="expe:articulo"/>
    <field xpath="@id_articulo"/>
    </unique>
    <unique name="sku">
    <selector xpath="expe:articulo"/>
    <field xpath="@sku"/>
    </unique>
    </element>
    <complexType name="epType">
    <annotation>
    <documentation>peticion de existencias</documentation>
    </annotation>
    <sequence>
    <element name="articulo" type="expe:articuloType" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="articuloType">
    <annotation>
    <documentation>articulo</documentation>
    </annotation>
    <attribute name="id_articulo" type="expe:IdentifierType" use="required"/>
    <attribute name="sku" type="expe:skuType" use="required"/>
    </complexType>
    <simpleType name="IdentifierType">
    <annotation>
    <documentation>identificador</documentation>
    </annotation>
    <restriction base="long">
    <minInclusive value="0"/>
    <maxInclusive value="999999999999999999"/>
    <totalDigits value="18"/>
    <fractionDigits value="0"/>
    </restriction>
    </simpleType>
    <simpleType name="skuType">
    <annotation>
    <documentation>sku</documentation>
    </annotation>
    <restriction base="string">
    <minLength value="11"/>
    <maxLength value="20"/>
    <pattern value="\d{11,20}"/>
    </restriction>
    </simpleType>
    </schema>
    and with the following class:
    public class XMLValidator
    // Instancia singleton
    private static XMLValidator validator = new XMLValidator();
    * Constructor privado
    private XMLValidator()
    * Mitodo para acceder a la instancia Singleton de XMLValidator
    * @regresa <b>XMLValidator</b> La instancia de esta clase
    public static XMLValidator getValidator()
    return validator;
    public boolean validaEsquema( String docXML, String esquema ) throws Exception
    // Establece el URL correcto para el documento de esquema
    XSDBuilder builder = new XSDBuilder();
    URL url = createURL( esquema );
    // Construye el objecto del Schema XML
    try
    XMLSchema schemadoc = (XMLSchema)builder.build( url );
    // Valida el documento XML procesandolo contra el esquema
    return validate( docXML, schemadoc );
    catch( XMLParseException e )
    throw new Exception( "Error al analizar el documento XML: " + e.getMessage() );
    catch( Exception e )
    throw new Exception( "No es posible validar con el esquema: " + e.getMessage() );
    private static boolean validate(String docXML, XMLSchema schemadoc) throws Exception
    boolean isValid = false;
    // Crea un objeto Parser DOM de XML
    DOMParser dp = new DOMParser();
    // Establece el objeto Schema XML para la validacion
    dp.setXMLSchema( schemadoc );
    dp.setValidationMode( XMLParser.SCHEMA_VALIDATION );
    dp.setPreserveWhitespace( true );
    // Establece la salida de errores
    dp.setErrorStream( System.out );
    // Recupera los datos del documento XML en un objeto InputStream
    byte[] docbytes = docXML.getBytes();
    ByteArrayInputStream in = new ByteArrayInputStream( docbytes );
    // Parsea el documento y validalo contra el esquema
    try
    dp.parse( in );
    isValid = true;
    catch( Exception e )
    // Devuelve el documento XML DOM construido durante el parseo
    return isValid;
    I am able to validate when invoking with the XML and schemas in the parameters...
    Problem is that I have to include the attribute xmlns = "http://palaciohierro.com.mx/mde/expe" in my XML doc.
    What I really need is to be able to validate de XML doc against a stablished schema, when the XML doc does not include the
    xmlns attribute.

Maybe you are looking for

  • Report generation failed after migrated from 6i to 10g.

    Hi All, i have migrated the 6i application to 10g. There was a report which was generated in .html format and saved to a remote server location. Now after migration to 10g,when i run the report through the URL ,It is still generated on the same remot

  • Logic keeps quitting

    Logic keeps randomly quitting when I'm mixing or just listening to my project with no consistency. I've tried restarting it, closing all my other apps, and restarting my computer and none of it worked. I'm on Yosemite 10.10 and logic X. The crash rep

  • Purchase order price variance(PPV) accounts.

    Purpose is to add SAP inventory movement types to charge in inventory values,due to changing material numbers for purchased items,to the corresponding purchase price variance(PPV) accounts. ensure correct accounting for valuation changes that current

  • Why do we use xml?

    why do we use only xml for message exchange in xi?

  • Cant see airports on pc, but they work fine on ipad, what's going on ?

    ive got 2 air ports, neither are found when i do a search with the airport untility on my vista laptop. i plugged them in with a network cable and they are found, somehow i have programmed them, and they work fine with my ipad and iphone. when i unpl