//@FormDataParam("file") InputStream fileStream,
//@FormDataParam("portfolioName") String portfolioName,
//@FormDataParam("dataField") String dataField
//@FormDataParam("dataProvider") String dataProvider
) throws IOException {
FormDataBodyPart fileBodyPart = getBodyPart(formData, "file");
FormDataBodyPart filexmlBodyPart = getBodyPart(formData, "filexml");
if (filexmlBodyPart.getFormDataContentDisposition().getFileName().toLowerCase().endsWith("xml")) {
// xml can contain multiple portfolios
Object filexmlEntity = filexmlBodyPart.getEntity();
InputStream filexmlStream = new WorkaroundInputStream(((BodyPartEntity) filexmlEntity).getInputStream());
for (PortfolioReader portfolioReader : returnPorfolioReader(filexmlStream)) {
xmlPortfolioCopy(portfolioReader);
}
return Response.ok("Upload complete").build();