Skip to Content
author's profile photo Former Member
Former Member

Parse method is not possible for this type Exception in web dynpro

I have a file upload component and one button in a view.

I have created a binary type context element and mapped it with fileupload component.while clicking the submit button I am getting " Parse method is not possible for this type" exception.

help me out.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2007 at 05:40 AM

    HI Sridhar,

    U must add

    IWDAttributeInfo file=wdContext.nodeUpolad().getNodeInfo().getAttribute(IPrivateHomeView.IContextElement.<UploadVariable>);

    IWDModifiableBinaryType b=(IWDModifiableBinaryType)file.getModifiableSimpleType();

    in the wdDoinit()

    Regards

    Fahad Hamsa

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 22, 2007 at 04:57 AM

    Hi

    U have to create two contexts, one of type binary and bind it to data property of FileUpload UI element and other of type type com.sap.ide.webdynpro.uielementdefinitions.Resource and bind it to Resource property of FileUpload UI.. now paste the code of ur action here..

    Read this

    /people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70

    Regards

    Puneet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2007 at 05:02 AM

    Hi,

    Please use <a href="/people/community.user/blog/2006/10/18/how-to-parse-xml-file-uploaded-from-client blog for a way to use the FileUpload UI element. Don't use the binary types.

    Regards,

    Satyajit.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2007 at 05:24 AM

    Hi sridhar,

    Use this code for Upload

    context u create one attribute(up),u assign the data type as "Resource"(which is dictionary type)

    InputStream text = null;

    int temp = 0;

    try

    {

    File file = new File(wdContext.currentContextElement().getUp().getResourceName());

    FileOutputStream op = new FileOutputStream(file);

    if(wdContext.currentContextElement().getUp()!=null)

    {

    text = wdContext.currentContextElement().getUp().read(false);

    while((temp=text.read())!=-1)

    {

    op.write(temp);

    }

    }

    op.flush();

    op.close();

    }

    catch(Exception e)

    {

    e.printStackTrace();

    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:41 AM

    Hi,

    I am trying to upload a file to km using webdynpro java. I am using sap netweaver 04. i have a FileUpload ui and a upload button. Context i created an attribute of type "binary". I got an error at runtime

    " Parse method is not possible for this type". How did you resolve this error. I cannot find "Resource". You have some blog or code for this.

    Could you please help me out in solving this issue?

    Regards,

    Divya

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.