int state = new HttpClient().executeMethod(method);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileUtil.copyInputStream(method.getResponseBodyAsStream(), baos);
System.err.println(baos.toString());
assertEquals(HttpServletResponse.SC_OK, state);
SoapMessage msg = new SoapMarshaler().createReader().read(new ByteArrayInputStream(baos.toByteArray()), method.getResponseHeader("Content-Type").getValue());
DataHandler att = (DataHandler) msg.getAttachments().values().iterator().next();
ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
IoUtil.copyStream(att.getInputStream(), baos2);
assertEquals("<xsl:stylesheet />", baos2.toString());
assertEquals(1, msg.getAttachments().size());