Converting the Opaque Element into Readable format.

Hi,
Right now, I am using the FTP adapter to continously poll for a new file. Whenever new file comes in, our BPEL process gets initiated. We get the contents of the file in the variable of opaque element( I have given Message Schema is Opaque in the FTP Adapter configuration).
I have to send the content of the file as the attachment in the e-mail. So when I am using the above variable in the e-mail notification, I am getting the data in the non-readable format, since the corresponding variable is of opaque schema. Now my requirement is to convert this non-readable opaque data into the readable data.
Any help is highly appreciatable.

Sorry the code I gave you was decodeing a hex variable into string.
Try this code:
String input = (String)getVariableData("InputBinary");
Base64Decoder Decoder = new Base64Decoder();
String decoded = Base64Decoder.decode(input);
setVariableData("OutputString",decoded);
you will also need to add the java class:
<bpelx:exec import="com.collaxa.common.util.Base64Decoder"/>
Just looking at the Base64 string you are testing. It is missing the 'g' off 'Testing'. The correct binary string should be VGVzdGluZw==
I'm not sure how this code is getting generated but you may need to look in that.
If you want the code to encode into binary use this:
String input = (String)getVariableData("InputString");
Base64Encoder encoder = new Base64Encoder();
byte[] barray = (new String(input)).getBytes();
BigInteger bint = new BigInteger(barray);
String encoded = Base64Encoder.encode(barray);
setVariableData("OutputBinary",encoded);
add the java class:
<bpelx:exec import="com.collaxa.common.util.Base64Encoder"/>
sorry for putting you wrong.
cheers
James

Similar Messages

  • Converting the WAD applications into PDF format

    Hi SAPians,
    I'm in need to convert WAD results into PDF Format using SAP BW 3.5 and Acrobat Reader 7.0. And I've referred some documents in Net, But,they gave ideas only for 3.5 and Acorobat 5 version.
    But i've to convert the WAD results into PDF format only by using Acrobat Reader 7.0. So, kindly let me know the steps to do so.
    Thanks in Advance.
    Jayaprakash J

    Hi Shahid syed,
    Thanks for your reply.
    It was very useful.
    But, i've askd the solution for sap bw 3.5 with Acrobat reader 7.0.
    So, plz let me knw if any solutions for that to make wad reports into pdf format.
    Points will be awarded.
    Thanks & Regards
    Jayaprakash J

  • Convert the XML file into XSD format?

    Hello All,
    I got XML file and i need to convert into XSD format and import it into PI system, so no need to create the structure.
    Please let me know how to convert XML format into XSD format.
    Regards,
    chinna

    Hi ,
    You can use Altova XML Spy software. There just open the xml file and goto Menu bar DTD/Schema there you have an option like Genrate DTD/Schema  click on it and press ok, Then it will ask you for location to store xsd select Desktop or some folder.
    .xsd will be created. and you can import that.
    Thanks.

  • Reg: Convert the currency value into word formate.

    HI all,
    Is there any FM to convert the currency into word formate.
    Ex: 210
    o/p: two hundreden twenty ruppes..

    Hi,
    Try
    SPELL_AMOUNT
    also HR_IN_CHG_INR_WRDS
    Regards,
    Sachin

  • Converting the DATE(yyyymmdd) into MONTH(yyyymm) format

    HAI
    I have one date InfoObject(ZDATE) in the format of YYYYMMDD format.
    My client wants another 'Month InfoObject(ZMONTH) in the format of YYYYMM . This ZMONTH infoobject should be derived from ZDATE.
    So please tell me how can i convert the ZDATE data into ZMONTH format.
    I think , it is possible by writing the ABAP code.
    Please give the ABAP CODE for converting the ZDATE data into ZMONTH format also .
    i wll assing the points
    bye
    rizwan

    Hi Rizwan,
    You can use offset like:
    zmonth = zdate+0(6)
    Zmonth is variable in which yyyymm is going to be stored
    and zdate is variable in which yyyymmdd is stored.
    I think this will slove your issue.
    Thanks=points

  • Convert the flat file to xml format.

    hi,
    I need to write a interface program in the R/3  to pull the flat file data from the unix application server and do some manipulation and place back into the unix application server in XML format, From the unix box XML file taken by the XI server.
    pls give me some idea to convert the flat file to XML format, through any function module or any other logic is there...
    with regards,
    Thambee.

    Hi Thambe
    in addition to the above posts
    Program to convert flat file to XML file.
    please download tool from this link:
    http://www.download.com/Stylus-Studio-2008-XML-Enterprise-Suite/3000-7241_4-10399885.html?part=dl-StylusStu&subj=dl&tag=button&cdlpid=10399885
    how to use:
    http://www.stylusstudio.com/learn_convert_to_xml.html
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    Flat file to XML
    CONVERTION OF FLAT FILE TO XML : NO OUT PUT FOUND
    Converting Idoc flat file representation to XML
    how to convert flat file into IDOC-XML
    Thanks
    sandeep sharma
    PS ; if helpful kindly reward points

  • How to convert cXML dtd files into xsd format and use them into BPEL application

    Hi,
    In my BPEL application I have to use cXML dtd files by converting them into xsd format.
    I have used 'Microsoft Visual Studio' for converting cXML.dtd file into xsd format, for this 1 dtd file I am getting three xsd files (cXML.xsd, cXML1.xsd and cXML2.xsd).
    Please check this once and let me know
    1. why I am getting three xsd files for one dtd file,
    2. how can I use cXML.xsd file in my application, do I ll have to use all the three files in my BPEL app and
    3. what should I include in main xsd file (cXML.xsd) to import other two xsd files.
    kindly check this once and let me know your suggestions .
    Thanks

    Hi,
    While downloading the cXML dtd there will be example xml files. Using this xml's we can generate xsd.
    Regards,
    KANN.

  • Convert MPEG 4 file into different format

    I have a TrekStore Movie Station which only supports formats like DVD (IFO,VOB), VCD (MPGEG1), SVDC/KVCD (MPEG2), DivX 3, DivX5, XviD. In Quick Time Pro Help it says I can convert an save movies into different formats, I just can't find how I can do it.

    I have a TrekStore Movie Station which only supports formats like DVD (IFO,VOB), VCD (MPGEG1), SVDC/KVCD (MPEG2), DivX 3, DivX5, XviD. In Quick Time Pro Help it says I can convert an save movies into different formats, I just can't find how I can do it.
    QT Pro does not "do" multiplexed compression formats. For that you would need an external, third-party, MPEG-based application. iDVD, Toast, Visual Hub, iVCD, MPEG2 Works, etc. would work here to create some of these formats. QT Pro, MPEG Streamclip, and GarageBand can all create DivX and/or XviD files if you have the appropriate QT components installed. (Not sure if you can still find DivX 3 but assume free download of DivX 5.1.1, 5.2.1, and/or Xvid are still readily available on the internet.)

  • How can I create a link that allows users to convert a Wiki pages into PDF format.

    I am working on an enterprise Wiki library site collection, but I want to create a link named “Convert to PDF” , which allow users to convert the current Wiki into a pdf file. I need this link to be displayed some where in all the exsiting Wikis pages, and
    on any new wiki page. Can anyone advice if there is already such as capability within sharePoint 2013.
    Thanks

    Hi,
    For your requirement, we can add this link to the master page, then it will appear in the pages which apply this master page.
    To convert the current page to PDF, you can take consideration of using jsPDF.
    The links below with demos for your reference:
    http://parall.ax/products/jspdf
    Best regards
    Patrick Liang
    TechNet Community Support

  • How can I convert the volume directory into a single file installer?

    How can I convert the volume directory into a single file installer? I would like to hide all the miscillaneous files that I don't care for and be able to have the installer double click a single file and have it automatically install.

    On the second prompt screen when prompted 'What kind of self-extracting Zip file file do you want to make?'
    Are you choosing the second option (self-extracting Zip file for software installation)?
    I have a word file that I created to help me remember - is there anyway to email it to you?

  • The online conversion of my pdf file to word did not correctly convert the tables and certain other formatting.  I wish to obtain a refund.

    The online conversion of my pdf file to word did not correctly convert the tables and certain other formatting.  I wish to obtain a refund.

    Hi yammyamm,
    I'm sorry that your conversion didn't work out for you. Please contact Adobe Customer Support via phone or chat, and an agent will be able to process that cancellation/refund for you. Here is the contact information: Contact Customer Care
    Best,
    Sara

  • Why can't I open the filter gallery in Photoshop CC 2014? I've converted the photo layer into a smart object, but the filter gallery selection is still grayed out.

    Why can't I open the filter gallery in Photoshop CC 2014? I've converted the photo layer into a smart object, but the filter gallery selection is still grayed out. How do I make it active?

    Please go to Help, System Info and Copy then paste here.
    Benjamin

  • How to download the Dynamic data into PPT format

    Hi Friends,
    I have one doubt on WDJ. How to download the Dynamic data into PPT format. For Example Some Dynamic data is available in to View in that One Download Link or button available. Click on Download link or button download that data into PPT Format
    Is it possible for WDJ. If possible please tell me.
    Or
    How to create Business Graphics in Web Dynpro Applications depening up on Excel Data and finally we can download the  Business Graphics  into powerpoint presentation.
    Thank you,
    Regards
    Vijay Kalluri
    Edited by: KalluriVijay on Mar 11, 2011 6:34 AM

    Hi Govindu,
    1. I have one doubt on WDJ. Click on either Submit Buttion or LinkToURL UI we can download the file that file having ppt formate(Text.PPT).
    I am using NWDS Version: 7.0.09 and Java Version: JDK 1.6
    2. is it possible to download the business Graphics in to the PPT by using Java DynPro
    Regards
    VijayK

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • Convert the oracle10g database into standby ( read only mode)

    One month ago, converted the oracle 10g standby database into read and write mode( database is open). I would like to convert the oracle10g database into standby
    Please provide me the steps or document
    Thanks in advance

    user8680248 wrote:
    two months ago we have convert the standyby database into standard database ( read, write)
    NoW I am plannning to convert this database into standby database
    any link or steps pleaseDid you meant you would creating(or you have) another standby database and make that standby database as primary and this as standby
    If this is not what you meant then there is no way you can make this as sandby database.
    Regards
    Anurag

Maybe you are looking for