[ 
https://issues.apache.org/jira/browse/XMLBEANS-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591084#action_12591084
 ] 

Philippe Mouawad commented on XMLBEANS-370:
-------------------------------------------


Bug in Axiom:
https://issues.apache.org/jira/browse/WSCOMMONS-327

Bug on Axis2:
https://issues.apache.org/jira/browse/AXIS2-3760

> Namespace verbosity when serialized with AXIOM API 
> ---------------------------------------------------
>
>                 Key: XMLBEANS-370
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-370
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Binding, XmlObject
>    Affects Versions:  Version 2.3,  Version 2.3.1
>            Reporter: Philippe Mouawad
>         Attachments: NamespaceBug.zip
>
>
> XMLBeans used with Axis2 generates lot of namespaces declaration.
> Is it a bug or is there a way to reduce it ?
> With this code:
>               GetLocatedProductsDocument document = 
> GetLocatedProductsDocument.Factory
>                               .newInstance(new 
> XmlOptions().setSaveAggressiveNamespaces());
>               GetLocatedProductsDocument.GetLocatedProducts 
> getLocatedProducts = document
>                               .addNewGetLocatedProducts();
>               for (int i = 0; i < 10; i++) {
>                       ProductRequest productRequest = 
> getLocatedProducts.addNewParam0();
>                       productRequest.setCallType(1);
>                       productRequest.setFamilyCode(1);
>                       productRequest.setModuleCode(1);
>                       productRequest.setSubFamilyCode(1);
>               }
>               XmlOptions xmlOptions = new XmlOptions();
>               xmlOptions.setSaveNamespacesFirst();
>               xmlOptions.setSaveAggressiveNamespaces();
>               
>               org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new 
> org.apache.axiom.om.impl.builder.StAXOMBuilder(
>                               OMAbstractFactory.getOMFactory(),
>                               new 
> org.apache.axis2.util.StreamWrapper(document.newXMLStreamReader(xmlOptions)));
>               org.apache.axiom.om.OMElement documentElement = builder
>                               .getDocumentElement();
>                
> ((org.apache.axiom.om.impl.OMNodeEx)documentElement).setParent(null);
>               documentElement.serialize(System.out, new OMOutputFormat());
> Here is an example:
> <getLocatedProducts 
> xmlns="http://v1.product.ws.store.kingfisher.com";><param0><callType 
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0><param0><callType
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</callType><familyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</familyCode><moduleCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</moduleCode><subFamilyCode
>  
> xmlns="http://data.v1.product.ws.store.kingfisher.com/xsd";>1</subFamilyCode></param0></getLocatedProducts>
> Thank you

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to