Dealing with attachment

Hi
i have abap proxy 2 java proxy with attachment,
after sending by abap proxy with attachement,
i can see word_attachment file and main application(application/xml) on payload on SXMB_MONI.
my question is,,, how can i take word_attachment file in  Imple Java from receiver java proxy in order to send that file to external system.
any idea ? is there anyone can help me?
thanks in advance
venjamin

venjamin
Check http://help.sap.com/saphelp_nw04/helpdata/en/9a/945e3026760745a751a85499139c7c/content.htm
and U can use java method
<b>public MessageAttachment getAttachment(String name);</b>
in the java code.
hope it helps:)

Similar Messages

  • Two Apple ID's: Dealing With It

    Here's a means to deal with the 2 Apple ID problem. It's not necessarily a solution; it's a message to Apple.
    Background: The old MobileMe, iTunes, and iCloud accounts do not get along. This is because iTunes used one Apple ID for purchases, and MobileMe another, which was always the @me.com or @mac.com email address.
    Along comes iCloud and it insists that the @me.com adress is its own Apple ID, and al devices and iCloud apps or content services must and can only sync to a device running that account. This does not mean you cannot use your content from the old iTunes Apple ID on your device if it is authorized, but many push, sunc, in-App opurchases, or auto-update featreus cannot work unless you make the effort to log-out of your iCloud Apple ID and log-in to iTunes with your iTunes Apple ID.
    This 2 Apple ID confusion is maddening. Originally .Mac/MobileMe were Mac-only service with no relationship to iTunes. Since iTunes was a broad service extending into the world of PC's and Windows, it did not tie its accounts (Apple ID's) to a specific Apple-generated email address. this is probably why @mac.com was replace with the less Macentric @me.com.
    Here's a way to get the message to Apple that this transition is creating all sorts of problems for those with older iTunes and .Mac/MobileMe Apple ID's:
    Using iTunes, log in to the Apple ID you DO NOT WANT in the future. This will be the Apple ID with the email address different than the one you use for iCloud. Duoble-check.
    If you do not have an iTunes account with your iCloud name then you are safe and free to make one that is identical. Stop reading any further.
    Once you've logged into your iTunes account (which is just the account attached to your Apple ID), go to Purchase History.
    Identify all purchases in an invoice (each sepaarte line item is an invoice) and click Report a Problem.
    Always choose the LAST item in the pulldown menu. This is the catch-all, generic problem.
    Type in (or modify as you see fit), then click Done. Repeat for every paid item:
    This item downloaded to the wrong account. For syncing with iCloud I need it to be on my iCloud account which is Apple ID [email protected]. Thank-you.
    I did this on a trial basis and recieved a transfer. I have now reported all 400 paid items from my non-iCloud account witht the above request. It took a bit of time, but I feel it may achieve what I require.
    It only works with paid items: apps or media content. Anything free or an in-app purchase does not work and will bump you to a webpage. For free items find your email invoices and print those, then re-download them again.
    But here's the catch. Apple has to respond to every one of those requests. If an app costs $0.99 then Apple takes $0.33. responding to every "Report a Problem". For every $0.99 app will use more labor costs than the app made for Apple. Same for songs.
    Apple offers great products and services, but this ping-pong game with .Mac, MobileMe, iTunes, and now iCloud is a major problem because it diminsishes the capabilities of our invested hardware when we cannot sync across Apple ID's. The most loyal Apple customers were those early adopters who, like myself, find we cannot utilize all our apps and content because we cannot combine Apple ID's.
    This method may not work or work for everyone, but it sends a message that there ineed is a "Problem", triggered by iCloud's implementation.

    Some things are mixed up here, seemingly...
    I seem to have two Apple ID's attached to my e-mail.
    An Apple ID is a valid email address, apparently. How can those be "attached to your email"... what email?
    Facetime will not verify my e-mail address because it is associated with the other account.
    This doesn't make sense. You can register multiple, even non-Apple-ID, email addresses and their aliases with FaceTime.
    So, maybe you can explain your problem better - what you want and the steps you've taken and what you have so far. If something doesn't work, please tell the exact error message, too.

  • Often when I click on sites that offer slide show type presntations I only receive partial pictures with about 75% hidden. Dealing with the character encloding in view does not help. How do I fix?

    picture but not text is blanked out by about 75%. Dealing with character encoding does not fix the problem.

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    Use a compressed image type like PNG or JPG to save the screenshot and make sure that you do not exceed the maximum file size (1 MB).
    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    If you have increased the minimum font size then try the default setting "none" as a high value can cause issues like you described.
    * Firefox > Preferences > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    *Firefox > Preferences > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"
    You can use an extension to set a default font size and page zoom on web pages:
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Bapi_document_create2 does not work correctly with attached file.

    Hi all.
    I hava a problem with bapi. I programmed below.
            ls_docdata-documenttype = 'BBS'.
            ls_docdata-description  = 'JJW test'.
            ls_file-documenttype = 'BBS'.
            ls_file-ORIGINALTYPE = 1.
            ls_file-storagecategory = 'ZSTW_KPRO'.
            ls_file-wsapplication = 'TXT'.
            ls_file-docfile = entity_filename.
            append ls_file to lt_files.
            CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
              EXPORTING
                documentdata       = ls_docdata
                PF_FTP_DEST = 'SAPFTP'
                PF_HTTP_DEST = 'SAPHTTP'
              IMPORTING
                documenttype               =      lv_documenttype
                documentnumber           =     lv_documentnumber
                documentpart                =     lv_documentpart
                documentversion           =     lv_documentversion
                return                           =     ls_return
              tables
                documentfiles     = lt_files.
            call function 'BAPI_TRANSACTION_COMMIT'.
    If I don't attach the file, DIR is created but if attach some files, it does not work. What should I do??
    regards.

    Hi,
    You can use the below to attach the file from BSP to SAP. But it doesnt use the BAPI - 'BAPI_DOCUMENT_CREATE2'. It works perfectly for me. Let me know if you have any questions.
    Note: This code put the file into SAP Directory "/userapps/master_data/" as well as it upload the file into Transaction WTY since i am using Business object:BUS2222. You may need to modify the Business object if you ahve the one, otherwise you can just put it into SAP DIR.
    FUNCTION ZATTACH_CREATE.
    *"*"Update function module:
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(FILE) TYPE  SAPB-SAPFILES
    *"     VALUE(STR_FILE_CONTENT) TYPE  XSTRING
    *"     VALUE(OBJECT_KEY) TYPE  BAPIBDS01-OBJKEY
      DATA: LOGICAL_SYSTEM TYPE BAPIBDS01-LOG_SYSTEM,
            CLASSNAME TYPE  BAPIBDS01-CLASSNAME,
            CLASSTYPE TYPE  BAPIBDS01-CLASSTYPE.
      DATA:  IT_FILES TYPE TABLE OF  BAPIFILES,
            IT_SIGNATURE TYPE TABLE OF  BAPISIGNAT,
       FILES TYPE  BAPIFILES,
      SIGNATURE TYPE   BAPISIGNAT.
      DATA: I_TOADD TYPE TOADD,
            FILENAME_ALL TYPE SAPB-SAPFILES,
            FILE_PATH TYPE SAPB-SAPFILES,
            FILE_PATH_MEMORY(250) TYPE C,  " path für SAP memory
            FILE_PATH_LENGTH TYPE I,       " length of the file_path
           FILE_CONTENT_LENGTH TYPE I,       " length of the file_CONTENT
           FILE_NAME TYPE SAPB-SAPFILES,
            FILE_EXTENSION TYPE TOADD-DOC_TYPE.     " file-extension.
      DATA: I_FILE_CONTENT TYPE TABLE OF BAPICONTEN.
      DATA: WA_FILE_CONTENT TYPE  BAPICONTEN,
       STRING_CONTENT TYPE STRING,
       STRING_CONTENT1 TYPE STRING.
      DATA:
       I_FILES TYPE TABLE OF BAPIFILES ,
            I_SIGNATURE TYPE TABLE OF BAPISIGNAT ,
            I_COMPONENTS TYPE TABLE OF BAPICOMPON ,
           COMPONENTS TYPE BAPICOMPON ,
            I_PROPERTIES TYPE TABLE OF SDOKPROPTY ,
            I_PROPERTIES2 TYPE TABLE OF BAPIPROPER ,
            I_PROPERTIES_DEL TYPE TABLE OF BAPIDPROPT ,
           MIMETYPE TYPE TOADD-MIMETYPE,
      COMPID TYPE BAPICOMPON-COMP_ID,  " compid for popup
            COMPID_FLAG(1) TYPE C,           " compid can't be changed
            MODIFY_FLAG(1) TYPE C,           " document is modified
            ATTRI_FLAG(1) TYPE C,            " attri can't be changed
            TITLE_FLAG(1) TYPE C,            " titel of the popup
            CANCEL_FLAG(1) TYPE C,           " cancel button Yes/No
            BUTTON_TEXT(10) TYPE C,
            INFO_TEXT(100) TYPE C,
      VERSION_NR TYPE BDN_CON-DOC_VER_NO,     " version_nr for popup
            VERSION_LANGU2 TYPE T002T-SPTXT, " language field in POPUP
            VERSION_LANGU TYPE BDN_CON-LANGU," SPRAS language field
            TITLE_TEXT(100) TYPE C,          " title of the popup
            DESCRIPTION TYPE BDN_CON-DESCRIPT.      " descr. for popup
    *FILENAME_ALL = fileUpload_event->file_name.
    * Transfering into SAP File server.
      FILE_CONTENT_LENGTH = XSTRLEN( STR_FILE_CONTENT ).
      FILENAME_ALL = FILE .
      STRING_CONTENT = STR_FILE_CONTENT.
      DATA: OUT_LINES TYPE TABLE OF XSTRING.
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = STR_FILE_CONTENT
    *   APPEND_TO_TABLE       = ' '
    * IMPORTING
    *   OUTPUT_LENGTH         =
        TABLES
          BINARY_TAB            = I_FILE_CONTENT.
      DELETE DATASET '/userapps/master_data/claim1.txt'.
      OPEN DATASET '/userapps/master_data/claim1.txt' FOR APPENDING
        IN TEXT MODE ENCODING DEFAULT.
    *  LOOP AT I_FILE_CONTENT INTO WA_FILE_CONTENT.
    *    TRANSFER STR_FILE_CONTENT TO '/userapps/master_data/claim1.txt'.
      TRANSFER STRING_CONTENT TO '/userapps/master_data/claim1.txt'.
    *  ENDLOOP.
      CLOSE DATASET '/userapps/master_data/claim1.txt'.
      OPEN DATASET '/userapps/master_data/claim1.txt' FOR INPUT
           IN TEXT MODE ENCODING DEFAULT.
      READ DATASET '/userapps/master_data/claim1.txt'  into STRING_CONTENT1.
    * -- split filename                                                 -- *
        DATA: LENGTH TYPE I.
      DATA: PATH2(1200).  " LIKE sapb-sapfiles.
      DATA: L_FILE(1200),
            L_DIR(1200),
            L_DELIMITER        TYPE C,
            L_OFFSET           TYPE I,
            L_BYTES            TYPE I,
            L_DELIMITER_OFFSET TYPE I,
            L_DELIMITER_BYTES  TYPE I,
            L_CHAR             TYPE C,
            L_PREVIOUS_CHAR    TYPE C,
            L_LAST_CHAR        TYPE C.
      PATH2 = FILENAME_ALL.
      LENGTH = STRLEN( PATH2 ).
      L_OFFSET = 0.
      WHILE L_OFFSET < LENGTH.
        L_LAST_CHAR = L_CHAR. "remember last character
        L_BYTES = CHARLEN( PATH2+L_OFFSET ).
        L_CHAR = PATH2+L_OFFSET(L_BYTES). "get current character
        IF L_CHAR = '/' OR L_CHAR = '' OR L_CHAR = ':'.
          IF L_DELIMITER IS INITIAL OR L_DELIMITER = ':'.
            "Typically we deal with absolute paths, so the first
            "delimiter is best. This allows for UNIX paths with
            "'' in the directory or file name
            L_DELIMITER = L_CHAR.
          ENDIF.
          IF L_CHAR = L_DELIMITER.
            L_DELIMITER_OFFSET = L_OFFSET.
            L_DELIMITER_BYTES = L_BYTES.
            "remember character in front of delimiter:
            L_PREVIOUS_CHAR = L_LAST_CHAR.
          ENDIF.
        ENDIF.
        L_OFFSET = L_OFFSET + L_BYTES.
      ENDWHILE.
      IF NOT L_DELIMITER IS INITIAL.
        L_OFFSET = L_DELIMITER_OFFSET + L_DELIMITER_BYTES.
        L_FILE = PATH2+L_OFFSET.
        IF L_PREVIOUS_CHAR = ':' OR L_DELIMITER = ':'.
          "path ends with or after drive identifer, include the delimiter
          L_DIR = PATH2(L_OFFSET).
        ELSEIF NOT L_DELIMITER_OFFSET IS INITIAL.
          "do not include a trailing delimiter for compatibility reasons
          L_DIR = PATH2(L_DELIMITER_OFFSET).
        ELSE.
          CLEAR L_DIR.
        ENDIF.
      ELSE.
        L_DIR = SPACE.
        L_FILE = PATH2.
      ENDIF.
      FILE_PATH = L_DIR.
      FILE_NAME = L_FILE.
    * -- set new file_path to SAP memory                                -- *
      FILE_PATH_LENGTH = STRLEN( FILE_PATH ).
      IF FILE_PATH <> SPACE AND FILE_PATH_LENGTH < 250.
        FILE_PATH_MEMORY = FILE_PATH.
        SET PARAMETER ID 'OAP' FIELD FILE_PATH_MEMORY.
      ELSE.
        FILE_PATH_MEMORY = SPACE.
        SET PARAMETER ID 'OAP' FIELD FILE_PATH_MEMORY.
      ENDIF.
    * -- data declaration ------------------------------------------------ *
      DATA:
            SINGLE_C TYPE C.
      CLEAR: SINGLE_C.
      LENGTH = STRLEN( FILE_NAME ).
      IF LENGTH > 0.
        WHILE LENGTH > 0.
          SINGLE_C = FILE_NAME+LENGTH(1).
          IF SINGLE_C CO '.'.
            LENGTH = LENGTH + 1.
            EXIT.
          ELSE.
            LENGTH = LENGTH - 1.
          ENDIF.
        ENDWHILE.
        IF LENGTH > 0.
          FILE_EXTENSION = FILE_NAME+LENGTH.
        ELSE.
          FILE_EXTENSION = SPACE.
        ENDIF.
      ELSE.
        FILE_EXTENSION = SPACE.
      ENDIF.
      IF FILE_EXTENSION <> SPACE.
        SET LOCALE LANGUAGE SY-LANGU.
        TRANSLATE FILE_EXTENSION TO UPPER CASE.              "#EC TRANSLANG
        SET LOCALE LANGUAGE SPACE.
      ENDIF.
    * TR001++
      DATA: I_TOADV TYPE TABLE OF TOADV.
      DATA: WA_TOADV TYPE TOADV.
      DATA: OBJECT TYPE SAEOBJART.
      SELECT * FROM TOADV INTO CORRESPONDING FIELDS OF TABLE
              I_TOADV WHERE STANDARD = 'X'.
      DELETE I_TOADV WHERE AR_OBJECT CS 'BDS' OR AR_OBJECT CS 'ZSEST'.
      READ TABLE I_TOADV INTO WA_TOADV WITH KEY DOC_TYPE = FILE_EXTENSION.
    * -- get name and description for the document                      -- *
      CLEAR: COMPID,
             DESCRIPTION,
             VERSION_NR,
             MODIFY_FLAG,
             COMPID_FLAG,
             ATTRI_FLAG,
             TITLE_FLAG.
      COMPID_FLAG    = ' '.              " -> compid can't be changed
      MODIFY_FLAG    = 'S'.              " -> popup in save modus
      ATTRI_FLAG     = 'X'.              " -> attri's can be changed
      COMPID         = FILE_NAME.
      VERSION_NR     = '00000001'.
      VERSION_LANGU2 = SY-LANGU.
      TITLE_FLAG     = '1'.              " -> BDN
    * -- get the mimetype of the docuclass                              -- *
    *PERFORM MIMETYPE_GET(OAALL) USING FILE_EXTENSION
    *                            CHANGING I_TOADD.
      DATA: I_DOCUMENTCLASS TYPE TOADD-DOC_TYPE.
      MOVE FILE_EXTENSION TO I_DOCUMENTCLASS.
      SET LOCALE LANGUAGE SY-LANGU.
      TRANSLATE I_DOCUMENTCLASS TO UPPER CASE.               "#EC TRANSLANG
      SET LOCALE LANGUAGE SPACE.
      SELECT SINGLE * FROM TOADD INTO I_TOADD WHERE
                                 DOC_TYPE EQ I_DOCUMENTCLASS.
      IF SY-SUBRC NE 0.                    " nothing found -> default!
        I_TOADD-DOC_TYPE = I_DOCUMENTCLASS.
        I_TOADD-MIMETYPE = 'application/x-docType'.             "#EC NOTEXT
      ENDIF.
      MOVE I_TOADD-MIMETYPE TO MIMETYPE.
    * -- fill file and signature structure                              -- *
      CLEAR: I_FILES, I_SIGNATURE.
      REFRESH : I_FILES, I_SIGNATURE.
      DESCRIPTION = FILE_NAME.
      FILES-DOC_COUNT = 1.
      FILES-DIRECTORY = FILE_PATH.
      FILES-FILENAME  = FILE_NAME.
      FILES-MIMETYPE  = MIMETYPE.
      APPEND FILES TO I_FILES.
    * -- fill components and signature structure                        -- *
      COMPONENTS-DOC_COUNT  = 1.
      COMPONENTS-COMP_COUNT = 1.
      COMPONENTS-MIMETYPE   = MIMETYPE.
      COMPONENTS-COMP_ID         = FILE_NAME.
      APPEND COMPONENTS TO I_COMPONENTS.
      SIGNATURE-DOC_COUNT  = 1.
      SIGNATURE-PROP_NAME  = 'BDS_DOCUMENTCLASS'.
      SIGNATURE-PROP_VALUE = FILE_EXTENSION.
      APPEND SIGNATURE TO I_SIGNATURE.
      SIGNATURE-PROP_NAME = 'BDS_CONTREP'.
    *IF BDS_DOCTYPE_LIST-CONTREP = SPACE.
      SIGNATURE-PROP_VALUE = ' '.                               "#EC NOTEXT
    *ELSE.
    *  I_SIGNATURE-PROP_VALUE = BDS_DOCTYPE_LIST-CONTREP.
    *ENDIF.
      APPEND SIGNATURE TO I_SIGNATURE.
      SIGNATURE-PROP_NAME  = 'BDS_DOCUMENTTYPE'.
      SIGNATURE-PROP_VALUE = WA_TOADV-AR_OBJECT. "'ZSRVCXLS'."TR001+
      APPEND SIGNATURE TO I_SIGNATURE.
      SIGNATURE-PROP_NAME  = 'DESCRIPTION'.
      SIGNATURE-PROP_VALUE = DESCRIPTION.
      APPEND SIGNATURE TO I_SIGNATURE.
      SIGNATURE-PROP_NAME  = 'LANGUAGE'.
      SIGNATURE-PROP_VALUE = VERSION_LANGU.
      APPEND SIGNATURE TO I_SIGNATURE.
      CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
        EXPORTING
    *   LOGICAL_SYSTEM        =
          CLASSNAME             = 'BUS2222' "classname_select
          CLASSTYPE             = 'BO'" classtype_select
        CLIENT                = SY-MANDT
          OBJECT_KEY            = OBJECT_KEY
        BINARY_FLAG           = 'X'
    * IMPORTING
    *   OBJECT_KEY            =
        TABLES
          SIGNATURE             = I_SIGNATURE
          COMPONENTS            = I_COMPONENTS
        CONTENT               = I_FILE_CONTENT
    *   ASCII_CONTENT         =
    * EXCEPTIONS
    *   NOTHING_FOUND         = 1
    *   PARAMETER_ERROR       = 2
    *   NOT_ALLOWED           = 3
    *   ERROR_KPRO            = 4
    *   INTERNAL_ERROR        = 5
    *   NOT_AUTHORIZED        = 6
    *   OTHERS                = 7
      COMMIT WORK AND WAIT.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFUNCTION.
    Message was edited by:
            Raja T

  • File(PDF as attachment)-- XI-- WebService(SOAP with attachment)

    Hi i have following Scenerio in my hand,
    File>XI>WebService(SOAP)
    Kindly help me in implementing the Following Scenerio;
    I need to attach PDF to File Adapter as PayLoad or give it to File Adapter as Attachment which in turn send this data to XI and then XI wud generate WebService having this PDF as attachment.
    Kindly Walk me thru all the steps during Configuration and design and do guide me how to test wether this scenerio works or not.
    Also tell me abt the WebService i need to use to test the Scenerio.
    Thanks.

    Hi Jeet,
    If you want your file adapter to read contents from a PDF file, check out the folloing blog,
    <a href="/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter">Sender File Adapter with PDF</a>
    If you want your file adapter to generate its output into a PDF file, then check the following blog,
    <a href="/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter">Receiver File Adapter With PDF</a>
    Sriram's blog on FILE to HTTP scenario might of be help to you too. It also deals with Syn / Async Bridge which can be ignored.
    <a href="/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi">File to HTTP</a>
    Do let us know if you need any further help,
    regards,
    Bhavesh

  • Dealing with abstract classes and interfaces with XMLBeans

    I'm quite new to XMLBeans and would like some help. I've got things working when
    you are only saving concreate classes as XML, but when it comes to clesses containing
    interfaces I am running into problems.
    I basically have a collection of XY objects (see below) that I want to save as
    XML.
    I want to convert the following java classes to an xml schema:
    public class XY{
    X x;
    Y y;
    public interface X{
    void setA(int a);
    int getA();
    public interface Y{
    void setB(int b);
    int getB();
    public class X1 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class X2 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class Y1 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    public class Y2 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    What would be the best way to convert these to XML Schema? I've looked through
    all the XMLBeans documentation, but it doesn't say anything about dealing with
    interfaces/abstract classes. Is there anywhere else to look?
    Thanks in advance,
    Andrew

    Anurag,
    What I really wanted was a work-around to using substiutionGroups as substitution
    groups are not supported in this release.
    I want to convert the following schema:
    <xsd:complexType name="PublicationType">
    <xsd:sequence>
    <xsd:element name="Title" type="xsd:string"/>
    <xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="Date" type="xsd:gYear"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookType">
    <xsd:complexContent>
    <xsd:extension base="PublicationType" >
    <xsd:sequence>
    <xsd:element name="ISBN" type="xsd:string"/>
    <xsd:element name="Publisher" type="xsd:string"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="MagazineType">
    <xsd:complexContent>
    <xsd:restriction base="PublicationType">
    <xsd:sequence>
    <xsd:element name="Title" type="xsd:string"/>
    <xsd:element name="Date" type="xsd:gYear"/>
    </xsd:sequence>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="Publication" type="PublicationType"/>
    <xsd:element name="Book" substitutionGroup="Publication" type="BookType"/>
    <xsd:element name="Magazine" substitutionGroup="Publication" type="MagazineType"/>
    <xsd:element name="BookStore">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="Publication" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    to produce an XML file like:
    <?xml version="1.0"?>
    <BookStore ¡Ä>
    <Book>
    <Title>Illusions: The Adventures of a Reluctant Messiah</Title>
    <Author>Richard Bach</Author>
    <Date>1977</Date>
    <ISBN>0-440-34319-4</ISBN>
    <Publisher>Dell Publishing Co.</Publisher>
    </Book>
    <Magazine>
    <Title>Natural Health</Title>
    <Date>1999</Date>
    </Magazine>
    <Book>
    <Title>The First and Last Freedom</Title>
    <Author>J. Krishnamurti</Author>
    <Date>1954</Date>
    <ISBN>0-06-064831-7</ISBN>
    <Publisher>Harper & Row</Publisher>
    </Book>
    </BookStore>
    What is the best way to do this without using substitution types?
    Thanks,
    Andrew
    "Anurag" <[email protected]> wrote:
    Andrew,
    Could you please paste/attach a sample of the code you are using to convert
    Java bean classes to XMLBeans?
    In the current release the goal of XMLBeans technology was to convert
    from
    XML Schemas or XML files to XMLBeans. The focus was not towards conversion
    of Java beans to XMLBeans.
    Regards,
    Anurag
    "Andrew" <[email protected]> wrote in message news:[email protected]...
    I'm quite new to XMLBeans and would like some help. I've got thingsworking when
    you are only saving concreate classes as XML, but when it comes toclesses
    containing
    interfaces I am running into problems.
    I basically have a collection of XY objects (see below) that I wantto
    save as
    XML.
    I want to convert the following java classes to an xml schema:
    public class XY{
    X x;
    Y y;
    public interface X{
    void setA(int a);
    int getA();
    public interface Y{
    void setB(int b);
    int getB();
    public class X1 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class X2 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class Y1 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    public class Y2 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    What would be the best way to convert these to XML Schema? I've lookedthrough
    all the XMLBeans documentation, but it doesn't say anything about dealingwith
    interfaces/abstract classes. Is there anywhere else to look?
    Thanks in advance,
    Andrew

  • Sharing Airport Extreme with attached HD over WAN to Windows

    So I've never gotten this to work. I have three external HD's attached to my airport extreme, the extreme is set to share over WAN, and any Mac can connect with zero problem using AFP. However, I've never had a Windows computer connect successfully using Samba. I have connected over LAN on windows just fine (not with Samba, of course, just with the built in windows systems) but I've never had anyone using Samba be able to connect from over the web.
    Has anyone else had this work? Any guidance to offer? A friend of mine said the Samba port (445) was closed on my IP - because this is being shared via the Extreme, I can't very well set port forwarding to deal with this issue, so I'm clueless. Help!

    Your drive is most likely formatted with NTFS, which the Mac and the Airport will both read, but not write to.
    The drive needs to be Mac formatted.
    See this link:
    http://docs.info.apple.com/article.html?artnum=305038

  • Anyone ever seen an eventoracle.cpp line 370 error when dealing with an ActiveX control?

    I'm dealing with an ActiveX control in LabView 7.0 that allows me to input video / audio from a USB webcamera. The ActiveX control also allows for the playback of the AVI files that are recorded from the webcam. During playback, I occasionally get a eventoracle.cpp @ line 370 error that is hard to diagnose and hard to reproduce. Any ideas? I do have the ability to move to LabView 7.1.1 if needed, but I have not tried that yet.
    Chris Davis

    hi there
    you can adjust the user event data type to your needs. for example you can add a string "source" to the events data. additionally you can pass the "user parameter" to the callback vi to specify its location. see attachment below.....
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    MSCOMCTL_Toolbar_EventSource_LV7.1.llb ‏102 KB

  • How do you deal with error message when downloading movie on iPad?  It was 75% complete.

    How do you deal with error message when downloading movie on iPad2.  Movie was 75% complete. 

    I was using wifi.  It shows as a purchase on iTunes but it does not show up on iTunes for download.  I keep getting the download error with our a number attached on the iPad.  Very frustrating.   Apple has been of no help at all. 

  • Tips for dealing with large channel count on cRio

    Hello, I have a very simple application that takes an analog input using an AI module (9205) from a thermistor and based on the value of the input it sends out a true/false signal using a digital out module (9477). Each cRio chassis will have close to 128 channels, the code being exactly the same for each channel.
    I wonder if anyone has any tips for how I can do this so that I don't have to copy and paste each section of code 128 times. Obviously this would be a nightmare if the code ever had to be changed. I'm sure there is a way to make a function or a class but being new to graphical programming I can't think of a good way to do this. I looked for a way to dynamically select a channel but can't seem to find anything, if I could select the channel dynamically I'm guessing I can create a subvi and do it that way. Any tips or help would be greatly appreciated.

    There isn't a way to dynamically choose a channel at runtime.  In order
    for the VI to compile successfully, the compiler must be able to statically
    determine which channel is being read or written in the I/O Node at
    compile time.  However, that doesn't mean you can't write a reusable
    subvi.  If you right click on the FPGA I/O In terminal of the I/O Node and create a constant or control, you should be able to reuse the same logic for all of your channels.  The attached screen shot should illustrate the basics of what this might look like.  If you right click the I/O control/constant and select "Configure I/O Type...", you can configure the interface the I/O Item must support in order for it to be selectable from the control.  While this helps single source some of the logic, you will still eventually need 128 I/O constants somewhere in your FPGA VI hierarchy.
    I should also mention that if each channel being read from the 9205 is contained in a separate subVI or I/O Node, you will also incur some execution time overhead due to the scanning nature of the module.  You mentioned you are reading temperature signals so the additional execution time may not be that important to you.  If it is, you may want to look at the IO Sample Method.  You can find more information and examples on how to use this method in the LV help.  Using the IO Sample Method does allow you to dynamically choose a channel at runtime and is generally more efficient for high channel counts.  However, it's also a lot more complicated to use than the I/O Node.
    You also mentioned concerns about the size of arrays and the performance implications of using a single for loop to iterate across your data set.  That's the classic design trade off when dealing with FPGAs.  If you want to perform as much in parallel as possible, you'll need to store all 128 data points from the 9205 modules at once, process the data in parallel using 128 instances of the same circuit, and then output a digital value based on the result.  If you're using fixed point data types, that's 182 x 26 bits for just the I/O data from the 9205.  While this will yield the fastest execution times, the resulting VI may be too large to fit on your target.  Conversely, you could use the IO Sample Method to read each channel one at a time, process the data using the same circuit, and then output a digital value.  This strategy will use the least amount of logic on the FPGA but will also take the longest to execute.  Of course, there are all sorts of options you could create in between these two extremes.  Without knowing more about your requirements, it's hard to advise which end of the spectrum you should shoot for.  Anyway, hopefully this will give you some ideas on where to get started.
    Attachments:
    IO Constant.JPG ‏31 KB

  • Hacked Account, Credit Card Fraud, Customer Support Won't Deal With It.

    Hello!
    I have contacted ''customer support'' twice about my hacked account - answer I have received left me baffled and angry as apparently I have not passed security checks - yet I have passed them when giving the same answers to un-suspend my account!
    My account was hacked on the night of 5th July, approx. 3-3.30am on Sunday.
    Person who hacked it tried to make continuous purchases (I believe at around 100 pounds in total) using stolen credit cards Visa and Eurocard/Mastercard (Mastercard is still attached to my account as whoever did it just left it there).
    They have tried to call numbers in Turks & Caicos and in British Virgin Island.
    I have asked ''customer support'' to trace it and deal with it, as in today's day and age it could be terrorist or contract killers using other people's accounts to make their dealings, but both times I was told I have not passed security checks and they won't deal with it.
    I do not remember when I've open Skype account, sorry it was years ago.
    I also have only 3 contacts on my Skype list from form required 5 (I simply don't need any more).
    I have contacted Action Fraud UK in this matter and have made a report. I have report number which I send to ''customer support'' with my second message.
    Action Fraud UK have advised me to contact ''customer support'' again and ask again to deal with this unpleasant matter - again ''customer support'' refused.
    I am really angry about it and if ''customer support'' (Skype should change their name as they are not supportive nor customer orientated) do not want to deal with it then I would appreciate for someone to close my account as in that case I won't nothing more to do with company who does not take matters like this seriously!
    Sincerely
    Magdalena

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    iTunes Purchase Problems: How to Report a Problem to iTunes Support
    http://tinyurl.com/7tscpa7
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Getting Refunds for your iTunes Store Purchases
    http://www.labnol.org/software/itunes-app-store-refunds/13838/
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

  • HOW TO SEND A HEBREW EMAIL WITH ATTACHMENT USING DEMO_MAIL

    Hello All,
    This is Not a question , just attaching something I've implemented and might be interesting for few of us,
    This package I'm attaching allows to send Hebrew Language email + attaching files to it.
    This package is based on demo_mail package (combined here but you can search at google for more example information if needed).
    My Package is supplied as is , for any specific information regarding it , please contact me directly at : [email protected] or POST here.
    * Please also note , that this package allow file to be attach via URL (meaning you will have to define a link to this file, if you would like to implement a link to a local file , e.g : c:\temp\myfile , you will have to customize the package your self with database directories option etc ...)
    First I will attach an example of how to use it :
    ==================================
    begin
    demo_mail_heb.send_html_mail_attach(p_sender => '[email protected]',
    p_recipients => '[email protected]',
    p_subject => 'שלום וברכה עולם',
    p_data => '<hr><b>בוקר טוב</b><hr>',
    p_file_name => 'but_choose_file.gif',
    p_file_mime_type => 'application/pdf',
    p_file_URL => 'http://10.172.246.160:7777/i/but_choose_file.gif');
    end;
    Second Here is the Package (please note you will have to modify few settings in order to enable it , such as mail server address ..etc)
    ======================================================================================
    CREATE OR REPLACE PACKAGE demo_mail_heb IS
    ----------------------- Customizable Section -----------------------
    -- Customize the SMTP host, port and your domain name below.
    smtp_host VARCHAR2(256) := 'mail.oracle.com';
    smtp_port PLS_INTEGER := 25;
    smtp_domain VARCHAR2(256) := 'oracle.com';
    -- Customize the signature that will appear in the email's MIME header.
    -- Useful for versioning.
    MAILER_ID CONSTANT VARCHAR2(256) := 'Mailer by Oracle UTL_SMTP';
    --------------------- End Customizable Section ---------------------
    -- A unique string that demarcates boundaries of parts in a multi-part email
    -- The string should not appear inside the body of any part of the email.
    -- Customize this if needed or generate this randomly dynamically.
    BOUNDARY CONSTANT VARCHAR2(256) := '-----7D81B75CCC90D2974F7A1CBD';
    FIRST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || utl_tcp.CRLF;
    LAST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || '--' ||
    utl_tcp.CRLF;
    -- A MIME type that denotes multi-part email (MIME) messages.
    MULTIPART_MIME_TYPE CONSTANT VARCHAR2(256) := 'multipart/mixed; boundary="'||
    BOUNDARY || '"';
    MAX_BASE64_LINE_WIDTH CONSTANT PLS_INTEGER := 76 / 4 * 3;
    -- Sent clear Html Email
    procedure send_html_mail (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default null,
    p_mime_type in varchar2 default 'text/html; charset=windows-1255');
    -- Sent Html Email with Attachment
    procedure send_html_mail_attach (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default '<b>áå÷ø èåá òåìí - áãé÷ä</b',
    p_mime_type in varchar2 default demo_mail_heb.MULTIPART_MIME_TYPE,
    p_file_name in varchar2 default 'but_choose_file.gif',
    p_file_mime_type in varchar2 default 'application/pdf',
    p_file_URL in varchar2 default 'http://10.172.246.160:7777/i/but_choose_file.gif');
    -- A simple email API for sending email in plain text in a single call.
    -- The format of an email address is one of these:
    -- someone@some-domain
    -- "Someone at some domain" <someone@some-domain>
    -- Someone at some domain <someone@some-domain>
    -- The recipients is a list of email addresses separated by
    -- either a "," or a ";"
    PROCEDURE mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              message IN VARCHAR2);
    -- Extended email API to send email in HTML or plain text with no size limit.
    -- First, begin the email by begin_mail(). Then, call write_text() repeatedly
    -- to send email in ASCII piece-by-piece. Or, call write_mb_text() to send
    -- email in non-ASCII or multi-byte character set. End the email with
    -- end_mail().
    FUNCTION begin_mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              mime_type IN VARCHAR2 DEFAULT 'text/plain',
              priority IN PLS_INTEGER DEFAULT NULL)
              RETURN utl_smtp.connection;
    -- Write email body in ASCII
    PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
              message IN VARCHAR2);
    -- Write email body in non-ASCII (including multi-byte). The email body
    -- will be sent in the database character set.
    PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
                   message IN VARCHAR2);
    -- Write email body in binary
    PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
              message IN RAW);
    -- APIs to send email with attachments. Attachments are sent by sending
    -- emails in "multipart/mixed" MIME format. Specify that MIME format when
    -- beginning an email with begin_mail().
    -- Send a single text attachment.
    PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN VARCHAR2,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
              last IN BOOLEAN DEFAULT FALSE);
    -- Send a binary attachment. The attachment will be encoded in Base-64
    -- encoding format.
    PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN RAW,
                   mime_type IN VARCHAR2 DEFAULT 'application/octet',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   last IN BOOLEAN DEFAULT FALSE);
    -- Send an attachment with no size limit. First, begin the attachment
    -- with begin_attachment(). Then, call write_text repeatedly to send
    -- the attachment piece-by-piece. If the attachment is text-based but
    -- in non-ASCII or multi-byte character set, use write_mb_text() instead.
    -- To send binary attachment, the binary content should first be
    -- encoded in Base-64 encoding format using the demo package for 8i,
    -- or the native one in 9i. End the attachment with end_attachment.
    PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   transfer_enc IN VARCHAR2 DEFAULT NULL);
    -- End the attachment.
    PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   last IN BOOLEAN DEFAULT FALSE);
    -- End the email.
    PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection);
    -- Extended email API to send multiple emails in a session for better
    -- performance. First, begin an email session with begin_session.
    -- Then, begin each email with a session by calling begin_mail_in_session
    -- instead of begin_mail. End the email with end_mail_in_session instead
    -- of end_mail. End the email session by end_session.
    FUNCTION begin_session RETURN utl_smtp.connection;
    -- Begin an email in a session.
    PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
                        sender IN VARCHAR2,
                        recipients IN VARCHAR2,
                        subject IN VARCHAR2,
    --                     mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=windows-1255',
              mime_type IN VARCHAR2 DEFAULT 'text/plain',
                        priority IN PLS_INTEGER DEFAULT NULL);
    -- End an email in a session.
    PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection);
    -- End an email session.
    PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection);
    END;
    CREATE OR REPLACE PACKAGE BODY demo_mail_heb IS
    -- Sent clear Html Email
    procedure send_html_mail (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default null,
    p_mime_type in varchar2 default 'text/html; charset=windows-1255')
    Is
    conn utl_smtp.connection;
    BEGIN
    conn := demo_mail_heb.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => p_mime_type);
    demo_mail_heb.write_text(
    conn => conn,
    message => p_data);
    demo_mail_heb.end_mail( conn => conn );
    END;
    -- Sent Html Email with Attachment
    procedure send_html_mail_attach (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default '<b>áå÷ø èåá òåìí - áãé÷ä</b',
    p_mime_type in varchar2 default demo_mail_heb.MULTIPART_MIME_TYPE,
    p_file_name in varchar2 default 'but_choose_file.gif',
    p_file_mime_type in varchar2 default 'application/pdf',
    p_file_URL in varchar2 default 'http://10.172.246.160:7777/i/but_choose_file.gif')
    is
    conn utl_smtp.connection;
    req utl_http.req;
    resp utl_http.resp;
    data RAW(200);
    begin
    conn := demo_mail_heb.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => p_mime_type);
    demo_mail_heb.attach_text(
    conn => conn,
    data => p_data,
    mime_type => 'text/html');
    demo_mail_heb.begin_attachment(
    conn => conn,
    mime_type => p_file_mime_type,
    inline => TRUE,
    filename => p_file_name,
    transfer_enc => 'base64');
    -- In writing Base-64 encoded text following the MIME format below,
    -- the MIME format requires that a long piece of data must be splitted
    -- into multiple lines and each line of encoded data cannot exceed
    -- 80 characters, including the new-line characters. Also, when
    -- splitting the original data into pieces, the length of each chunk
    -- of data before encoding must be a multiple of 3, except for the
    -- last chunk. The constant demo_mail_heb.MAX_BASE64_LINE_WIDTH
    -- (76 / 4 * 3 = 57) is the maximum length (in bytes) of each chunk
    -- of data before encoding.
    Utl_Http.set_proxy('www-proxy.us.oracle.com', 'oracle.com');
    req := utl_http.begin_request(p_file_URL);
    resp := utl_http.get_response(req);
    BEGIN
    LOOP
    utl_http.read_raw(resp, data, demo_mail_heb.MAX_BASE64_LINE_WIDTH);
    demo_mail_heb.write_raw(
    conn => conn,
    message => utl_encode.base64_encode(data));
    END LOOP;
    EXCEPTION
    WHEN utl_http.end_of_body THEN
    utl_http.end_response(resp);
    END;
    demo_mail_heb.end_attachment( conn => conn );
    demo_mail_heb.end_mail( conn => conn );
    end;
    -- Return the next email address in the list of email addresses, separated
    -- by either a "," or a ";". The format of mailbox may be in one of these:
    -- someone@some-domain
    -- "Someone at some domain" <someone@some-domain>
    -- Someone at some domain <someone@some-domain>
    FUNCTION get_address(addr_list IN OUT VARCHAR2) RETURN VARCHAR2 IS
    addr VARCHAR2(256);
    i pls_integer;
    FUNCTION lookup_unquoted_char(str IN VARCHAR2,
                        chrs IN VARCHAR2) RETURN pls_integer AS
    c VARCHAR2(5);
    i pls_integer;
    len pls_integer;
    inside_quote BOOLEAN;
    BEGIN
    inside_quote := false;
    i := 1;
    len := length(str);
    WHILE (i <= len) LOOP
         c := substr(str, i, 1);
         IF (inside_quote) THEN
         IF (c = '"') THEN
         inside_quote := false;
         ELSIF (c = '\') THEN
         i := i + 1; -- Skip the quote character
         END IF;
         GOTO next_char;
         END IF;
         IF (c = '"') THEN
         inside_quote := true;
         GOTO next_char;
         END IF;
         IF (instr(chrs, c) >= 1) THEN
         RETURN i;
         END IF;
         <<next_char>>
         i := i + 1;
    END LOOP;
    RETURN 0;
    END;
    BEGIN
    addr_list := ltrim(addr_list);
    i := lookup_unquoted_char(addr_list, ',;');
    IF (i >= 1) THEN
    addr := substr(addr_list, 1, i - 1);
    addr_list := substr(addr_list, i + 1);
    ELSE
    addr := addr_list;
    addr_list := '';
    END IF;
    i := lookup_unquoted_char(addr, '<');
    IF (i >= 1) THEN
    addr := substr(addr, i + 1);
    i := instr(addr, '>');
    IF (i >= 1) THEN
         addr := substr(addr, 1, i - 1);
    END IF;
    END IF;
    RETURN addr;
    END;
    -- Write a MIME header
    PROCEDURE write_mime_header(conn IN OUT NOCOPY utl_smtp.connection,
                   name IN VARCHAR2,
                   value IN VARCHAR2) IS
    BEGIN
    -- utl_smtp.write_data(conn, name || ': ' || value || utl_tcp.CRLF);
    utl_smtp.write_raw_data(conn, UTL_RAW.CAST_TO_RAW(name || ': ' ||value || utl_tcp.CRLF));
    END;
    -- Mark a message-part boundary. Set <last> to TRUE for the last boundary.
    PROCEDURE write_boundary(conn IN OUT NOCOPY utl_smtp.connection,
                   last IN BOOLEAN DEFAULT FALSE) AS
    BEGIN
    IF (last) THEN
    utl_smtp.write_data(conn, LAST_BOUNDARY);
    ELSE
    utl_smtp.write_data(conn, FIRST_BOUNDARY);
    END IF;
    END;
    PROCEDURE mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              message IN VARCHAR2) IS
    conn utl_smtp.connection;
    BEGIN
    conn := begin_mail(sender, recipients, subject);
    write_text(conn, message);
    end_mail(conn);
    END;
    FUNCTION begin_mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              mime_type IN VARCHAR2 DEFAULT 'text/plain',
              priority IN PLS_INTEGER DEFAULT NULL)
              RETURN utl_smtp.connection IS
    conn utl_smtp.connection;
    BEGIN
    conn := begin_session;
    begin_mail_in_session(conn, sender, recipients, subject, mime_type,
    priority);
    RETURN conn;
    END;
    PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
              message IN VARCHAR2) IS
    BEGIN
    utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(CONVERT(message,'IW8ISO8859P8')));
    END;
    PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
                   message IN VARCHAR2) IS
    BEGIN
    utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(message));
    END;
    PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
              message IN RAW) IS
    BEGIN
    utl_smtp.write_raw_data(conn, message);
    END;
    PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN VARCHAR2,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
              last IN BOOLEAN DEFAULT FALSE) IS
    BEGIN
    begin_attachment(conn, mime_type, inline, filename);
    write_text(conn, data);
    end_attachment(conn, last);
    END;
    PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN RAW,
                   mime_type IN VARCHAR2 DEFAULT 'application/octet',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   last IN BOOLEAN DEFAULT FALSE) IS
    i PLS_INTEGER;
    len PLS_INTEGER;
    BEGIN
    begin_attachment(conn, mime_type, inline, filename, 'base64');
    -- Split the Base64-encoded attachment into multiple lines
    i := 1;
    len := utl_raw.length(data);
    WHILE (i < len) LOOP
    IF (i + MAX_BASE64_LINE_WIDTH < len) THEN
         utl_smtp.write_raw_data(conn,
         utl_encode.base64_encode(utl_raw.substr(data, i,
         MAX_BASE64_LINE_WIDTH)));
    ELSE
         utl_smtp.write_raw_data(conn,
         utl_encode.base64_encode(utl_raw.substr(data, i)));
    END IF;
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    i := i + MAX_BASE64_LINE_WIDTH;
    END LOOP;
    end_attachment(conn, last);
    END;
    PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   transfer_enc IN VARCHAR2 DEFAULT NULL) IS
    BEGIN
    write_boundary(conn);
    write_mime_header(conn, 'Content-Type', mime_type);
    IF (filename IS NOT NULL) THEN
    IF (inline) THEN
         write_mime_header(conn, 'Content-Disposition',
         'inline; filename="'||filename||'"');
    ELSE
         write_mime_header(conn, 'Content-Disposition',
         'attachment; filename="'||filename||'"');
    END IF;
    END IF;
    IF (transfer_enc IS NOT NULL) THEN
    write_mime_header(conn, 'Content-Transfer-Encoding', transfer_enc);
    END IF;
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    END;
    PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   last IN BOOLEAN DEFAULT FALSE) IS
    BEGIN
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    IF (last) THEN
    write_boundary(conn, last);
    END IF;
    END;
    PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    end_mail_in_session(conn);
    end_session(conn);
    END;
    FUNCTION begin_session RETURN utl_smtp.connection IS
    conn utl_smtp.connection;
    BEGIN
    -- open SMTP connection
    conn := utl_smtp.open_connection(smtp_host, smtp_port);
    utl_smtp.helo(conn, smtp_domain);
    RETURN conn;
    END;
    PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
                        sender IN VARCHAR2,
                        recipients IN VARCHAR2,
                        subject IN VARCHAR2,
                        mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   --     mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=windows-1255',
                        priority IN PLS_INTEGER DEFAULT NULL) IS
    my_recipients VARCHAR2(32767) := recipients;
    my_sender VARCHAR2(32767) := sender;
    BEGIN
    -- Specify sender's address (our server allows bogus address
    -- as long as it is a full email address ([email protected]).
    utl_smtp.mail(conn, get_address(my_sender));
    -- Specify recipient(s) of the email.
    WHILE (my_recipients IS NOT NULL) LOOP
    utl_smtp.rcpt(conn, get_address(my_recipients));
    END LOOP;
    -- Start body of email
    utl_smtp.open_data(conn);
    -- Set "From" MIME header
    write_mime_header(conn, 'From', sender);
    -- Set "To" MIME header
    write_mime_header(conn, 'To', recipients);
    -- Set "Subject" MIME header
    write_mime_header(conn, 'Subject', subject);
    -- Set "Content-Type" MIME header
    write_mime_header(conn, 'Content-Type', mime_type);
    -- Set "X-Mailer" MIME header
    write_mime_header(conn, 'X-Mailer', MAILER_ID);
    -- Set priority:
    -- High Normal Low
    -- 1 2 3 4 5
    IF (priority IS NOT NULL) THEN
    write_mime_header(conn, 'X-Priority', priority);
    END IF;
    -- Send an empty line to denotes end of MIME headers and
    -- beginning of message body.
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    IF (mime_type LIKE 'multipart/mixed%') THEN
    write_text(conn, 'This is a multi-part message in MIME format.' ||
         utl_tcp.crlf);
    END IF;
    END;
    PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    utl_smtp.close_data(conn);
    END;
    PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    utl_smtp.quit(conn);
    END;
    END;

    Hello All,
    Small modification - use this package and not the above
    HERE IS A WORKING CODE FOR SENDING HEBREW MESSAGES (INCLUDING SUBJECT IN UTF-8 APPEAR IN ALL EMAIL CLIENTS I HAVE CHECKED) + ATTACHMENTS
    Code attached below is supplied as is with no support. anyhow if help is needed , please contact me via [email protected]
    ============================================================================
    CREATE OR REPLACE PACKAGE demo_mail_heb IS
    ----------------------- Customizable Section -----------------------
    -- Customize the SMTP host, port and your domain name below.
    smtp_host VARCHAR2(256) := pst_ajax.getParameter('EMAIL_SMTP_HOST');
    smtp_port PLS_INTEGER := pst_ajax.getParameter('EMAIL_SMTP_PORT');
    smtp_domain VARCHAR2(256) := pst_ajax.getParameter('EMAIL_SMTP_DOMAIN');
    -- Customize the signature that will appear in the email's MIME header.
    -- Useful for versioning.
    MAILER_ID CONSTANT VARCHAR2(256) := 'Mailer by Oracle UTL_SMTP';
    --------------------- End Customizable Section ---------------------
    -- A unique string that demarcates boundaries of parts in a multi-part email
    -- The string should not appear inside the body of any part of the email.
    -- Customize this if needed or generate this randomly dynamically.
    BOUNDARY CONSTANT VARCHAR2(256) := '-----7D81B75CCC90D2974F7A1CBD';
    FIRST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || utl_tcp.CRLF;
    LAST_BOUNDARY CONSTANT VARCHAR2(256) := '--' || BOUNDARY || '--' ||
    utl_tcp.CRLF;
    -- A MIME type that denotes multi-part email (MIME) messages.
    MULTIPART_MIME_TYPE CONSTANT VARCHAR2(256) := 'multipart/mixed; boundary="'||
    BOUNDARY || '"';
    MAX_BASE64_LINE_WIDTH CONSTANT PLS_INTEGER := 76 / 4 * 3;
    -- Sent clear Html Email
    procedure send_html_mail (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default null,
    p_mime_type in varchar2 default 'text/html; charset=windows-1255');
    -- Sent Html Email with Attachment
    procedure send_html_mail_attach (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default '<b>áå÷ø èåá òåìí - áãé÷ä</b',
    p_mime_type in varchar2 default 'text/html; charset=windows-1255',
    p_file_name in varchar2 default 'but_choose_file.gif',
    p_file_mime_type in varchar2 default 'application/pdf',
    p_file_URL in varchar2 default 'http://10.172.246.160:7777/i/but_choose_file.gif');
    -- A simple email API for sending email in plain text in a single call.
    -- The format of an email address is one of these:
    -- someone@some-domain
    -- "Someone at some domain" <someone@some-domain>
    -- Someone at some domain <someone@some-domain>
    -- The recipients is a list of email addresses separated by
    -- either a "," or a ";"
    PROCEDURE mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              message IN VARCHAR2);
    -- Extended email API to send email in HTML or plain text with no size limit.
    -- First, begin the email by begin_mail(). Then, call write_text() repeatedly
    -- to send email in ASCII piece-by-piece. Or, call write_mb_text() to send
    -- email in non-ASCII or multi-byte character set. End the email with
    -- end_mail().
    FUNCTION begin_mail(sender IN VARCHAR2,
              recipients IN VARCHAR2,
              subject IN VARCHAR2,
              mime_type IN VARCHAR2 DEFAULT 'text/plain',
              priority IN PLS_INTEGER DEFAULT NULL)
              RETURN utl_smtp.connection;
    -- Write email body in ASCII
    PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
              message IN VARCHAR2);
    -- Write email body in non-ASCII (including multi-byte). The email body
    -- will be sent in the database character set.
    PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
                   message IN VARCHAR2);
    -- Write email body in binary
    PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
              message IN RAW);
    -- APIs to send email with attachments. Attachments are sent by sending
    -- emails in "multipart/mixed" MIME format. Specify that MIME format when
    -- beginning an email with begin_mail().
    -- Send a single text attachment.
    PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN VARCHAR2,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
              last IN BOOLEAN DEFAULT FALSE);
    -- Send a binary attachment. The attachment will be encoded in Base-64
    -- encoding format.
    PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
                   data IN RAW,
                   mime_type IN VARCHAR2 DEFAULT 'application/octet',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   last IN BOOLEAN DEFAULT FALSE);
    -- Send an attachment with no size limit. First, begin the attachment
    -- with begin_attachment(). Then, call write_text repeatedly to send
    -- the attachment piece-by-piece. If the attachment is text-based but
    -- in non-ASCII or multi-byte character set, use write_mb_text() instead.
    -- To send binary attachment, the binary content should first be
    -- encoded in Base-64 encoding format using the demo package for 8i,
    -- or the native one in 9i. End the attachment with end_attachment.
    PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   mime_type IN VARCHAR2 DEFAULT 'text/plain',
                   inline IN BOOLEAN DEFAULT TRUE,
                   filename IN VARCHAR2 DEFAULT NULL,
                   transfer_enc IN VARCHAR2 DEFAULT NULL);
    -- End the attachment.
    PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                   last IN BOOLEAN DEFAULT FALSE);
    -- End the email.
    PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection);
    -- Extended email API to send multiple emails in a session for better
    -- performance. First, begin an email session with begin_session.
    -- Then, begin each email with a session by calling begin_mail_in_session
    -- instead of begin_mail. End the email with end_mail_in_session instead
    -- of end_mail. End the email session by end_session.
    FUNCTION begin_session RETURN utl_smtp.connection;
    -- Handling the Email Subject Line
    function mimeheader_encode(
    p_str varchar2
    , p_charset varchar2 := 'UTF-8') return varchar2;
    -- Begin an email in a session.
    PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
                        sender IN VARCHAR2,
                        recipients IN VARCHAR2,
                        subject IN VARCHAR2,
    --                     mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=windows-1255',
              mime_type IN VARCHAR2 DEFAULT 'text/plain',
                        priority IN PLS_INTEGER DEFAULT NULL);
    -- End an email in a session.
    PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection);
    -- End an email session.
    PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection);
    END;
    CREATE OR REPLACE PACKAGE BODY demo_mail_heb IS
    -- Sent clear Html Email
    procedure send_html_mail (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default null,
    p_mime_type in varchar2 default 'text/html; charset=windows-1255')
    Is
    conn utl_smtp.connection;
    BEGIN
    conn := demo_mail_heb.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => 'text/html; charset=UTF-8');--p_mime_type);
    demo_mail_heb.write_text(
    conn => conn,
    message => p_data);
    demo_mail_heb.end_mail( conn => conn );
    END;
    -- Sent Html Email with Attachment
    procedure send_html_mail_attach (p_sender in varchar2 default null,
    p_recipients in varchar2 default null,
    p_subject in varchar2 default null,
    p_data in varchar2 default '<b>áå÷ø èåá òåìí - áãé÷ä</b',
    p_mime_type in varchar2 default 'text/html; charset=windows-1255',
    p_file_name in varchar2 default 'but_choose_file.gif',
    p_file_mime_type in varchar2 default 'application/pdf',
    p_file_URL in varchar2 default 'http://10.172.246.160:7777/i/but_choose_file.gif')
    is
    conn utl_smtp.connection;
    req utl_http.req;
    resp utl_http.resp;
    data RAW(200);
    v_mime_type varchar2(32767):=demo_mail.MULTIPART_MIME_TYPE;
    begin
    conn := demo_mail_heb.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => v_mime_type);
    demo_mail_heb.attach_text(
    conn => conn,
    data => p_data,
    mime_type => 'text/html');
    demo_mail_heb.begin_attachment(
    conn => conn,
    mime_type => p_file_mime_type,
    inline => TRUE,
    filename => p_file_name,
    transfer_enc => 'base64');
    -- In writing Base-64 encoded text following the MIME format below,
    -- the MIME format requires that a long piece of data must be splitted
    -- into multiple lines and each line of encoded data cannot exceed
    -- 80 characters, including the new-line characters. Also, when
    -- splitting the original data into pieces, the length of each chunk
    -- of data before encoding must be a multiple of 3, except for the
    -- last chunk. The constant demo_mail_heb.MAX_BASE64_LINE_WIDTH
    -- (76 / 4 * 3 = 57) is the maximum length (in bytes) of each chunk
    -- of data before encoding.
    req := utl_http.begin_request(p_file_URL);
    resp := utl_http.get_response(req);
    BEGIN
    LOOP
    utl_http.read_raw(resp, data, demo_mail_heb.MAX_BASE64_LINE_WIDTH);
    demo_mail_heb.write_raw(
    conn => conn,
    message => utl_encode.base64_encode(data));
    END LOOP;
    EXCEPTION
    WHEN utl_http.end_of_body THEN
    utl_http.end_response(resp);
    END;
    demo_mail_heb.end_attachment( conn => conn );
    demo_mail_heb.end_mail( conn => conn );
    end;
    -- Return the next email address in the list of email addresses, separated
    -- by either a "," or a ";". The format of mailbox may be in one of these:
    -- someone@some-domain
    -- "Someone at some domain" <someone@some-domain>
    -- Someone at some domain <someone@some-domain>
    FUNCTION get_address(addr_list IN OUT VARCHAR2) RETURN VARCHAR2 IS
    addr VARCHAR2(256);
    i pls_integer;
    FUNCTION lookup_unquoted_char(str IN VARCHAR2,
    chrs IN VARCHAR2) RETURN pls_integer AS
    c VARCHAR2(5);
    i pls_integer;
    len pls_integer;
    inside_quote BOOLEAN;
    BEGIN
    inside_quote := false;
    i := 1;
    len := length(str);
    WHILE (i <= len) LOOP
    c := substr(str, i, 1);
    IF (inside_quote) THEN
    IF (c = '"') THEN
    inside_quote := false;
    ELSIF (c = '\') THEN
    i := i + 1; -- Skip the quote character
    END IF;
    GOTO next_char;
    END IF;
    IF (c = '"') THEN
    inside_quote := true;
    GOTO next_char;
    END IF;
    IF (instr(chrs, c) >= 1) THEN
    RETURN i;
    END IF;
    <<next_char>>
    i := i + 1;
    END LOOP;
    RETURN 0;
    END;
    BEGIN
    addr_list := ltrim(addr_list);
    i := lookup_unquoted_char(addr_list, ',;');
    IF (i >= 1) THEN
    addr := substr(addr_list, 1, i - 1);
    addr_list := substr(addr_list, i + 1);
    ELSE
    addr := addr_list;
    addr_list := '';
    END IF;
    i := lookup_unquoted_char(addr, '<');
    IF (i >= 1) THEN
    addr := substr(addr, i + 1);
    i := instr(addr, '>');
    IF (i >= 1) THEN
    addr := substr(addr, 1, i - 1);
    END IF;
    END IF;
    RETURN addr;
    END;
    -- Write a MIME header
    PROCEDURE write_mime_header(conn IN OUT NOCOPY utl_smtp.connection,
    name IN VARCHAR2,
    value IN VARCHAR2) IS
    BEGIN
    -- utl_smtp.write_data(conn, name || ': ' || value || utl_tcp.CRLF);
    utl_smtp.write_raw_data(conn, UTL_RAW.CAST_TO_RAW(name || ': ' ||value || utl_tcp.CRLF));
    END;
    -- Mark a message-part boundary. Set <last> to TRUE for the last boundary.
    PROCEDURE write_boundary(conn IN OUT NOCOPY utl_smtp.connection,
    last IN BOOLEAN DEFAULT FALSE) AS
    BEGIN
    IF (last) THEN
    utl_smtp.write_data(conn, LAST_BOUNDARY);
    ELSE
    utl_smtp.write_data(conn, FIRST_BOUNDARY);
    END IF;
    END;
    PROCEDURE mail(sender IN VARCHAR2,
    recipients IN VARCHAR2,
    subject IN VARCHAR2,
    message IN VARCHAR2) IS
    conn utl_smtp.connection;
    BEGIN
    conn := begin_mail(sender, recipients, subject);
    write_text(conn, message);
    end_mail(conn);
    END;
    FUNCTION begin_mail(sender IN VARCHAR2,
    recipients IN VARCHAR2,
    subject IN VARCHAR2,
    mime_type IN VARCHAR2 DEFAULT 'text/plain',
    priority IN PLS_INTEGER DEFAULT NULL)
    RETURN utl_smtp.connection IS
    conn utl_smtp.connection;
    BEGIN
    conn := begin_session;
    begin_mail_in_session(conn, sender, recipients, subject, mime_type,
    priority);
    RETURN conn;
    END;
    PROCEDURE write_text(conn IN OUT NOCOPY utl_smtp.connection,
    message IN VARCHAR2) IS
    BEGIN
    utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(CONVERT(message,'IW8ISO8859P8')));
    -- utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(message));
    END;
    PROCEDURE write_mb_text(conn IN OUT NOCOPY utl_smtp.connection,
    message IN VARCHAR2) IS
    BEGIN
    utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(message));
    END;
    PROCEDURE write_raw(conn IN OUT NOCOPY utl_smtp.connection,
    message IN RAW) IS
    BEGIN
    utl_smtp.write_raw_data(conn, message);
    END;
    PROCEDURE attach_text(conn IN OUT NOCOPY utl_smtp.connection,
    data IN VARCHAR2,
    mime_type IN VARCHAR2 DEFAULT 'text/plain',
    inline IN BOOLEAN DEFAULT TRUE,
    filename IN VARCHAR2 DEFAULT NULL,
    last IN BOOLEAN DEFAULT FALSE) IS
    BEGIN
    begin_attachment(conn, mime_type, inline, filename);
    write_text(conn, data);
    end_attachment(conn, last);
    END;
    PROCEDURE attach_base64(conn IN OUT NOCOPY utl_smtp.connection,
    data IN RAW,
    mime_type IN VARCHAR2 DEFAULT 'application/octet',
    inline IN BOOLEAN DEFAULT TRUE,
    filename IN VARCHAR2 DEFAULT NULL,
    last IN BOOLEAN DEFAULT FALSE) IS
    i PLS_INTEGER;
    len PLS_INTEGER;
    BEGIN
    begin_attachment(conn, mime_type, inline, filename, 'base64');
    -- Split the Base64-encoded attachment into multiple lines
    i := 1;
    len := utl_raw.length(data);
    WHILE (i < len) LOOP
    IF (i + MAX_BASE64_LINE_WIDTH < len) THEN
    utl_smtp.write_raw_data(conn,
    utl_encode.base64_encode(utl_raw.substr(data, i,
    MAX_BASE64_LINE_WIDTH)));
    ELSE
    utl_smtp.write_raw_data(conn,
    utl_encode.base64_encode(utl_raw.substr(data, i)));
    END IF;
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    i := i + MAX_BASE64_LINE_WIDTH;
    END LOOP;
    end_attachment(conn, last);
    END;
    PROCEDURE begin_attachment(conn IN OUT NOCOPY utl_smtp.connection,
    mime_type IN VARCHAR2 DEFAULT 'text/plain',
    inline IN BOOLEAN DEFAULT TRUE,
    filename IN VARCHAR2 DEFAULT NULL,
    transfer_enc IN VARCHAR2 DEFAULT NULL) IS
    BEGIN
    write_boundary(conn);
    write_mime_header(conn, 'Content-Type', mime_type);
    IF (filename IS NOT NULL) THEN
    IF (inline) THEN
    write_mime_header(conn, 'Content-Disposition',
    'inline; filename="'||filename||'"');
    ELSE
    write_mime_header(conn, 'Content-Disposition',
    'attachment; filename="'||filename||'"');
    END IF;
    END IF;
    IF (transfer_enc IS NOT NULL) THEN
    write_mime_header(conn, 'Content-Transfer-Encoding', transfer_enc);
    END IF;
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    END;
    PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
    last IN BOOLEAN DEFAULT FALSE) IS
    BEGIN
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    IF (last) THEN
    write_boundary(conn, last);
    END IF;
    END;
    PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    end_mail_in_session(conn);
    end_session(conn);
    END;
    FUNCTION begin_session RETURN utl_smtp.connection IS
    conn utl_smtp.connection;
    BEGIN
    -- open SMTP connection
    conn := utl_smtp.open_connection(smtp_host, smtp_port);
    utl_smtp.helo(conn, smtp_domain);
    RETURN conn;
    END;
    -- Handling the Email Subject Line
    function mimeheader_encode(
    p_str varchar2
    , p_charset varchar2 := 'UTF-8') return varchar2 is
    l_str varchar2(2000);
    begin
    l_str:=utl_raw.cast_to_varchar2(utl_encode.quoted_printable_encode(utl_raw.cast_to_raw(p_str)));
    l_str:=replace(l_str,'='||chr(13)||chr(10),''); --unfold the data
    l_str:=replace(l_str,'?','=3f'); --quote question marks
    l_str:=replace(l_str,' ','=20'); --quote spaces
    l_str:='=?'||p_charset||'?Q?'||l_str||'?='; -- add prefix and suffix
    return l_str;
    end;
    PROCEDURE begin_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection,
    sender IN VARCHAR2,
    recipients IN VARCHAR2,
    subject IN VARCHAR2,
    mime_type IN VARCHAR2 DEFAULT 'text/plain',
    -- mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=windows-1255',
    priority IN PLS_INTEGER DEFAULT NULL) IS
    my_recipients VARCHAR2(32767) := recipients;
    my_sender VARCHAR2(32767) := sender;
    BEGIN
    -- Specify sender's address (our server allows bogus address
    -- as long as it is a full email address ([email protected]).
    utl_smtp.mail(conn, get_address(my_sender));
    -- Specify recipient(s) of the email.
    WHILE (my_recipients IS NOT NULL) LOOP
    utl_smtp.rcpt(conn, get_address(my_recipients));
    END LOOP;
    -- Start body of email
    utl_smtp.open_data(conn);
    -- Set "From" MIME header
    write_mime_header(conn, 'From', sender);
    -- Set "To" MIME header
    write_mime_header(conn, 'To', recipients);
    -- Set "Content-Type" MIME header
    write_mime_header(conn, 'Content-Type', mime_type);
    -- write_mime_header(conn, 'Content-Type', 'text/html; charset=UTF-8');
    -- Set "Subject" MIME header
    -- write_mime_header(conn, 'Subject', subject);
    -- write_mime_header(conn, 'Subject', CONVERT(subject,'IW8ISO8859P8'));
    write_mime_header(conn, 'Subject',mimeheader_encode(p_str => subject,p_charset => 'UTF-8'));
    -- write_mime_header(conn, 'Subject',CONVERT(subject,'IW8MSWIN1255'));
    -- Set "X-Mailer" MIME header
    write_mime_header(conn, 'X-Mailer', MAILER_ID);
    -- Set priority:
    -- High Normal Low
    -- 1 2 3 4 5
    IF (priority IS NOT NULL) THEN
    write_mime_header(conn, 'X-Priority', priority);
    END IF;
    -- Send an empty line to denotes end of MIME headers and
    -- beginning of message body.
    utl_smtp.write_data(conn, utl_tcp.CRLF);
    IF (mime_type LIKE 'multipart/mixed%') THEN
    write_text(conn, 'This is a multi-part message in MIME format.' ||
    utl_tcp.crlf);
    END IF;
    END;
    PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    utl_smtp.close_data(conn);
    END;
    PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection) IS
    BEGIN
    utl_smtp.quit(conn);
    END;
    END;

  • Literally the worst customer support experience I've ever had to deal with -- Why don't they let their customers speak to supervisors on demand?

    Call 1: I spoke to them to see if I was eligible for an upgrade. It turned out they had accidentally counted a temporary phone switch to an old device as an upgrade. The representative was extremely slow minded and took over an hour to read through my notes and process what I was saying happened, consulting with his supervisor multiple times. He claimed to have noted everything and told me I had to go to a verizon store to verify in person that I was still using my original phone, and that then I would be able to get an upgrade immediately.
    Trip to the store: Drove an hour only to be told by the store rep that there were NO NOTES on my account about the issue and there was nothing he could do to help me and that I'd have to call customer support again. The store was closing in 20 mins and customer support seems to take 45 minutes minimum to resolve anything, so I left.
    Call 2: Asked a woman to speak to a supervisor about the guy who wasted 2+ hours of my life and gas money. She put me on hold for a long time, came back and said they were all busy right now, would I like to leave my complaint with her? I said no thank you, I will keep waiting. She said ok, and proceeded to hang up.
    Call 3: Asked a different woman to speak to a supervisor, she put me on hold for a long time and then told me that since I wasn't an authorized user I could not speak to one... lol ok. Had a family member call and authorize me.
    Call 4: Asked a guy to speak to a manager. He insisted on taking the complaint himself. Why would I trust someone to take a complaint about their colleague possibly sitting a few desks away when many of them have proven to be incredibly incompetent already? It sounded like we were making progress... then he hung up too.
    Call 5: Asked yet another woman to speak to the manager. She demanded a reason, I told her it was to make a complaint and she told me about a dozen times that the managers would just tell her to take the complaint. I insisted, she refused... finally I threatened to close all of our accounts unless she let me speak to a manager. She said they couldn't right now since the office was closing soon, but that one would call me within 24-48 hours. I'd bet my life savings that never happens. At that point I tried to talk to her about the original upgrade issue, and she said her system had suddenly crashed and that I'd have to call back the next day...  Seriously???
    Absolutely unreal how horrible their customer support is. Will be switching to T-Mobile immediately.

    Having worked in customer service, I have some experience with this kind of situation.  Reps are typically trained to make all attempts to handle complaints by themselves, because there are obviously many more reps than supervisors.  They're usually REQUIRED to fully authorize the account and to get the whole situation from the customer prior to referring you to a supervisor.  One of the biggest problems is that many customers think that demanding a supervisor is a way to guarantee you will get what you want.  If the reason for your request to escalate isn't a valid one, the supervisor won't give in to you either.
    There are plenty of times in my own experience, especially as a brand new rep out of training, that I took a long time to research and get an understanding of the issue.  Yes, I wasn't moving at light speed, but that doesn't make me an idiot.  It means I was trying to gather as much info s possible to try and deal with the issue. But I had plenty of customers tell me I was stupid and to transfer them to my supervisor, simply because I took longer than their patience could tolerate to get all the details I needed.
    I have never had a job that I executed flawlessly day in and day out.  Maybe you have and that's why you can't tolerate a person taking a little longer to wrap their head around the issue, but I'd rather doubt it.
    I also don't think you will find reps who work at light speed and utilize a magic wand to fix people's issues at T-Mobile, either, but I guess it never hurts to try.
    Just to clarify: I do not work for Verizon and never have.  I worked for a residential phone and internet company.

  • Dealing with null values from a database (easy?)

    I'm sure this should be a simple question :
    I'm creating a dynamic dropdown of my companies products that once a product is selected draws values (links) from a database and displays them (links to User guides, FAQs etc).
    My problem is dealing with blank entries in the database - i.e. if a product doesn't have a User guide I've left the database blank.
    I'd like to show 'none' or 'not available' if the entry is blank rather than the 'null' I currently get.
    I'm sure it should be a straightforward if .... else .... but I'm struggling and would appreciate any help,
    Many thanks,
    Mo

    Thanks for the message, the cut down piece of code I'm using for the output is:
    <%
    while (rs.next())
    //header row
    out.println("<tr bgcolor='#666666'>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>Product Name</font></td>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>FAQs</font></td>");
    out.println("<td><font style='font-family:arial;color:#ffffff;font-size:10px;'>Technical Information</font></td>");
    out.println("</tr>");
    //results
    out.println("<tr border='1' bordercolor='#CCCCCC' bgcolor='#FFFFFF'>");
    out.println("<td><font style='font-family:arial;font-size:12px;font-weight:bold;'><a style='text-decoration:none' href=" + rs.getString("ProductURL") + " target='_blank'><font color='#669999'>" + rs.getString("ProductName") + "</a></td>");
    out.println("<td><font style='font-family:arial;color:#000000;font-size:10px;'>" + rs.getString("FAQs") + "</td>");
    out.println("<td><font style='font-family:arial;color:#000000;font-size:10px;'>" + rs.getString("TechInfo") + "</td>");
    out.println("</tr>");
    stmt.close();
    conn.close();
    %>
    It's the FAQs and TechInfo strings I need to use the statement on - if there's no entry show 'none',
    Thanks again,
    Mo

  • How to deal with several itunes users in a house

    I will try to be brief but explain what I don't know how to configure.
    We have three children. We have 5 laptops that work wirelessly, and we have music and photos all stored on a shared NAS drive. We moved our iTunes music folder successfully to it when we set up.
    1. We set everyone's folder location, under preferences, to the folder on the NAS drive.--- It won't stay. With any reboot or interruption in signal it switches back to the individual computer's hard drive. This is a pain, because every time you reset it, you have to wait for 30 gigs of music to update. This has been asked before and no one answers it. Is it a bug and is Apple aware?
    2. I understand that we can "share" our libraries. But how do we deal with the issue of individual family members purchasing songs from iTunes? As in, I would like to add songs my teen bought to my ipod, but how do I know if there is new music beside asking them to "log" all their purchased so I can manually look for them. We can't just sync every time. They have nanos, and I don't want to have to weed through Christmas music, audio books, and Kidz Bop each time and delete them. What about someone finding they are not "authorized" to play a song? We can have 5 authorized no? I tried to drag something from a shared library onto an ipod and it wouldn't let me.
    Please help. My last question dropped to page three by the end of the day with no response.

    I guess then I need to read more about my NAS drive, because it is always on. I read in another thread about the same issue the question was asked, "Is your NAS drive mounted?" I have no idea what that means. There was other ideas of making alias of the NAS iTunes folder and putting in on the laptop's dock, but I didn't quite understand that either.
    I thought NAS was a rapper. Well, I have no idea what a NAS drive is. But it should have no influence on iTunes' behavior. If that drive is always on and visible on your Desktop (= "mounted"), iTunes shouldn't change its settings re. its Library.
    It would be easier to draw all this instead of explaining, but, well, we are not that far yet.
    0: If you set up on all Macs that iTunes stores its files on one drive, iTunes should not change this on any of them as long as it is always on, as you said. If it does, thought, something is wrong. Don't ask me, what.
    Ok, just to make this even more complicated, LOL if each person has their own laptop and ipod, and everyone in the household has used their 5 authorizations on each other's computers, then theoretically, when everyone accesses the itunes library they should be able to copy the songs onto their devices?
    1: You can play all your music on this external drive from anywhere in the house.
    2: You can activate the DRM files on every Mac in the house and play them.
    3: You canNOT use one iPod on more than one Mac, regardless if the music is DRM or not. iPod 1 is associated with Mac A, iPod 2 with Mac B etc. If you change that, all music from iPod 1 will be deleted before the music from Mac B will be copied to it. So, it's always 1:A, 2:B etc., not iPod 1 : Mac A & B & C... Otherwise, your iPods would be regular external hard drives from which you could copy tons of music to someone else's PC, which is illegal. That's why all the music on an iPod is made invisible. And even after making it visible with special utilities (I tried that once), you won't be able to recognize which song is which. CDs are not stored together, etc. Apple would not have got the permissions for the iTunes Store / iPods from the music industry if it was the perfect utility for illegal music sharing.
    Did I savvy what you meant?

