cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Ill

Former Member
0 Kudos

Hi ,

I am doing File upload application. I am sending code

public void onActionUploadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionUploadFile(ServerEvent)

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(

IPrivateFileUploadView.ICtx_vn_UploadDownloadFileElement.CTX__VA__FILE_RESOURCE);

//Get Modifiable binary type from the attribute info ,

//requires type cast.

IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();

IPrivateFileUploadView.ICtx_vn_UploadDownloadFileElement fileElement = wdContext.currentCtx_vn_UploadDownloadFileElement();

if(fileElement.getCtx_va_FileResource() != null)

{

try{

String mimeType = binaryType.getMimeType().toString();

byte [] file = fileElement.getCtx_va_FileResource();

//Get Extension of Uploaded File

fileElement.setCtx_va_FileExtension(binaryType.getMimeType().getFileExtension());

msgMgr.reportSuccess("File Extension :" + wdContext.currentCtx_vn_UploadDownloadFileElement().getCtx_va_FileExtension());

msgMgr.reportMessage(IMessageFileUpDownloadComp.SF_UPLOAD,new Object[] {binaryType.getFileName()}, false);

}catch(Exception e)

{

throw new WDRuntimeException(e.getMessage());

}

}

For SF_Upload , I created message pool like message "File "" Created"

I am getting error in this action like "Illegal Argument Exception".

Please do the needfull.

Thanks

Risha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Risha,

Please check the line number on which you are getting this error and paste that portion of code in the thread

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Problem Solved

chander_kararia4
Contributor
0 Kudos

Hi Risha,

Please mark the thread as answered & in future always do once got the solution. Thanks.

Regards

Chander Kararia