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!

I want to read XML file without namespace and use it in transform activity

902286Aug 12 2013 — edited Feb 26 2020

Hi All,

I have a requirement wherein I have to read a xml file without namespace in my BPEL process.

What I am doing : I have created XSD file based on client given xml file(which does not have any namespace and I have to map the data in elements in that xml to a service( input variable)).

My xml file is like below(example file):

<?xml version="1.0" ?>

< Order>

< Origin>cali</Origin>

<CustNum>34</CustNum>.

< /Order>

If you see above xml file,the order element does not have any namespace(xmlns attribute).I am using same file to create XSD file which is creating the (default)namespace as "http://www.example.org".

When I want to read the xml files from the client by using FILE adapter and mapping in transform activity,I am getting blank data within elements in transform activity.

As of now I am getting transform activity like below :

-------------------------------------------------------------------

<InvokeService_Order_InputVariable>
<part  name="body">
<Order>
<schemans2:Origin/>
<schemans2:CustNum/>

</Order>


</InvokeService_Order_InputVariable>

----------------------------------------------------------------------------------

I don't have any data for Origin and custNum.Becasue of that I am not able map these elements(they don't have data or values)values to thirs party service.In order to get the data,I had to add the namespace manually to Order element like below

<?xml version="1.0" ?>

< Order  xmlns="http://www.example.org">

< Origin>cali</Origin>

<CustNum>34</CustNum>..

< /Order>

Then I am able to get the values for those elements like below.

<InvokeService_Order_InputVariable>
<part  name="body">
<Order>
<schemans2:Origin>cali</schemans2:Origin>
<schemans2:CustNum>34</schemans2:CustNum>

</Order>


</InvokeService_Order_InputVariable>

But I want to get the values in transform activity from xml files(inbound xml files ) that are without namespace and get the data in that activity

   (or)

(If at all we are not able to read without namespace)How do I add namespace to the root element(If at all I have to add namespace) automatically?

So how do I do that?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2013
Added on Aug 12 2013
1 comment
740 views