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

byte declaration error

Hi experts,

can u solve my problem while creating an application for email interactive forms i am getting the error for the following code

byte[] pdfSource = bo.toByteArray();

newEmailNodeElement.setPdfsource(pdfSource);

element is not applicable for the arguments(byte[]).....

can anybody help me in that.....

thanks,

viswa

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 01:44 PM

    I don't know if you can applicate this concept in your code, but instead you use a binary type, try to use a Resource type in your attribute pdfSource.

    There is a link that use Resource object here:

    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71]

    Regards

    Marcos

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2009 at 06:09 AM

    Hi,

    See this code - this the solution for converting the IWDResource to byte array. I think you get some idea.

    InputStream l_is_FileStream = wdContext.currentContextElement().getUploadedFile().read(false);
    int l_int_NoOfBytes = l_is_FileStream.available();
    byte[] byteArray = new byte[l_int_NoOfBytes];
    int l_int_byteRead = l_is_FileStream.read(byteArray, 0, l_int_NoOfBytes);

    Regards,

    Charan

    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.