I have an xml response from a bpel process. It has a <result> tag that includes all of the xml I need to parse. I need to make that <result> tag have an attribute - xmlns="http://..." - That means it would look like <result xmlns="http://...">
Here is the result <tag> in part of the actual response:
I need it to have an attribute xmlns="http://..." <result xmlns="htp://....">
Here is my .xsd file which has the only reference to the <result> tag I can seem to find (It is at the bottom):
So is there a new tag I will need to add nested within that <element name="result" type="string"/> tag, or do I need to add a new attribute to it? Or is there another way
It would be great if someone could help me with this one.
Thanks very much
True wisdom is in knowing you know nothing - Socrates
You mean, you want to declare that element to be in the default namespace with a particular namespace URI. I don't know much about schema but if you use the standard terminology you're more likely to be able to find the answer in the documentation.
Oh wait a minute... you said you want to parse it and it has to have that namespace declaration. In that case you'll have to contact whoever is producing the document and ask them to fix it. Or are you the one producing it? I'm a bit confused about what you are asking.
Edit: I looked again at the XML you're complaining about and that <result> element (not "tag", let's use the standard terminology) is already in the default namespace. The default namespace is inherited from its parent. You'll notice that the <QUOTE> element which is the child of the <result> element redeclares the default namespace so that it isn't in any namespace. So now I'm a lot confused about what you are asking. Can you go back a step and ask the earlier question which you thought adding a namespace declaration was the answer to?
I should start then by saying I am migrating some bpel processes from oas10 to weblogic
I have some pl sql that parses the xml
The last variable on each line, v_quote_name_space is causing an issue. If I remove it altogether my stuff works fine, but if it is there my process gets hung up and will not complete (it goes down to the end of the if-statement containing that pl sql).
I looked at the old version of the response xml, and it looks like this:
If you compare that to the current response xml the only real difference is that <response> element is missing the xmlns="" definition:
So I thought that meant I needed to add it there, but maybe I am wrong about that entirely then? I wish removing the v_quote_name_space variable from the pl sql were an option, but it is not.
Okay, I see. But what has actually changed is that in the new format you have this:
Which declares that the <QUOTE_XML> element and all its children are not in any namespace. Whereas in the old format, they were in the "http://xmlns.oracle.com/Get_Quote_XML" namespace. Presumably that namespace URI is the value of the v_quote_name_space variable in that PL-SQL code?
It seems to me that you want that <QUOTE_XML> element to just inherit the default namespace from its parent. Or are you looking for fixes to your PL-SQL code to make it work as before?
I have no idea how to achieve the former. As for the latter, I know basically nothing about PL-SQL but I would hazard a guess that there's a version of the EXTRACTVALUE function which doesn't take the third (namespace) parameter.
Turns out removing the name_space from the pl sql was the best option, so that is what I did; if you were wondering about it.
Turns out, that name_space variable was only there because it had to be there due to the way our old web services worked, so with the migrated version, this was no longer needed, so I just struck it from the code altogether. Made for an easy fix, and easier to debug pl sql code
Thanks for your help Paul, you always are able to set me on the right path.