[ 
http://jira.codehaus.org/browse/XFIRE-972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mika Goeckel resolved XFIRE-972.
--------------------------------

    Resolution: Fixed

Checked in Revision 2153:

Index: StaxSerializer.java
===================================================================
--- StaxSerializer.java (revision 1673)
+++ StaxSerializer.java (revision 2153)
@@ -41,7 +41,12 @@
         String elPrefix = e.getNamespacePrefix();
         String elUri = e.getNamespaceURI();
 
-        String boundPrefix = writer.getPrefix(elUri);
+        // XFIRE-972
+        String boundPrefix = elPrefix;
+        if(elUri != null && !"".equals(elUri)){
+            boundPrefix = writer.getPrefix(elUri);
+        }
+        
         boolean writeElementNS = false;
         if (boundPrefix == null || !elPrefix.equals(boundPrefix))
         {


> StaxSerializer improper handling of empty namespace
> ---------------------------------------------------
>
>                 Key: XFIRE-972
>                 URL: http://jira.codehaus.org/browse/XFIRE-972
>             Project: XFire
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.5
>         Environment: Weblogic 9.2
>            Reporter: Mika Goeckel
>            Assignee: Mika Goeckel
>             Fix For: 1.2.6
>
>
> Bea's stax implementation throws an IllegalArgumentException if 
> XMLStreamWriter.getPrefix is called with null or "" (EMPTY_STRING) argument 
> as URI.
> This can be reproduced with the CustomXFireFaultTest using 
> -Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory 
> and having weblogic.jar on the classpath of the JUnit test.
> The quick workaround is to test for empty namespace url and assume an empty 
> prefix (I'm not sure if this applies to all situations.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to