Can you show us a bit more of your code, in particular how it creates the StAXSOAPModelBuilder?
Andreas On Tue, Oct 26, 2010 at 14:29, Anirban Majumdar <[email protected]> wrote: > Hi, > > > > I am using an abstraction over HTTPClient i.e. Camel-Http component to > communicate with a remote Webservice. > > The remote Webservice handles attachments without using MTOM. > > I called a method on the Webservice which returns an inline base64 encoded > attachment with it. > > As the remote Webservice is unaware of the length of the attachment, it > sends it in chunked form > > > > The response with chunked data looks like this in TCPMon. > > > > 2000 > > <?xml version="1.0" ?><S:Envelope > xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:GetFileResponse > xmlns:ns2="http://www.example.org/Danger/"><xmlPayload>LlJNRgAAABIAAQAAAAAAAAAGUFJPUAAAADIAAAAAUMAAA > > AAAAAAAAAAQbG9naWNhbC1maWxlaW5mbwAAAj8AAAI/AAAAAAAAAAsAAAAaAAAJSW5kZXhhYmxlAAAAAAAEAAAAAQA > > : > > : > > : > > 2000 > > UKLJli8cAss/98U+OllJQfyuNI7/qg6b2gzlQ4GKDNv0iBMnUFGD/nVAqQWklZ0W956TkEUTbQKYf/aCS9J6VDPppbVDrRmKz4P3pima > > : > > : > > : > > AAAAAAAAABAAAAAA==</xmlPayload></ns2:GetFileResponse></S:Body></S:Envelope> > > 0 > > > > > > At the client side, I am using axiom’s StAXSOAPModelBuilder to build a SOAP > structure. > > The StaxSOAPModelBuilder only returns the first chunk when I retrieved the > attachment using following code. > > > > DataHandler dataHandler = null; > > OMText omText = null; > > > > omText = (OMText) omElement.getFirstOMChild(); > > omText.setBinary(true); > > dataHandler = (DataHandler) omText.getDataHandler(); > > > > As per my understanding the white space after the chunk de-limiters could be > a reason for getting the first chunk only. > > > > Please suggest how to get the whole attachment when the response is sent as > chunked by the remote Webservice. > > > > Thanks, > > -------- > > anirban > >
