[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-370) Namespace verbosity when
From:       "Philippe Mouawad (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2009-02-17 12:43:00
Message-ID: 1946763737.1234874580316.JavaMail.jira () brutus
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/XMLBEANS-370?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674196#action_12674196 ] 

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

Hello,
The bug was in Axis and the way it used Axiom.
See https://issues.apache.org/jira/browse/AXIS2-3760

It can be closed

> 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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic