Hi Daniel, thank you for your response, I'm using CXF 2.5.0.
Now I have found out that when I debug the web-service with my IDE everything work as it should, but if I send the request to the service without debugging it ends up as I already mentioned.
I can't produce a test case because the webservice is for an closed user group (gouverment).
Alex Am 2011-11-23 22:25, schrieb Daniel Kulp:
Any chance you can create a small sample test case showing the issue? Not really sure what would cause it. That said, if you aren't using CXF 2.4.3 or newer, definitely upgrade. Dan On Wednesday, November 23, 2011 1:51:42 PM Alex Declent wrote:I have developed a web-service which receives multiple attachments from a remote web-service via an CXF JAXB client (the client is called from the service), the attachment from the remote service are, one xml document and an undefined number of pdf documents. When I try to add the received attachments to my web-service response the xml document is set and only n-1 data of the received pdf documents. Logging: --------------------------- ID: 8 Encoding: UTF-8 Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:aeb23655-314b-4365-822c-f56f674059d8"; start="<[email protected]>"; start-info="text/xml" Headers: {} Payload: --uuid:aeb23655-314b-4365-822c-f56f674059d8 Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"; Content-Transfer-Encoding: binary Content-ID:<[email protected]> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>...</soap: Envelope> --uuid:aeb23655-314b-4365-822c-f56f674059d8 Content-Type: application/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-ID:<[email protected]> <?xml version="1.0" encoding="UTF-8"?><ns2:Response xmlns:ns2="ns://example.org/types">...</ns2:Response> --uuid:aeb23655-314b-4365-822c-f56f674059d8 Content-Type: application/pdf Content-Transfer-Encoding: binary Content-ID:<[email protected]> %PDF-1.4 %???? 3 0 obj<</Filter/FlateDecode/Length 1137>>stream.... %%EOF --uuid:aeb23655-314b-4365-822c-f56f674059d8 Content-Type: application/pdf Content-Transfer-Encoding: binary Content-ID:<[email protected]> --uuid:aeb23655-314b-4365-822c-f56f674059d8-- Source code: response.setXmlStream(getXmlResponseSource()); for(int i=0; i< client.getResponse().getAttachments().size(); i++){ DataHandler dh = client.getResponse().getAttachments().get(i).getPDFOutStream(); DataSource source = dh.getDataSource(); response.getPdfStream().add(new DataHandler(source.getInputStream(), "application/pdf")) } I have no idea why the last pdf document is not set. Alex
