How to send a image or bmp file through SMS

Hai All,
My requirement is that,I have to send a image(company logo) with my text message.Now problem is that I am using XML API .means I am Converting that image into hexa code and sending that by encoding according to my service providers specifications.but they didn't provide what should be the UDH format and format of image data.So please help me in this as I am stucking here for about a month.Any Suggestions will be appreciated.
Thanks & Regards:
SEVish

Hi Atul,
when i am converting my image into hexacode then it fits in three sms ,So sms can be multiple but it should be reassembled when it reaches to the client's device. My service provider told me to use XML API to send sms through my application and yes I am using HTTPPOST method .I am sending a piece of code please give me some suggestions after analyzing it.
Thanks in Advance
SEVish
public static void ImageTransmission(String ot) throws HttpException, IOException{
          String smsSchema          =     null;
          String mobileNos           =      "919857555992";
String str10                = "%30%00%00%04%54%65%73%74%02%01%00%00%48%1c%01%66%66%66%66%66%66%66%66%66%99%99%99%99%99%99%99%99%99%80%00%00%00%00%00%00%00%01%40%00%00%00%60%00%E0%00%02%40%00%00%0E%90%03%10%00%02%80%00%00%31%08%0C%F3%B8%01%80%00%00%40%04%11%04%44%01%40%00%00%FF%FE%2F%8B%12%02%40%00%00%00%00%53%8C%AA%02%80%00%00%00%00%62%89%C4%01%80%00%00%00%00%41%41%40%01%40%00%00%00%00%01%42%80%02%40%00%20%00%00";
String str20                = "%01%42%80%02%80%01%F0%00%00%00%A2%80%01%80%0F%FE%00%00%00%A5%00%01%5F%FF%FF%FF%FF%FE%A5%7F%FA%40%0A%AA%00%00%00%55%00%02%82%01%50%04%40%01%5D%08%A1%88%10%24%80%00%40%FF%02%01%40%41%00%01%00%03%AB%E0%02%44%00%00%08%20%0D%55%58%82%80%10%14%40%00%1A%AA%AC%01%80%00%00%00%00%35%55%56%01%40%01%00%00%80%6A%AA%AB%02%40%00%00%00%00%55%55%55%02%80%00%00%00%00%00%00%00%01%99%99%99%99%99%99%99";
String str30                = "%99%99%66%66%66%66%66%66%66%66%66";
HttpClient client           =     null;
          PostMethod httppost     =      null;
          String encodedMsg          =     null;
          String[] smstohex           =      new String[10];
          String     responseString      =     null;
          String[] sms                =      new String[10];
          VSFEncoder vsf           =      new VSFEncoder();
/* XML format for sending SMS */
          sms[0] ="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"+
     "<!DOCTYPE MESSAGE SYSTEM \"http://127.0.0.1/psms/dtd/messagev12.dtd\" >"+
          "<MESSAGE VER=\"1.2\">"+"<USER USERNAME=\""+"XYZ"+"\" PASSWORD=\""+"XYZ"+"\"/>"+
          "<SMS UDH=\"1\" CODING=\"1\" TEXT=\""+ ot +"\" PROPERTY=\"0\" ID=\"1\">"+
     "<ADDRESS FROM=\"Flexware\" TO=\"" +mobileNos+"\" SEQ=\"1\"/>"+
          "</SMS></MESSAGE>";
          sms[1] ="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"+
     "<!DOCTYPE MESSAGE SYSTEM \"http://127.0.0.1/psms/dtd/messagev12.dtd\" >"+
          "<MESSAGE VER=\"1.2\">"+"<USER USERNAME=\""+"XYZ"+"\" PASSWORD=\""+"XYZ"+"\"/>"+
          "<SMS UDH=\"2\" CODING=\"1\" TEXT=\""+ot+"\" PROPERTY=\"0\" ID=\"2\">"+
     "<ADDRESS FROM=\"Flexware\" TO=\"" +mobileNos+"\" SEQ=\"2\"/>"+
          "</SMS></MESSAGE>";
          sms[2] ="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"+
     "<!DOCTYPE MESSAGE SYSTEM \"http://127.0.0.1/psms/dtd/messagev12.dtd\" >"+
          "<MESSAGE VER=\"1.2\">"+"<USER USERNAME=\""+"XYZ"+"\" PASSWORD=\""+"XYZ"+"\"/>"+
          "<SMS UDH=\"3\" CODING=\"1\" TEXT=\""+ot+"\" PROPERTY=\"0\" ID=\"3\">"+
     "<ADDRESS FROM=\"Flexware\" TO=\"" +mobileNos+"\" SEQ=\"3\"/>"+
          "</SMS></MESSAGE>";
          for(int i =0 ;i<3;i++){
          encodedMsg = vsf.encodeSMS(sms);
          client      =      new HttpClient();
          httppost      =      new PostMethod("Some URL"+encodedMsg+"&action=send");
          client.executeMethod(httppost);
          if (httppost.getStatusCode() == HttpStatus.SC_OK)
          responseString = httppost.getResponseBodyAsString();
               System.out.println("responseString : " + responseString);
               //logger.info("SMS Sent Status : "+httppost.getStatusLine().toString());
     }else
                    System.out.println("Unexpected failure: " + httppost.getStatusLine().toString());
                    //logger.info("SMS Sent Status<><><> "+httppost.getStatusLine().toString());
          httppost.releaseConnection();

Similar Messages

  • How to upload a image or flash file as blob object in a table.

    How to upload a image or flash file as blob object in a table.
    What are all the possible ways we can do it.

    Searching the forum (or google) would be my first choice, as this question pops up every now and then.
    Next without knowledge of your environment (jdev version and technology stack) it's hard to give a profound answer.
    All I can say is that it's possible.
    Timo

  • How do I read in a .bmp file?

    How do I read in a .bmp file to a program that uses
    an ASCII file? Is it possible to change the file to ASCII
    prior to reading the file into the program?
    Thanks for all your help!

    MIME?

  • HT2493 How to change preview image of a file and NOT the icon ?

    Hello dear Mac users
    How to change preview image of a file and NOT the icon ?
    I know how to change the icon of a file, but I wish to know how to change the preview of any file.
    For example: my file is "mysong.aif", I changed the icon to be "mylogo.png" using cmd+i, cmd+v on the icon. But the preview of the file still remain the same.
    I know it can be changed using iTunes, but I don't want to import all my files in iTune, and iTune cannot import all type of files.
    I hope someone will understand my needs...
    Thanks!

    Thanks BeerbarX
    You can't change the preview image for anything
    hoo
    QuickLook plugin
    what are the plugin ?
    In the case of a music file, it will be that generic black box with a note on it
    That is exactly what I'm asking about !
    MP3 which has a special tagging standard that can include artwork
    How can I "tag" my MP3 without going thru iTunes ? Is it possible to do it dirrectly in the Finder ? Is there other type of files that can include such tags ?
    Thank you for answering my question , wich I have to admit may seem useless, but I wish I could put something like a signature logo on each of the different file I produce (as AIF for music and MP4 for video clip) instead of that generic black box with a note on it, and by the meantime keeping a different icon for all of them in order to illustrate theire content.

  • HT1355 How to send 2 or more pdf files in e mail

    How to send 2 or more pdf files in e mail...????????

    Also i have a workspace created in html.oracle.com in that when i want to upload excel file or copy data from excel i am getting error as......
    ORA-20001: create_table error: ORA-20001: Excel load run ddl error: ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_6868Looks like the data you're trying to load will exceed your workspace quota (2MB small, 5MB medium). Try loading fewer rows.

  • How to send business card (VCF file) through sms? it can only be send via email?

    how to send business card (VCF file) through sms? it can only be send via email?

    Go into your contacts click on the person you want to send, when the info opens scroll down to the bottom and click share contact it will as it you want to email or mms. 

  • How to upload an image to EBS file server (Not store in database) with OAF?

    Dear all,
    I can upload an image into database with blob type. But I want to know how to upload an image to EBS file server. I try to search the forum but I cannot find the solution I want.
    Anybody can reallize it? Please give me some advice or idea?
    Thanks.
    Kenny

    Kenny,
    Framework doesn't provide the option of storing the images as files. You can write a javascript to open a popup and provide a standard HTML file upload component which will save the file on specified location.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to send data to bam data object through java code

    how to send data to bam data object through java code

    I've made a suggestion in other thread: https://forums.oracle.com/thread/2560276
    You can invoke BAM Webservices (Using Oracle BAM Web Services) or use JMS integration using Enterprise Message Sources (http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bam_ent_msg_sources.htm)
    Regards
    Luis Fernando Heckler

  • Send oracle table to pdf file through forms 6i

    please dear sirs,
    I want to send oracle table to pdf file through forms 6i
    waiting help
    thanks in advance
    Yasser

    dear Francois
    i use this code which sarah give it to me
    and i write as the following put not give me the pdf file
    DECLARE
         PL_ID PARAMLIST;
    BEGIN     
         PL_ID := GET_PARAMETER_LIST('TEMPDATA');
         IF NOT ID_NULL(PL_ID) THEN
              DESTROY_PARAMETER_LIST(PL_ID);
         END IF;
         PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
         ADD_PARAMETER(PL_ID, 'PARAMFORM', TEXT_PARAMETER, 'NO');
         ADD_PARAMETER(pl_id, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(pl_id, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
         ADD_PARAMETER(pl_id, 'DESNAME',          TEXT_PARAMETER, 'D:\YASSER');
         RUN_PRODUCT(REPORTS, 'D:\YASSER\crm02002.rep', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
    END;
    pls help me and tell me where is the error which i did
    thanks in advance dear

  • How to send messages to the specified user through sap

    how to send messages to the specified user through sap

    Hi Santosh,
    try:
        CALL FUNCTION 'TH_POPUP'
             EXPORTING
                  CLIENT         = SY-MANDT
                  USER           = BNAME "User you want
                  MESSAGE        = MSG "text you want
             EXCEPTIONS
                  USER_NOT_FOUND = 1.
    Regards, Dieter

  • How to convert JPG image to BMP ? (Printing jpg images in smartforms from content server)

    Hi,
    We have employee photos(JPG Format) stored in Content server. And now we want to print the photos in smartforms. For this I had written the below code to read the photo from content server in binary format as below.
    REPORT ZTEST1.
    PARAMETERS P_PERNR TYPE PERNR_D.
    DATA: PS_CONNECT_INFO TYPE TOAV0,
          IT_BINARY TYPE TABLE OF SDOKCNTBIN.
    CALL FUNCTION 'HR_IMAGE_EXISTS'
      EXPORTING
        P_PERNR                     = P_PERNR
    *   P_TCLAS                     = 'A'
    *   P_BEGDA                     = '18000101'
    *   P_ENDDA                     = '99991231'
    IMPORTING
    *   P_EXISTS                    =
       P_CONNECT_INFO              = PS_CONNECT_INFO
    * EXCEPTIONS
    * ERROR_CONNECTIONTABLE       = 1
    *   OTHERS                      = 2
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.
    IF PS_CONNECT_INFO IS NOT INITIAL.
      CALL FUNCTION 'SCMS_DOC_READ'
        EXPORTING
       STOR_CAT                    = SPACE
       CREP_ID                     = PS_CONNECT_INFO-ARCHIV_ID
          DOC_ID                      = PS_CONNECT_INFO-ARC_DOC_ID
    *   PHIO_ID                     =
    *   SIGNATURE                   = 'X'
    *   SECURITY                    = ' '
    *   NO_CACHE                    = ' '
    *   RAW_MODE                    = ' '
    * IMPORTING
    *   FROM_CACHE                  =
    *   CREA_TIME                   =
    *   CREA_DATE                   =
    *   CHNG_TIME                   =
    *   CHNG_DATE                   =
    *   STATUS                      =
    *   DOC_PROT                    =
    TABLES
    *   ACCESS_INFO                 =
    *   CONTENT_TXT                 =
       CONTENT_BIN                 = IT_BINARY
    * EXCEPTIONS
    * BAD_STORAGE_TYPE            = 1
    *   BAD_REQUEST                 = 2
    *   UNAUTHORIZED                = 3
    * COMP_NOT_FOUND              = 4
    *   NOT_FOUND                   = 5
    *   FORBIDDEN                   = 6
    *   CONFLICT                    = 7
    * INTERNAL_SERVER_ERROR       = 8
    *   ERROR_HTTP                  = 9
    * ERROR_SIGNATURE             = 10
    *   ERROR_CONFIG                = 11
    *   ERROR_FORMAT                = 12
    * ERROR_PARAMETER             = 13
    *   ERROR                       = 14
    *   OTHERS                      = 15
      IF SY-SUBRC <> 0.
    * Implement suitable error handling here
      ENDIF.
    ENDIF
    Now the issue is I want to convert that binary data to bitmap image and upload the same in to SE78. So that I can use that BMP image from SE78 in my smartforms.
    I had used the class CL_IGS_IMAGE_CONVERTER to covert the image into bmp but it is giving error that error in IMAGE DATA CORRUPT & Error Code 3. The conversion code used is as below.
    ******* CONVERT THE JPG IMAGE INTO BMP PHOTO. **********
      DATA: L_IGS_IMGCONV TYPE REF TO CL_IGS_IMAGE_CONVERTER,
    L_IMG_BLOB    TYPE W3MIMETABTYPE,
    L_IMG_SIZE    TYPE W3PARAM-CONT_LEN,
    L_IMG_TYPE    TYPE W3PARAM-CONT_TYPE,
             L_IMG_SUBTYPE TYPE W3PARAM-CONT_TYPE,
    L_IMG_URL     TYPE W3URL,
    L_ERR_CODE    TYPE I,
    L_ERR_TEXT    TYPE STRING,
             P_DEST TYPE CHAR32 VALUE 'IGS_RFC_DEST'.
      DATA: G_IMG_BLOB     TYPE W3MIMETABTYPE,
          G_IMG_TYPE     TYPE W3PARAM-CONT_TYPE,
          G_IMG_SIZE     TYPE W3PARAM-CONT_LEN.
      IF NOT IT_BINARY[] IS INITIAL.
        G_IMG_BLOB[] = IT_BINARY.
        CREATE OBJECT L_IGS_IMGCONV
          EXPORTING
            DESTINATION = P_DEST.
        CALL METHOD L_IGS_IMGCONV->SET_IMAGE
          EXPORTING
            BLOB      = G_IMG_BLOB
            BLOB_SIZE = G_IMG_SIZE.
        CASE PS_CONNECT_INFO-RESERVE.
          WHEN 'TIF'.
            G_IMG_TYPE = 'image/tiff'.
          WHEN 'JPG'.
            G_IMG_TYPE = 'image/jpeg'.
          WHEN 'PNG'.
            G_IMG_TYPE = 'image/png'.
          WHEN 'GIF'.
            G_IMG_TYPE = 'image/gif'.
          WHEN 'BMP'.
            G_IMG_TYPE = 'image/x-ms-bmp'.
          WHEN OTHERS.
            EXIT.
        ENDCASE.
    L_IGS_IMGCONV->INPUT  = G_IMG_TYPE.
        L_IGS_IMGCONV->OUTPUT = 'image/x-ms-bmp'.
    *    PERFORM GET_SIZE USING PICTURE_CONTAINER
    * L_IGS_IMGCONV->WIDTH
    * L_IGS_IMGCONV->HEIGHT.
        CALL METHOD L_IGS_IMGCONV->EXECUTE
          EXCEPTIONS
            OTHERS = 1.
        IF SY-SUBRC IS INITIAL.
          CALL METHOD L_IGS_IMGCONV->GET_IMAGE
            IMPORTING
              BLOB      = L_IMG_BLOB
              BLOB_SIZE = L_IMG_SIZE
              BLOB_TYPE = L_IMG_TYPE.
          SPLIT L_IMG_TYPE AT '/' INTO L_IMG_TYPE L_IMG_SUBTYPE.
        ELSE.
          CALL METHOD L_IGS_IMGCONV->GET_ERROR
            IMPORTING
              NUMBER  = L_ERR_CODE
              MESSAGE = L_ERR_TEXT.
          BREAK-POINT.
        ENDIF.
      ENDIF.
    ENDIF.
    So could you please some one help me how to convert JPEG Photo to BMP programatically.
    Regards,
    Mayur.

    johnandersonpalmdesert wrote:
    My printer is requesting a vector file.
    Jpeg File format does not support vectors.  Photoshop has limited vector support and tools.  Photoshop can not save vector file formats like SVG.  What File type does your printer want?
    Adobe Illustrator is Adobe vector application.

  • How to display a 16-bit bmp file

    Hi,
    i have a 16 bit BMP file available in a byte[] along with the BITMAPINFO information. how to display this in Java.
    i was able to find the code for displaying the 8-bit/24-bit BMP file in Javaworld :Java Tip 43 .
    Pls provide pointers to sample/example code if available.

    Try JAI it supports 8, 16, and 32 bit image data types.
    http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/index.html

  • How to send a picture in pdf file when it is in jpeg file

    how do I send an attachment in PDF file when it is now in jpeg file. I want to send this attachment in an email.

    Hi,
    Please convert your JPEG files to PDF file using "Convert to PDF" tool at https://createpdf.acrobat.com/signin.html or Adobe Reader X or Reader XI(using Tools >CreatePDF).
    After converting the file please download it to your computer then attach it in your email.
    Thank you.
    Hisami

  • In Applet  how to send an ' image' and 'string' as parameter

    Hi,
    In web application, how to use post method in applet to send an ' image' and 'string' as a parameter, I can able to send the image alone form applet to servlet.

    869665 wrote:
    Hi,
    In web application, how to use post method in applet to send an ' image' and 'string' as a parameter, I can able to send the image alone form applet to servlet.One way to do this is to convert your binary image data to base64 (convert it to plain text) and send it along with your other String parameter, delimited with a & of course.
    Edited by: maheshguruswamy on Aug 2, 2011 11:59 AM

  • How to convert jpeg images into video file of any ext using JMF

    I want to convert the Jpeg files into video clip with the help of JMF
    any one can help me?
    Plz reply me at [email protected]
    or [email protected]

    I'm not sure of his/her reasoning behind this, but I have yet to find a way to record video with mmapi on j2me. So with that restriction, I can see how one could make it so that it just records a lot of jpegs, and then makes it a movie.
    I would be interested finding a workaround for this too. Either if someone would explain how to record video with mmapi or how to make recorded images into a video. Thanks!

Maybe you are looking for