You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Amila Jayasekara (JIRA)" <ji...@apache.org> on 2011/09/02 11:56:09 UTC
[jira] [Created] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Axiom add unparsable namespace elements when there is an empty namespace in an XML message
------------------------------------------------------------------------------------------
Key: AXIOM-386
URL: https://issues.apache.org/jira/browse/AXIOM-386
Project: Axiom
Issue Type: Bug
Components: API
Affects Versions: 1.2.9
Environment: Ubuntu, Linux
Reporter: Amila Jayasekara
I have following XML,
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Id-687052362">
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>For input string: "1er"</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
When this is parsed through AXIOM-API, i get following,
<?xml version="1.0" encoding="UTF-8"?>
<fragment
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
<faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
<detail xmlns:axis2ns36=""></detail>
</soapenv:Fault>
</fragment>
Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
When parse through SAX we get following exception,
[Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.wso2.my.Client.main(Client.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
We should not re-declare namespaces for elements with empty namespaces.
Thanks
AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Amila Jayasekara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Jayasekara updated AXIOM-386:
-----------------------------------
Attachment: AXIOM-386.patch
Attaching a patch.
Thanks
AmilaJ
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Amila Jayasekara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097739#comment-13097739 ]
Amila Jayasekara commented on AXIOM-386:
----------------------------------------
Hi Andreas,
I tested with 1.2.13-SNAPSHOT and i was not able to reproduce this issue.
Thanks
AmilaJ
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Amila Jayasekara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Jayasekara updated AXIOM-386:
-----------------------------------
Attachment: saxparsertest.zip
Attaching a sample program which demonstrates the failure of parsing an xml with declared empty namespaces.
Thanks
AmilaJ
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated AXIOM-386:
----------------------------------
Fix Version/s: 1.2.13
Assignee: Andreas Veithen
Labels: (was: security)
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Assignee: Andreas Veithen
> Fix For: 1.2.13
>
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Resolved] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Amila Jayasekara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Jayasekara resolved AXIOM-386.
------------------------------------
Resolution: Fixed
Resolving this as it is fixed in 1.2.13-SNAPSHOT
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Amila Jayasekara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096067#comment-13096067 ]
Amila Jayasekara commented on AXIOM-386:
----------------------------------------
Hi Andreas,
I will test with 1.2.13-SNAPSHOT and will get back to you.
Thanks
AmilaJ
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-386) Axiom add unparsable namespace
elements when there is an empty namespace in an XML message
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095921#comment-13095921 ]
Andreas Veithen commented on AXIOM-386:
---------------------------------------
I believe that this was fixed by r1147476. Can you test this scenario with 1.2.13-SNAPSHOT?
> Axiom add unparsable namespace elements when there is an empty namespace in an XML message
> ------------------------------------------------------------------------------------------
>
> Key: AXIOM-386
> URL: https://issues.apache.org/jira/browse/AXIOM-386
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.9
> Environment: Ubuntu, Linux
> Reporter: Amila Jayasekara
> Labels: security
> Attachments: AXIOM-386.patch, saxparsertest.zip
>
>
> I have following XML,
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="Id-687052362">
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>For input string: "1er"</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> When this is parsed through AXIOM-API, i get following,
> <?xml version="1.0" encoding="UTF-8"?>
> <fragment
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
> <faultcode xmlns:axis2ns34="">soapenv:Server</faultcode>
> <faultstring xmlns:axis2ns35="">For input string: "1er"</faultstring>
> <detail xmlns:axis2ns36=""></detail>
> </soapenv:Fault>
> </fragment>
> Note that some empty namespaces (xmlns:axis2ns34="") are added to <faultcode> elements. These elements cannot be parsed using a SAX parser.
> When parse through SAX we get following exception,
> [Fatal Error] :1:493: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="axis2ns34",rawname="xmlns:axis2ns34"" is invalid. Prefixed namespace bindings may not be empty.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at org.wso2.my.Client.main(Client.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> We should not re-declare namespaces for elements with empty namespaces.
> Thanks
> AmilaJ
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org