You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "D A Jasintha Kapilajith Dasanayaka (Updated) (JIRA)" <ji...@apache.org> on 2011/10/24 18:01:32 UTC

[jira] [Updated] (AXIOM-395) "WrappedTextNodeOMDataSourceFromReader" looses some data when processing large text base message

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

D A Jasintha Kapilajith Dasanayaka updated AXIOM-395:
-----------------------------------------------------

    Attachment: SmooksTestCase.zip

hi

Here i have attached a test-case for testing this issue

Thanks

                
> "WrappedTextNodeOMDataSourceFromReader" looses some data when processing large text base message
> ------------------------------------------------------------------------------------------------
>
>                 Key: AXIOM-395
>                 URL: https://issues.apache.org/jira/browse/AXIOM-395
>             Project: Axiom
>          Issue Type: Bug
>            Reporter: D A Jasintha Kapilajith Dasanayaka
>            Priority: Critical
>         Attachments: SmooksTestCase.zip
>
>
> we are trying to read larger text content through a mediator using axiom . our  code is as follows 
>   private static String readFile(String file) throws IOException {
>  
> 	FileInputStream fin = new FileInputStream(file);
> 	OMFactory factory = OMAbstractFactory.getOMFactory();
>         String charSetEnc = BuilderUtil.getCharSetEncoding("text/plain");
>         QName wrapperQName = BaseConstants.DEFAULT_TEXT_WRAPPER;
>         Reader reader;
>         try {
>             reader = new InputStreamReader(fin, charSetEnc);
>         } catch (UnsupportedEncodingException ex) {
>             throw new AxisFault("Unsupported encoding: " + charSetEnc, ex);
>         }
>         OMElement om =  new OMSourcedElementImpl(wrapperQName, factory,
>                 new WrappedTextNodeOMDataSourceFromReader(wrapperQName, reader));
> 		return ((OMText) om.getFirstOMChild()).getText();
> 	}
> Our file size is  8 KB but this method return only 4 KB all other data has been dropped.we experienced that  there is chunk size defined in WrappedTextNodeStreamReader class and it has been set to 4096
>  but if return  "om.getText();" we can get the complete String 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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