ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "D A Jasintha Kapilajith Dasanayaka (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AXIOM-395) "WrappedTextNodeOMDataSourceFromReader" looses some data when processing large text base message
Date Mon, 24 Oct 2011 15:53:34 GMT
"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


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


Mime
View raw message