axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David C Leung <dcl...@MIT.EDU>
Subject problem with chunking
Date Mon, 21 Aug 2006 20:03:21 GMT
I'm trying to turn off chunking from the client side.  Looking at the
archives, it seems that

	options.setProperty(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,
                            "false");

is the right answer, but it's not doing the right thing.

Can anyone please give me a pointer as to why this isn't working?

thanks in advance...

My code:
    User_defined_wsServiceStub stub = new User_defined_wsServiceStub("-url-");

    Options options=stub._getServiceClient().getOptions();
    options.setProperty(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,
                        "false");
    stub._getServiceClient().setOptions(options);

    String getUDString = "--data--";
    XMLStreamReader parser =
      XMLInputFactory.newInstance().createXMLStreamReader(new
        StringReader(getUDString));

    StAXOMBuilder builder = new StAXOMBuilder(parser);
    OMElement docElement = builder.getDocumentElement();
    OMElement response = stub.insertUserDefined(docElement);
        

My (highly pruned) output:

DEBUG header - >> "User-Agent: Axis/2.0[\r][\n]"
DEBUG header - >> "SOAPAction: ""[\r][\n]"
DEBUG header - >> "Host: dev.codecorrect.com[\r][\n]"
DEBUG header - >> "Transfer-Encoding: chunked[\r][\n]"
DEBUG header - >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
DEBUG header - >> "[\r][\n]"

	[...lots of debug messages...]

java.lang.RuntimeException: org.apache.axiom.om.OMException:
java.lang.RuntimeException: [was class java.io.IOException] Attempted read
on closed stream.
	at com.medaptus.Test.main(Test.java:26)
Caused by: org.apache.axiom.om.OMException: java.lang.RuntimeException:
[was class java.io.IOException] Attempted read on closed stream.
	at
	org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
	at
	org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:552)
	at
	org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElementImpl.java:562)
	at
	org.apache.axiom.om.impl.llom.OMElementImpl.getText(OMElementImpl.java:684)
	at com.medaptus.Test.nonDataBindingTest(Test.java:87)
	at com.medaptus.Test.main(Test.java:24)
Caused by: java.lang.RuntimeException: [was class java.io.IOException]
Attempted read on closed stream.
	at
	com.ctc.wstx.util.ExceptionUtil.throwRuntimeException(ExceptionUtil.java:18)
	at
	com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:673)
	at
	com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3471)
	at
	com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:776)
	at
	org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:146)
	... 5 more
Caused by: java.io.IOException: Attempted read on closed stream.
	at
	org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:165)
	at
	org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:125)
	at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:354)
	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
	at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
	at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
	at
	com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)
	at
	com.ctc.wstx.sr.StreamScanner.loadMoreFromCurrent(StreamScanner.java:988)
	at
	com.ctc.wstx.sr.StreamScanner.parseFullName2(StreamScanner.java:1864)
	at
	com.ctc.wstx.sr.StreamScanner.parseFullName(StreamScanner.java:1822)
	at
	com.ctc.wstx.sr.StreamScanner.parseEntityName(StreamScanner.java:1927)
	at
	com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1438)
	at
	com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4400)
	at
	com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:3930)
	at
	com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3509)
	at
	com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3469)
	... 7 more

thanks,
dave

- --k7LJn0uw022874.1156189740/tla.mit.edu--


------- End of Forwarded Message


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message