Thanks. I'll give it a try.
I very much appreciate your speedy replies btw ;-).
Henk.
On Jan 25, 2010, at 8:55 AM, Daniel Kulp wrote:
>
> Definitely shouldn't be any size limit.....
>
>> IOUtils.copy(is, bos);
>> is.close();
>> bos.close();
>>
>> String response = bos.getOut().toString();
>> log.debug("SOAP Response xml: " + response);
>
> Try changing the above to
>
> IOUtils.copy(is, bos);
> is.close();
> bos.flush();
>
> String response = bos.getOut().toString();
> log.debug("SOAP Response xml: " + response);
> bos.close();
>
> Most likely, the bos.close() is triggering the temp file to be deleted as
> that's the last stream to access the file.
>
>
> Dan
>
>
> On Sun January 24 2010 10:57:34 am Henk Flipman wrote:
>> Hi,
>>
>> are there any size limits I should be aware of? I'm seeing the following
>> exceptions while parsing large responses:
>>
>> Caused by: javax.xml.ws.soap.SOAPFaultException: Error reading
>> XMLStreamReader. at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
>>
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>> at [row,col {unknown-source}]: [1,0]
>> at
>> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)
>>
>> These responses are around 300K.
>>
>> I wrote an in-interceptor to log the incoming message, and the string I get
>> is blank. I used:
>>
>> public void handleMessage(Message message) {
>> InputStream is = message.getContent(InputStream.class);
>>
>> if (is == null) {
>> return;
>> }
>>
>> CachedOutputStream bos = new CachedOutputStream();
>> try {
>> IOUtils.copy(is, bos);
>> is.close();
>> bos.close();
>>
>> String response = bos.getOut().toString();
>> log.debug("SOAP Response xml: " + response);
>>
>> message.setContent(InputStream.class,
>> bos.getInputStream()); } catch (IOException e) {
>> throw new Fault(e);
>> }
>> }
>>
>> Any thought?
>>
>> Thanks.
>>
>> Henk
>>
>
> --
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog