Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can ESB JMS adaptor work with the XML message without namespace ?

538531Sep 22 2008
I am working on ESB Project. Project has to read XML message form the JMS queue using ESB JMSAdapter. JMSAdapter will convert the XML string to object using the schema file.

Here is the xml request message, which is to be read form the JMS queue.

<?xml version="1.0" ?>
<AAA>
<Header>
<Code>CCC</Code>
<Partner>PPP</Partner>
</Header>
<Body>
<Request>
<Context>CX01</Context>
<Case>C001</Case>
<Number>84444444</Number>
</Request>
</Body>
</AAA>

Here is the schema file for the XML file given below.

<?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="unqualified">
<xsd:element name="AAA">
<xsd:annotation>
<xsd:documentation>
A sample element
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Header">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Code" type="xsd:string" default="XXX"/>
<xsd:element name="Partner" type="xsd:string" default="YYY" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Context" type="xsd:string"/>
<xsd:element name="Case" type="xsd:string"/>
<xsd:element name="Number" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

The problem is that ESB is not able to read the values from the XML file, if I provide the given XML file show above which has no namespace.

If I provide the following XML file with the namespace as shown below, ESB is able to read the values form the file.


<?xml version="1.0" ? >
<req:AAA xmlns:req="http://www.example.org">
<Header>
<Code>CCC</Code>
<Partner>PPP</Partner>
</Header>
<Body>
<Request>
<Context>CX01</Context>
<Case>C001</Case>
<Number>84444444</Number>
</Request>
</Body>
</req:AAA>

I want to read the XML without namespace. Does anybody have any idea how can I do this? How can I get my ESB to read the XML message form the JMS queue which has no namespace?

Comments

Christopher Jones-Oracle

cur.execute() will execute one SQL or PL/SQL call by sending it to the DB for execution.


Your code appears to be

1) passing in two statements. You need to pass each statement separately.  The BEGIN/END block counts as one statement.

2) passing a SQL*Plus SET command.  This is neither a SQL or PL/SQL statement so the DB won't understand it.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 20 2008
Added on Sep 22 2008
0 comments
269 views