axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas Theisen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-2068) StAXOMBuilder is stripping off namspace prefix's from attributes that need namespace qualification
Date Wed, 31 Jan 2007 21:41:05 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-2068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lucas Theisen updated AXIS2-2068:
---------------------------------

    Attachment: omserializerutil_patch.txt

This is a patch to fix this problem.  It is actually part of the AXIOM module, and not AXIS
itself, but I was thinking you could get this to the right spot and get it added to the source
tree.

> StAXOMBuilder is stripping off namspace prefix's from attributes that need namespace
qualification
> --------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2068
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2068
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>         Environment: Using Axis2-1.1.1 on Fedora Core 4.
>            Reporter: Lucas Theisen
>            Priority: Critical
>         Attachments: omserializerutil_patch.txt, TestStAXOMBuilder.java
>
>
> Here is a code sample:
> public class TestStAXOMBuilder {
>     /**
>      * @param args
>      */
>     public static void main( String[] args ) throws Exception {
>         String xmlString = "<root xmlns='http://custom.com'><node cust:id='123'
xmlns:cust='http://custom.com' /></root>";
>         org.apache.xmlbeans.XmlObject param = org.apache.xmlbeans.XmlObject.Factory.parse(
xmlString );
>         
>         // print out the object before it gets processed
>         System.out.println( "before - '" + param.toString( ) + "'" );
>         
>         // copied code from the generated stub class toOM method
>         org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new org.apache.axiom.om.impl.builder.StAXOMBuilder(
>                 org.apache.axiom.om.OMAbstractFactory.getOMFactory( ),
>                 new org.apache.axis2.util.StreamWrapper( param
>                         .newXMLStreamReader( ) ) );
>         org.apache.axiom.om.OMElement documentElement = builder
>                 .getDocumentElement( );
>         ((org.apache.axiom.om.impl.OMNodeEx) documentElement).setParent( null );
>         // end copied code
>         // now print the object after it has been processed
>         System.out.println( "after - '" + documentElement.toString( ) + "'" );
>     }
> }
> The output I get from running this is:
> before - '<root xmlns="http://custom.com">
>   <node cust:id="123" xmlns:cust="http://custom.com"/>
> </root>'
> after - '<root xmlns="http://custom.com"><node xmlns:cust="http://custom.com"
id="123" /></root>'
> Notice that the namespace prefix "cust:" is removed from the "id" attribute therby making
this an invalid xml.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message