I was given a wsdl by a client from which I've generated a service and related classes. The expected attachment is a PDF.
This is the structure of the response from their service: ------=_Part_127_1.2 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <[email protected]> <env:Envelope> .... <ns2:FetchDocumentPayload> <ns2:attachment>cid:[email protected]</ns2:attachment> </ns2:FetchDocumentPayload> .... </env:Envelope> ------=_Part_127_1.2 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-Id: <[email protected]> ...pdf byte content.... ------=_Part_127_1.2-- The client side generated service usage looks something like this: FetchDocumentResponse response = getDocService().fetchDocument(request); Object attachment = response.getFetchDocumentPayloadType().getAttachment(); There are no MTOM annotations on the generated FetchDocumentResponse class. How do I read byte[] data from the response? Additionally, I get a “Content is not allowed in prolog” error when trying to consume the service. -- View this message in context: http://cxf.547215.n5.nabble.com/consuming-attachments-from-a-service-client-generated-by-wsdl2java-tp5725306.html Sent from the cxf-user mailing list archive at Nabble.com.