Maybe you are looking for

  • NOT disabling keyboard/trackpad on tablet fold...

    This is probably the opposite of user problems regarding the keyboard/trackpad and turning the Yoga Pro 2 in tablet mode... Here's the situation: I'm a Java programmer and I'm sharing my files with my home PC, so I can work from my laptop or desktop

  • SD: Billing : Invoices send to incorrect customers

    Hi All, We are facing a peculiar issue at our client Produciton system while generating (collective - mass) invoices. Following are the details System Details R/3 version - 4.6C OS - Windows DB- MSSQL The following program - RV60SBT1 ( Creating Billi

  • Configure Enterprise Services Standard BackEnd (in ECC 6.0)

    Hi Experts, I have questions about one thread, please help me. In the last post of thread Link: [Enhancement Package on ECC 6.0 for using ESR on|Enhancement Package on ECC 6.0 for using ESR on; 1. Download the service metadata (definition) from SAP S

  • Reprinting output but originating user deleted off SAP

    Hi, We have an issue whereby our claims dept wishes to print off claims output but the user who created the document has left the company and their profile deleted. This causes an error when we request a repeated output. Is there a way to request a r

  • Installation failed (10.6 and 10.7 disks)

    I have a Macbook Pro 15" (Intel Duo) that will not install OS X. Originally, I was upgrading the drive to a 500gb so I used a Time Machine backup, but once it completed, the computer would lock up intermittently. I decided that doing a fresh install