S3Engine engine = new S3Engine();
try {
logRequest(request);
MultiPartDimeInputStream ds = new MultiPartDimeInputStream( request.getInputStream());
// -> the first stream MUST be the SOAP party
if (ds.nextInputStream())
{
//logger.debug( "DIME msg [" + ds.getStreamType() + "," + ds.getStreamTypeFormat() + "," + ds.getStreamId() + "]" );
byte[] buffer = new byte[8192];
bytesRead = ds.read( buffer, 0, 8192 );
//logger.debug( "DIME SOAP Bytes read: " + bytesRead );
ByteArrayInputStream bis = new ByteArrayInputStream( buffer, 0, bytesRead );
putRequest = toEnginePutObjectRequest( bis );
}
// -> we only need to support a DIME message with two bodyparts
if (null != putRequest && ds.nextInputStream())
{
InputStream is = ds.getInputStream();
putRequest.setData( is );
}
// -> need to do SOAP level auth here, on failure return the SOAP fault
StringBuffer xml = new StringBuffer();