private void doSoapGetMap( SOAPVersion soapVersion, HttpResponseBuffer response, XMLStreamReader xmlStream ) throws OWSException, XMLStreamException, IOException, SOAPException { response.setContentType( "application/xop+xml" ); GetMapParser getMapParser = new GetMapParser(); GetMap getMap = getMapParser.parse( xmlStream ); Map<String, String> map = new HashMap<String, String>(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); doGetMap( getMap, map, VERSION_130, stream ); String contentId = UUID.randomUUID().toString(); SOAPMessage message = createSoapMessage( soapVersion, contentId ); AttachmentPart attachmentPart = createAttachment( getMap, stream, message, contentId ); message.addAttachmentPart( attachmentPart ); message.writeTo( response.getOutputStream() ); }