SQL function to extract XML namespace prefix
Hi,
I have the following document
<ns4:product xmlns:ns1="www.abc.com" xmlns:ns2="www.def.com" xmlns:ns3="www.ghi.com" xmlns:ns4="www.jkl.com">
<ns4:productline>Widget</ns4:productline>
</ns4:product>
I'm trying to find a SQL function which will enable me to extract the namespace prefix with the value "www.jkl.com". This is so that I can then use the prefix as part of the xpath expression to search for an element value in the document eg. extractvalue('/ns4:product/ns4:productline')
Thanks
Try DBMS_XMLDOM.GetNameSpace
Similar Messages
-
Hi,
I have the following document
<ns4:product xmlns:ns1="www.abc.com" xmlns:ns2="www.def.com" xmlns:ns3="www.ghi.com" xmlns:ns4="www.jkl.com">
<ns4:productline>Widget</ns4:productline>
</ns4:product>
I'm trying to find a SQL function which will enable me to extract the namespace prefix with the value "www.jkl.com". This is so that I can then use the prefix as part of the xpath expression to search for an element value in the document eg. extractvalue('/ns4:product/ns4:productline')
ThanksHi,
This one's tricky, so tricky that I think it's not possible using Oracle built-in XML DML functions.
Even XQuery Update cannot do it (for now) because, likewise, the prefix is always redeclared at child level.
The only thing I can think of is XSLT (or maybe DOM manipulation) :
SQL> select xmlserialize(document
2 xmltransform(
3 xmltype('<A xmlns="namespace" xmlns:def="myns_namespace"/>')
4 , xmltype(
5 '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:def="myns_namespace"
7 xmlns:ns0="namespace">
8 <xsl:template match="ns0:A">
9 <xsl:copy>
10 <xsl:element name="def:B"/>
11 </xsl:copy>
12 </xsl:template>
13 </xsl:stylesheet>')
14 )
15 indent
16 )
17 from dual;
XMLSERIALIZE(DOCUMENTXMLTRANSF
<A xmlns="namespace" xmlns:def="myns_namespace">
<def:B/>
</A> -
SQL Functions to Update XML Data
Hi,
Can anybody please tell me whether SQL Functions to Update XML Data (such as updateXML, insertChildXML, insertXMLbefore etc) are available with oracle 9i or not?
Please tell me.You can also do a describe on SYS.XMLTYPE to see what methods are supported in your release. How would you find e.g. insertChildXML in DESC sys.xmltype? I suppose it is not a Method of the Type: Summary of XMLType Subprograms.
-
Hello,
our partner uses Biztalk to receive our SOAP calls. They tell us that each attribute and element needs to have the namespace prefix otherwise Biztalk cannot read it.
We are sending:
SAP XI Output
<?xml version="1.0" encoding="utf-8" ?>
<ns11:Receive_SAP xmlns:ns11="http://zzz.com/it/mmpur/sem/xi">
<part>
<xform id="SWI:PLG:Order Header - SAP">
<model>A</model>
</xform>
</part>
</ns11:Receive_SAP>
They want:
Biztalk Requirement:
<?xml version="1.0" encoding="utf-8" ?>
<ns11:Receive_SAP xmlns:ns11="http://zzz.com/it/mmpur/sem/xi">
<ns11:part>
<ns11:xform id="SWI:PLG:Order Header - SAP">
<ns11:model>A</ns11:model>
</ns11:xform>
</ns11:part>
</ns11:Receive_SAP>
Can that be done with the XI 3.0 Graphical mapping or do I have to use JAVA Mapping or XSLT?
Did anyone come accros this before with Biztalk Server and it there an option to avoid it on the Biztalk Server side?
Thanks
StefanHi Stefan,
Where did you obtain the schema (XSD) from?
Most likely, the elements you are using are local elements and do not belong to the target namespace, but to an unnamed global namespace. This is a typical characteristic of schema's defined by SAP.
The short answer/solution is probably putting elementFormDefault="true" in the header of your target schema. That should do the trick.
Kind regards, Guy Crets -
I am working on a RFC to JMS scenario and am having trouble getting the XML in the required format. I have loaded the XML file provided in my mapping. However the result was not what I had anticipated.
<br>
This is the XML provided and what I want to produce:
<br>
<
?xml version="1.0" encoding="UTF-8" ?> <br>
<MyNS3:Maint_Struc <br>
xmlns:MyNS1="http://www.MyTest.com/My_Namespace/Part1" <br>
xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2" <br>
xmlns:MyNS5="http://www.MyTest.com/My_Namespace/Part5" <br>
xmlns:MyNS3="http://www.MyTest.com/My_Namespace/Part3" <br>
xmlns:MyNS4="http://www.MyTest.com/My_Namespace/Part4" <br>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br>
xsi:schemaLocation="www.MyTest.com/My_Namespace/Part3 file:/C:/MyStructure.xsd">
<br>
<
MyNS2:SubStruc_1> <br>
<
MyNS2:Fld_1_1_A>Value001<
/MyNS2:Fld_1_1_A> <br>
<
MyNS2:Fld_1_1_B>Value002<
/MyNS2:Fld_1_1_B> <br>
<
/MyNS2:SubStruc_1> <br>
<br>
<
MyNS3:SubStruc_2> <br>
<
MyNS1:SubStruc_2_1> <br>
<
MyNS1:Fld_2_1_A>Value003<
/MyNS1:Fld_2_1_A> <br>
<
MyNS1:Fld_2_1_B>Value004<
/MyNS1:Fld_2_1_B> <br>
<
/MyNS1:SubStruc_2_1> <br>
<
MyNS4:Fld_2_A>Value005<
/MyNS4:Fld_2_A> <br>
<
MyNS4:Fld_2_B>Value006<
/MyNS4:Fld_2_B> <br>
<
/MyNS3:SubStruc_2> <br>
<br>
<
MyNS3:SubStruc_3> <br>
<
MyNS5:SubStruc_3_1> <br>
<
MyNS5:Fld_3_1_A>Value007<
/MyNS5:Fld_3_1_A> <br>
<
MyNS5:Fld_3_1_B>Value008<
/MyNS5:Fld_3_1_B> <br>
<
/MyNS5:SubStruc_3_1> <br>
<
MyNS3:Fld_3_A>Value009<
/MyNS3:Fld_3_A> <br>
<
MyNS5:Fld_3_B>Value010<
/MyNS5:Fld_3_B> <br>
<
MyNS2:Fld_3_C>Value011<
/MyNS2:Fld_3_C> <br>
<
/MyNS3:SubStruc_3> <br>
<
/MyNS3:Maint_Struc> <br>
<br>
However I am getting the following when mapped: <br>
<
?xml version="1.0" encoding="UTF-8"?> <br>
<
ns0:Maint_Struc <br>
xmlns:MyNS4="http://www.MyTest.com/My_Namespace/Part4" <br>
xmlns:MyNS5="http://www.MyTest.com/My_Namespace/Part5" <br>
xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2" <br>
xmlns:MyNS1="http://www.MyTest.com/My_Namespace/Part1" <br>
xmlns:ns0="http://www.MyTest.com/My_Namespace/Part3" <br>
xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance" <br>
ns1:schemaLocation="www.MyTest.com/My_Namespace/Part3 file:/C:/MyStructure.xsd"> <br>
<
ns2:SubStruc_1 xmlns:ns2="http://www.MyTest.com/My_Namespace/Part2"> <br>
<
ns2:Fld_1_1_A>Value001<
/ns2:Fld_1_1_A> <br>
<
ns2:Fld_1_1_B>Value002<
/ns2:Fld_1_1_B> <br>
<
/ns2:SubStruc_1> <br>
<br>
<
ns0:SubStruc_2> <br>
<
ns3:SubStruc_2_1 xmlns:ns3="http://www.MyTest.com/My_Namespace/Part1"> <br>
<
ns3:Fld_2_1_A>Value003<
/ns3:Fld_2_1_A> <br>
<
ns3:Fld_2_1_B>Value004<
/ns3:Fld_2_1_B> <br>
<
/ns3:SubStruc_2_1> <br>
<
ns4:Fld_2_A xmlns:ns4="http://www.MyTest.com/My_Namespace/Part4">Value005<
/ns4:Fld_2_A> <br>
<
ns4:Fld_2_B xmlns:ns4="http://www.MyTest.com/My_Namespace/Part4">Value006<
/ns4:Fld_2_B> <br>
<
/ns0:SubStruc_2> <br>
<br>
<
ns0:SubStruc_3> <br>
<
ns5:SubStruc_3_1 xmlns:ns5="http://www.MyTest.com/My_Namespace/Part5"> <br>
<
ns5:Fld_3_1_A>Value007<
/ns5:Fld_3_1_A> <br>
<
ns5:Fld_3_1_B>Value008<
/ns5:Fld_3_1_B> <br>
<
/ns5:SubStruc_3_1> <br>
<
ns0:Fld_3_A>Value009<
/ns0:Fld_3_A> <br>
<
ns5:Fld_3_B xmlns:ns5="http://www.MyTest.com/My_Namespace/Part5">Value010<
/ns5:Fld_3_B> <br>
<
ns2:Fld_3_C xmlns:ns2="http://www.MyTest.com/My_Namespace/Part2">Value011<
/ns2:Fld_3_C> <br>
<
/ns0:SubStruc_3> <br>
<
/ns0:Maint_Struc> <br>
<br>
Things that are wrong with the mapped XML: <br>
- the namespace "http://www.MyTest.com/My_Namespace/Part3" was prefixed with MyNS3 but XI reassigned it to ns0
<br>- original prefixes are not used in the element tags <br>
<br>
Appreciate if anyone can help. <br>
Thanks.Thank you for all your valuable suggestions. Does any know why XI/PI does not acknowledge/use the namespace prefix that is defined in the XML? Is there no other way around this short-coming apart from using XSLT mapping?
<br>
I did try using the anonymizer (as suggested by Manjusha). With the anonymizer I am able to change the namespace prefix in the element tags to the way I want it. However the namespace definition is still showing in the element tag.
<br>
<MyNS2:SubStruc_1 xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2"> <br>
<MyNS2:Fld_1_1_A>Value001</MyNS2:Fld_1_1_A> <br>
<MyNS2:Fld_1_1_B>Value002</MyNS2:Fld_1_1_B> <br>
</MyNS2:SubStruc_1> <br>
<br>
This is almost perfect only if I am able to remove the definition xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2" from the element tag. Suggestion any one?
Thanks All. -
Extracting XML values with namespace prefixes
Hint: I put this topic in "SQL and PL/SQL" but that was a bad idea, I think.
Hi!
I have a XML file:<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/styl.xsl"?>
<wnio:Deklaracja
xmlns:adr="http://crd.gov.pl/xml/schematy/adres/2008/05/09/"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:inst="http://crd.gov.pl/xml/schematy/instytucja/2008/05/09/"
xmlns:meta="http://crd.gov.pl/xml/schematy/meta/2008/05/09/"
xmlns:oso="http://crd.gov.pl/xml/schematy/osoba/2008/05/09/"
xmlns:str="http://crd.gov.pl/xml/schematy/struktura/2009/11/16/"
xmlns:wnio="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xsi:schemaLocation="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/ http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/schemat.xsd">
<wnio:OpisDokumentu><str:CID>[email protected]</str:CID><meta:Identyfikator typIdentyfikatora="idFormularza"><meta:Wartosc>InstytucjaPubliczna/Deklaracja podatku od środków transportowych DT-1</meta:Wartosc></meta:Identyfikator></wnio:OpisDokumentu>
<wnio:Naglowek>
<wnio:KodFormularza kodSystemowy="DT-1(3)"/>
<wnio:WariantFormularza>3</wnio:WariantFormularza>
<wnio:Rok>2008</wnio:Rok>
<wnio:ObowiazekSkladaniaDeklaracji>1</wnio:ObowiazekSkladaniaDeklaracji>
<wnio:MiejsceSkladania/>
</wnio:Naglowek>
<wnio:Podatnik>
<wnio:OsobaPrawna>
<wnio:NIP>345678901</wnio:NIP>
<wnio:PelnaNazwa>Testowa Instytucja Publiczna</wnio:PelnaNazwa>
<wnio:NazwaSkrocona/>
<wnio:REGON>234512345</wnio:REGON>
</wnio:OsobaPrawna>
<wnio:AdresSiedzibyZamieszkania>
<wnio:KodKraju>PL</wnio:KodKraju>
<wnio:Wojewodztwo>ŚLĄSKIE</wnio:Wojewodztwo>
<wnio:Powiat>Katowice</wnio:Powiat>
<wnio:Gmina>Katowice (gmina miejska)</wnio:Gmina>
<wnio:Ulica>ul. Mikołowska</wnio:Ulica>
<wnio:NrDomu>100</wnio:NrDomu>
<wnio:NrLokalu>924</wnio:NrLokalu>
<wnio:Miejscowosc>Katowice (miasto)</wnio:Miejscowosc>
<wnio:KodPocztowy>40-065</wnio:KodPocztowy>
<wnio:Poczta>Katowice</wnio:Poczta>
</wnio:AdresSiedzibyZamieszkania>
</wnio:Podatnik>
<wnio:PozycjeSzczegolowe>
<wnio:D.1>
<wnio:P_22/>
<wnio:P_23/>
</wnio:D.1>
<wnio:D.2>
<wnio:P_28/>
<wnio:P_29/>
</wnio:D.2>
<wnio:P_82/>
<wnio:P_83/>
</wnio:PozycjeSzczegolowe>
<wnio:Zalacznik_DT-1A>
<wnio:P_1/>
<wnio:P_2/>
<wnio:P_22>1</wnio:P_22>
</wnio:Zalacznik_DT-1A>
<wnio:Zalacznik_DT-1A>
<wnio:P_1/>
<wnio:P_2/>
<wnio:P_22>3</wnio:P_22>
</wnio:Zalacznik_DT-1A>
</wnio:Deklaracja>and an overloaded function:
function dodaj_DT1_z_xml(p_dt1 in out nocopy XMLType) return number as
r_dt1 POD_SRTR_DT1%rowtype;
r_dt1a POD_SRTR_DT1A%rowtype;
r_sdek POD_SRTR_DEKLARACJE%rowtype;
l_wariantDT1 number(2);
l_xosf XMLType;
l_xosp XMLType;
l_xadr XMLType;
l_xszcz XMLType;
l_zal XMLType;
l_z XMLType;
l_zno pls_integer;
l_xml XMLType;
l_ns varchar2(10);
-- xmlns:wnio="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/"
begin
if --p_dt1.existsNode('/wnio:Deklaracja')=0 and
p_dt1.existsNode('/Deklaracja','xmlns:wnio="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/"')=0
then return -2; end if;
if p_dt1.existsNode('/wnio:Deklaracja')=1 then
l_ns := 'wnio:';
end if;
if p_dt1.existsNode('/'||l_ns||'Deklaracja')=0 then return -2; end if;
if p_dt1.existsNode('/'||l_ns||'Deklaracja/'||l_ns||'Naglowek')=0 then return -3; end if;
if p_dt1.existsNode('/'||l_ns||'Deklaracja/'||l_ns||'Podatnik')=0 then return -4; end if;
if p_dt1.existsNode('/'||l_ns||'Deklaracja/'||l_ns||'PozycjeSzczegolowe')=0 then return -5; end if;
return 1;
end;
function dodaj_DT1_z_xml(p_dt1 in out nocopy CLOB) return number is
l_xml XMLType;
begin
l_xml := XMLType(p_dt1);
return dodaj_DT1_z_xml(l_xml);
end dodaj_DT1_z_xml;I run the code:declare
v_clob CLOB;
v_out number;
begin
SELECT dok_content INTO v_clob FROM EPUAP.epuap_dokumenty WHERE dok_id=13;
v_out := POD_PCK_SRTR_DT1.DODAJ_DT1_Z_XML(v_clob);
DBMS_OUTPUT.put_line(v_out);
end;the output is -2. What must I change to find the node "wnio:Deklaracja"? I'm newbie in XML and namespaces :(
Help me, please...
Oracle version is 10.2.0.3Hi,
If you declare a namespace prefix then corresponding elements must be qualified.
So, either do :
p_dt1.existsNode('/wnio:Deklaracja','xmlns:wnio="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/"')or use a default namespace declaration :
p_dt1.existsNode('/Deklaracja','xmlns="http://test.epuap.gov.pl/FeResourceServlet/wzor_lokalny/InstytucjaPubliczna/Deklaracja_DT/"')BTW, could you explain what are you trying to accomplish? -
How to extract xml having namespaces
Hi all,
Below is the XML i have :
<?xml version="1.0" encoding="UTF-8" ?>
- <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
- <Request>
<Memid>10</Memid>
<Actid>32</Actid>
<Pax>3</Pax>
<Flt>2012-DEC-10</Flt>
<Username>WebUserNameTest</Username>
</Request>
<Request>
<Memid>1</Memid>
<Actid>3</Actid>
<Pax>2</Pax>
<Flt>2012-DEC-12</Flt>
<Username>WebUserNameTest</Username>
</Request>
</Transaction>
I want to extract the element values :
The below code will help me when i have no namespace , what must be done in order to work with namespace and etract element value
v_string_xml :=
' //Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
v_ssp_table (v_ssp_table.COUNT).memid :=
p_xml_in.EXTRACT (v_string_xml).getnumberval ();
v_string_xml :=
'//Request[' || TO_CHAR (counter_xml) || ']/Actid/text()';
v_ssp_table (v_ssp_table.COUNT).actid :=
p_xml_in.EXTRACT (v_string_xml).getnumberval ();
v_string_xml :=
'//Request['
|| TO_CHAR (counter_xml)
|| ']/Pax/text()';
v_ssp_table (v_ssp_table.COUNT).pax :=
p_xml_in.EXTRACT (v_string_xml).getnumberval ();
v_string_xml :=
'//Request[' || TO_CHAR (counter_xml) || ']/Flt/text()';
v_ssp_table (v_ssp_table.COUNT).flt :=
p_xml_in.EXTRACT (v_string_xml).getstringval ();
v_string_xml :=
'//Request['
|| TO_CHAR (counter_xml)
|| ']/Username/text()';
v_ssp_table (v_ssp_table.COUNT).username :=
p_xml_in.EXTRACT (v_string_xml).getstringval ();
Edited by: akm006 on Mar 19, 2013 11:11 AModie_63 wrote:
AlexAnd wrote:
28 v_string_xml_ns :='xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012"';
You can remove the xsi prefix, no need to make it more verbose than it already is ;)misunderstood
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as scott
SQL>
begin
v_string_xml := 'Transaction/Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
--v_string_xml_ns :='xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012"';
v_string_xml_ns :='xmlns="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012"';
v_ssp := x.EXTRACT(v_string_xml,v_string_xml_ns).getnumberval();
dbms_output.put_line(v_ssp);
end;
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at line 33
SQL>
24 begin
25
26 v_string_xml := 'Transaction/Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
27
28 --v_string_xml_ns :='xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012"';
29 v_string_xml_ns :='xmlns="http://schemas.test.com/Support/Services/test1/2012"';
30
31
32 v_ssp := x.EXTRACT(v_string_xml,v_string_xml_ns).getnumberval();
33
34 dbms_output.put_line(v_ssp);
35
36 end;
37 /
1
PL/SQL procedure successfully completed
SQL> so for no xsi namespace it's work for above case
and for "xsi prefix" doesnt' work
or i missed anything?
2 akm006
So do you have any suggestion on the same.i can't test -
Hello XML Guru,
Could you tell me where i can find informations about how SQL function extract works for extracting XML data stored as relational-object?
Is VIEW always created for extracting XML data when executing this SQL function extract?
Thanks for your help.You'll find documentation on this function in the [Oracle XML DB Developer's Guide| http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb03usg.htm#sthref336] .
HTH
Chris -
SOASuite 11g
Oracle Weblogic Server 10.3.3
Oracle Solaris on SPARC (64-bit) 10
Database: Oracle Server - Enterprise Edition 10.2.0.5
When I start the SOA domain server, I find the following in the log file:
<Feb 25, 2011 10:41:23 AM CET> <Error> <org.apache.commons.digester.Digester> <BEA-000000> <Parse Error at line 9 column 79: <Line 9,
Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
org.xml.sax.SAXParseException: <Line 9, Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
at org.apache.commons.digester.Digester.parse(Digester.java:1785)
at oracle.fabric.composite.Parser.parseComposite(Parser.java:132)
at oracle.integration.platform.kernel.WLSFabricKernelInitializer.deployComposite(WLSFabricKernelInitializer.java:493)
at oracle.integration.platform.kernel.WLSFabricKernelInitializer.prepareCompositeDeployments(WLSFabricKernelInitializer.java:
239)
at oracle.integration.platform.kernel.WLSFabricKernelInitializer.init(WLSFabricKernelInitializer.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
My composite.xml is:
<composite name="JIPSYHandleRTOTaskEBF" revision="1.0" mode="active" state="on"
xmlns="http://xmlns.oracle.com/sca/1.0"
xmlns:ui="http://xmlns.oracle.com/soa/designer/"^M
xmlns:xs="http://www.w3.org/2001/XMLSchema">^M
<import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
<service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
</composite>
But when it has been deployed, I see that this has been changed into:
<composite name="JIPSYHandleRTOTaskEBF" revision="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
<service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
</composite>
(I exported this from MDS).
Apparently, some namespaces are stripped.
This appears to happen during the deploy (using ant), because the version in the generated jar file is already missing the namespaces.
The BPEL processes appear to work fine though.
Why is this happening and how can I prevent these errors?I've fiddled around with the file composite.xml and found the following workaround:
If I change the start of the file to:
<?xml version="1.0" encoding="UTF-8"?>
<composite name="JIPSYUpdateWorkflowReqABCSImpl"
xmlns="http://xmlns.oracle.com/sca/1.0"
xmlns:ui="http://xmlns.oracle.com/soa/designer/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
revision="1.0"
mode="active"
state="on">
it remains unchanged and the errors during deployment are gone. -
VerifyError #1025 - default xml namespace and getter function
I have narrowed the problem down to a a few lines. I have
created a simple example of the problem...
// TestClass.as
package {
import flash.events.EventDispatcher;
public class TestClass extends EventDispatcher {
private var _testVar:String;
public function TestClass() {
var testXML:XML = <node1 xmlns="
http://www.testurl.com/"><node2><node3>some
words of wisdom</node3></node2></node1>;
default xml namespace = testXML.namespace("");
_testVar = testXML.node2.node3;
public function get testVar():String {
return _testVar;
// Test.fla - frame 1
import TestClass;
var myTestClass:TestClass = new TestClass();
var someVar:String = myTestClass.testVar;
trace(someVar);
I get the following error...
verify TestClass/get testVar()
stack:
scope: [global Object$ flash.events::EventDispatcher$
TestClass$]
locals: TestClass
0:getlocal0
stack: TestClass
scope: [global Object$ flash.events::EventDispatcher$
TestClass$]
locals: TestClass
1:pushscope
stack:
scope: [global Object$ flash.events::EventDispatcher$
TestClass$] TestClass
locals: TestClass
2:getlocal1
VerifyError: Error #1025: An invalid register 1 was accessed.
at TestClass/get testVar()
at Test_fla::MainTimeline/Test_fla::frame1()
However if I take out the default xml namespace line, and
create a new namespace it will work.
var testNS:Namespace = new Namespace(testXML.namespace(""));
_testVar = testXML.testNS::node2.testNS::node3;
Thoughts??? It's driving me crazy. Thanks in advance...
leviThe attribute should be in the element's namespace. If I run this snippet on the timeline, it outputs the correct values.
var xml:XML =
<xml>
<animal type="sheep" xmlns="http://blabla">
<name>josh</name>
<age>2</age>
</animal>
<animal type="cow" xmlns="http://blabla">
<name>jim</name>
<age>2</age>
</animal>
</xml>
var ns:Namespace = new Namespace("http://blabla");
default xml namespace = ns;
trace( xml.animal.@type ); // OUTPUT: sheepcow -
SQL Server's FOR XML EXPLICIT functionality in Oracle
What could be the best way to implement SQL Server's FOR XML EXPLICIT functionality? Can someone please give the overview?
Probably you can try General XML forum General XML
Gints Plivna
http://www.gplivna.eu -
Extracting XML from webservice result with Namespaces using E4X
Hi,
I need to extract some data from proprietary Web Service (to be fed to HierarchicalData for dataProvider of ADG).
So I made service.returnType=’e4x’;
In that case it returns data as XML.
I need to get useful data from it after Snapshot:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:msdwHdr="http://xml.msdw.com/ns/appmw/soap/1.0/header">
<msdw:RequestID xmlns:msdw="http://xml.msdw.com/ns/appmw/soap/1.0/header">restsoap#1390182244050#197728273958044232</msdw:RequestID>
<msdwHdr:FinalMessage>true</msdwHdr:FinalMessage>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ADSSnapshotResponse xmlns="http://xml.ms.com/ns/appmw/dataserver/1.0">
<Snapshot seqNo="0">
<BASE_ELEMENT_NAME BASE_ELEMENT_NAME="4.11.2.0">
Using E4X, like:
var root:XML = event.result as XML; //good!
var xmlRoot1:XMLList = root['SOAP-ENV:Body'].ADSSnapshotResponse.Snapshot.BASE_ELEMENT_NAME;
it does return XMLList (tried different variants), but debugger shows nothing at all inside that XMLList.
var root1:XMLList = root.children(); // that returns valid XMLList with 2 XML elements inside
But all other data I could not get if I use any E4X:
Can I skip Envelope, going to Body as one of its children? suppose I can...
a) root.SOAP-ENV:Body would give compilation errors because of ‘-‘, ‘:’
b) root.Body gives blank XMLList
c) root.Body[0] returns NULL
Any idea how to extract the load from ADS Response (envelope)?
What can I do regarding XML Namespaces in E4X ?
If I set service.returnType="xml" it returns data as XMLNode's.
But I prefer to use E4X if possible.
Please help!
TIA,
Oleg.
P.S.: using Flex 4.5.1 with Flex3 ADG.not an implementable option for us and cost prohibitive.
-
How to add namespace prefix to XML file?
I have a file(XML) to proxy scenario. I 've created an asynch Inbound message and a asynch Outbound message.
I have generated the class in Sproxy of my R/3 System.
In the Integration directory I have 2 business system :
-one which sent the file
-my r/3 system
System which send file generate XML like this:
<?xml version="1.0" encoding="UTF-8" ?>
<batch id="20080211001" customer="some customer" user="user" language="EN">
<structure>
<localization>
<string id="customer" text="Customer" />
etc........
As you see, it have not any namespace prefix.
How can I insert namespace prefix in this file with XI tools?Hi Pavel
I am also facing the same issue
my XML structure is quite complex
<ROW EVENT="RE" SEQ="9" MORE="Y" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<FileDate Internal="61409" ROWID="Y">02/17/2009</FileDate>
<FileSeq ROWID="Y">9</FileSeq>
<Event>RE</Event>
<Grp>3</Grp>
<LinkFileTime>42324</LinkFileTime>
<Mrn></Mrn>
<ROW DESCR="RE" TABLE="PAT" EVENT="RE">
<BusTel/>
<BusTelHipaaConsent/>
<Cont1Addr1/>
<ROW DESCR="RE" TABLE="INS" EVENT="RE">
<DictRef1/>
<DictRef10/>
Do i have to create the Message Interface for Outbound Synchronous ..
<DictRef11/> -
How to add an element with a namespace prefix (Part 2)
Hi all,
I previously asked a question about adding an attribute with a namespace prefix to an element that already exists and that declares the namespace prefix here:
https://forums.oracle.com/thread/2610142
I received an answer that works, but now I am stumped again when I have to add an element where the element name has the namespace prefix.
For example, let's say I already have this element:
<A xmlns="namespace" xmlns:def="myns_namespace"/>
And I want to add this element:
<def:B/>
To produce this:
<A xmlns="namespace" xmlns:def="myns_namespace">
<def:B/>
</A>
and NOT this:
<A xmlns="namespace" xmlns:def="myns_namespace">
<def:B xmlns:def="myns_namespace"/>
</A>
This does not work:
SELECT
xmlserialize(document
appendChildXML(
xmltype('<A xmlns="namespace" xmlns:def="myns_namespace"/>')
, '/A'
, xmlelement("def:D")
, 'xmlns="namespace" xmlns:def="myns_namespace"'
indent)
FROM dual;
Because of this error:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00234: namespace prefix "def" is not declared
Error at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.
Is there any way to do this without the child element having the duplicate namespace declaration?
My oracle version is:
Oracle Database 11g Release 11.1.0.7.0 - 64bit ProductionHi,
This one's tricky, so tricky that I think it's not possible using Oracle built-in XML DML functions.
Even XQuery Update cannot do it (for now) because, likewise, the prefix is always redeclared at child level.
The only thing I can think of is XSLT (or maybe DOM manipulation) :
SQL> select xmlserialize(document
2 xmltransform(
3 xmltype('<A xmlns="namespace" xmlns:def="myns_namespace"/>')
4 , xmltype(
5 '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:def="myns_namespace"
7 xmlns:ns0="namespace">
8 <xsl:template match="ns0:A">
9 <xsl:copy>
10 <xsl:element name="def:B"/>
11 </xsl:copy>
12 </xsl:template>
13 </xsl:stylesheet>')
14 )
15 indent
16 )
17 from dual;
XMLSERIALIZE(DOCUMENTXMLTRANSF
<A xmlns="namespace" xmlns:def="myns_namespace">
<def:B/>
</A> -
Error using Extended SQL Function substr
I want to be able to look for the first three letters of a month in the XML and if found replace the 3 letter month (for example SEP-05 to September 05). I have tried the following which throw a namespace exception. Please let me know what I may be doing wrong?
1. <?if:(xdofx:substr(../fsg:ColContext[2]/fsg:ColHeadLine2,1,3)='SEP'?>September<?end if?> should give me September.
The above fails with: Font Dir: E:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
RTFProcessor setLocale: en-us
FOProcessor setData: E:\Work\Bacardi\Reports\XML\US GAAP BALSHEET\XML BL Dir Rpt BS YTD_0126.xml
FOProcessor setLocale: en-us
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:514)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:156)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:916)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:869)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:204)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1535)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:925)
at RTF2PDF.runRTFto(RTF2PDF.java:590)
at RTF2PDF.runXDO(RTF2PDF.java:443)
at RTF2PDF.main(RTF2PDF.java:237)
Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
... 15 more
2. For the year, I would use another form field and do something like this next to the month above: <?xdofx:substr(../fsg:ColContext[2]/fsg:ColHeadLine2,5,2)?> for a result of '05'Hasan
XSL has many native string manipulation functions so you do not need to use our SQL functions when a native XSL one will do:
<?if:substring(normalize-space(../fsg:ColContext[2]/fsg:ColHeadLine2),1,3)='SEP'?>September<?end if?>
See that dang normalize space function again ... had to use it on my FSG sample.
Would it not be easier to either:
1. Have the FSG generate the September YYYY format or
2. Have FSG generate XSD date formats, 'YYYY-MM-DD', then you can just specify the date format in the form fields
Regards, Tim
Maybe you are looking for
-
Hi all, I have libarary1.war and library2.was deployed on the same domain and managed server with app1.ear and app2.ear. App1 uses library1 and app2 uses library2. I want to know is it possible to configure some rights or permissions to enable access
-
How to know current bandwidth to be able to increase or decrease reserved streaming units ?
Hi, how to know egress bandwidth by Azure Api to be able to increase reserved streaming unit if bandwidth reaches over 80%. Currently it is set to 1, but should be able to increase it when bandwidth is more than 160 mpbs(80% of available bandwidth wh
-
FaceTime stopped working around 12th April 2014.
I have an iphone 4 iOS 7.0.3 and FaceTime stopped working around 12th April 2014. This is the same for other members of my family (using another iphone 4, an iphone 4s and an iPad). As soon as FaceTime connects it drops the call immediately. Does any
-
Error Duplicating Target Database
Dear DBA's RH 4 Oracle 9.2.0.8 When I start duplicating my target database with script below everything goes fine until the recover : RMAN> run 2> { 3> allocate auxiliary channel ch1 type sbt; 4> set newname for datafile 1 to '/u02/oradata/SIEBDEV/sy
-
How I can download the In design I already pay? there is not clear info!!
I don't know how to download the in design I already pay. this is extremely frustrating!!!! I went to my i cloud page and there is not clear info in how I can instal the version 7. Is not clear at all. not helpful. This is not good. I need help ASAP.