protected Object getCommonPart() { Object result = null; try { MultipartServiceContext multiPartCtx = (MultipartServiceContext) getServiceContext(); result = multiPartCtx.getInputPart(ctx.getCommonPartLabel(), getCommonPartClass()); } catch (Exception e) { if (logger.isDebugEnabled() == true) { logger.debug("Could not extract common part from multipart input.", e); } } return result; }
/** * Creates the document handler. * * @param serviceContext the service context * @param schemaName the schema name * @param commonClass the common class * @return the document handler * @throws Exception the exception */ public DocumentHandler createDocumentHandler( ServiceContext<PoxPayloadIn, PoxPayloadOut> serviceContext, String schemaName, Class<?> commonClass) throws Exception { DocumentHandler result = null; MultipartServiceContext ctx = (MultipartServiceContext) serviceContext; Object commonPart = null; if (ctx.getInput() != null) { commonPart = ctx.getInputPart(schemaName); } result = super.createDocumentHandler(ctx, commonPart); return result; }