Mail to Proxy scenario with attachment. AF channel error.

Hi,
We are running SAP PI 7.1. I am experiencing the following problem in a Sender Mail adapter.(POP3).Mail to Proxy Scenario.
I have configured a sender mail adapter channel as POP3. This channel is configured to use the Mail Package and to Keep attachments. When I send a mail with an attachment to the mailbox that is being monitored by this channel, then the channel collects it from the mailbox.
In channel monitoring it indicates that the message was successfully delivered. However when I click on the message ID the view the audit Log it gives an error: u201CTransmitting the message to endpoint http://HOSTNAME:8101/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error transmitting the message over HTTP. Reason: java.io.IOException: Error writing to server.u201D The message never arrives at the integration sever to be view in sxmb_moni.
Also when I sent a message without an attachment the message does go through. Or if I send a message with a text attachment the the message goes through, but not the attachment.
Any help would be most welcome.
Regards
Willie Hugo

Hi Willem,
I'm coming back to your original problem: "com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error transmitting the message over HTTP. Reason: java.io.IOException: Error writing to server.u201D
Actually I had the same problem here and found a solution for it. In this case it was a file to Proxy scenario. The file send was large. After structure conversion the file size was more then 100 MB as indicated in the Audit Log of the message "2009-03-02 09:27:06 Information Send binary file "<File_Name>" from ftp server "<ftpuser>", size 106706248 bytes with QoS EO.
The ICM restricts all HTTP requests larger then 102 MB via the parameter icm/HTTP/max_request_size_KB which has a default value of 102400 (100 MB). Therefore it rejects the requests and your error is thrown.
There are two ways of avoiding this:
1) Increase the parameter:                                         
Increasing the parameter implies a risk since large messages can overload the system (e.g. during the mapping). Therefore it is good to have these safety measurement in place.                                                                               
2) Split the request:                                                    
Depending on the scenario it might be possible to split the request  to restrict the max. number of records for a given file. This is the prefered option because it ensures better stability of the system and also better performance.                                                           
I think this situation applies to you as well - but I'm not sure since you did not specify the request size and the size of the attachement.
Best regards,
Mike

Similar Messages

  • Mail to proxy scenario with condition

    Hi Experts,
    I am using mail to proxy scenario.
    The mail box is having differnt files suppose:
    BOOKING_REF_DELIVERYNO_WB.pdf
    BOOKING_REF_SALESORDER_WB.PDF
    BOOKING_REF_CUSDECNO_WB.PDF
    DELIVERYNO_WB.pdf
    SALESORDER_WB.PDF
    CUSDECNO_WB.PDF
    BOOKING_REF_WB.pdf
    BOOKING_REF_DELIVERYNO_BOLCOPY.PDF
    BOOKING_REF_SALESORDER_BOLCOPY.PDF
    BOOKING_REF_CUSDECNO_BOLCOPY.PDF
    BOOKING_REF_BOLCOPY.PDF
    DELIEVERYNO_BOLCOPY.PDF
    CUSDECNO_BOLCOPY.PDF
    SALESORDER_BOLCOPY.PDF
    BOOKING_REF_AWB.PDF*
    DELIVERYNO_AWB.PDF
    SALESORDER_AWB.PDF
    CUSDECNO_AWB.PDF
    Depending upon the file name in the mail box, the file needs to be attached via proxy with particular code:(x for case 1, y for case 2 , z for case 3)..for attachment abap code wrtiiten for proxy.
    how to compare the file name from the mail?
    DO i need to write a UDF..mapped with filename field of the sender XSD?How to do that?
    Please suggest.
    Thanks,
    Sushama

    You can use the other UDF
    public String Get_Input_File_Name(Container container) throws StreamTransformationException
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = conf.get(key);
    return SourceFileName;
    the previous one was for XI 3.0 , may be some differnt requiement I am not sure.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    regards
    Ninad

  • File-xi- mail scenario with attachements

    Hi
    Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    thanks
    kumar

    Hi,
    >>>>Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    yes: your application puts order data into a file and generated a PDF file with it
    XI takes both and send order file in mail and PDF in mail attachment
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Mail to proxy scenario design

    Hello,
    In the new requirements, i need to set up mail to proxy scenario in sap PI. The mail comes in with a txt attachment. I can set up a sender mail adapter to fetch the mail and attachment. There are 5 columns in this file attachment. I need to read and map each record to the target message in message mapping. How do I do it? Any helpful answer would be really apprecaited.
    Cheers,
    Bai

    This piece of java code will remove the TAB
       //write your code here
      StringTokenizer st = new StringTokenizer(record,"\t",false);
      String t="";
      while (st.hasMoreElements()) t += st.nextElement();
      return t;
    Edited by: Bai Li on Dec 17, 2010 4:49 AM

  • Filter mail account in MAIL to PROXY scenario

    Hi all,
    I have a MAIL to PROXY scenario, and i would like receive emails only from specific adress.
    I try using Mail Package and add a condition in the receiver determination but it doesn´t work.
    Is there any way for do this?
    Regards,

    use xpath in RD to allow only the mail address you want to follow through.
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

  • Mail Sender to Abap Proxy Receiver with Attachements

    Hi All,
    Scenario: I need to create a ticket in Solman from a mail. I intend to do the scenario as Mail sender to Abap Proxy receiver asynchronous.
    I have configured my sender mail adapter and am able to get the mails in XI. The attachements also appear in Inbound payload as MailAttachement-1, MailAttachement-2 etc. I have checked use mail packege and keep attachements in sender adapter.
    Transport Protocol: IMAP4
    Message Protocol: XIPAYLOAD
    Queries:
    1. My Inbound Data Type is the mail Package -- ximail30_xsd. Here in sxmb_moni I can see the mail attributes like from, to and the mail body in content. But How can I read the attachements in my message mapping.
    2. How can I pass these attachements to Abap Proxy ( I do not need to alter attachments only pass to proxy ). These attachements have to be attached to the Solman ticket in SOLMAN server.
    Appreciate your kind response to my above queries.
    Thanks.
    Regards,
    Siddhesh S.Tawate
    PS: I have tried using PayloadSwapBean in adapter module but still the content at source remains same.

    Hi,
    Please find below the part of code that might help you. I have given code only responsible for attachements part of the ticket.
    loop at lt_attach into l_attachment.
            count = count + 1.
            if count = 1.
              first_line = 1.
            endif.
            l_type = l_attachment->GET_CONTENT_TYPE( ).
            split l_type at '"' into l_type
                                     file_name
                                     l_name.
            l_name = file_name.
            split file_name at '.' into file_name
                                        file_type.
            l_xstring = l_attachment->GET_BINARY_DATA( ).
            strlen = xstrlen( l_xstring ).
            Compute int = ( strlen div 255 ).
            Compute rem = ( strlen mod 255 ).
            if rem <> 0.
              int = int + 1.
            endif.
            count1 = int.
            if count = 1.
              last_line = count1.
            else.
              if int = 1.
                first_line = last_line.
              else.
                last_line = first_line + count1.
              endif.
            endif.
            wa_APPX_HEADERS-APPXNO = count.
            wa_APPX_HEADERS-DESCR = l_name.
            wa_APPX_HEADERS-FILETYP = file_type.
            wa_APPX_HEADERS-FILENAM = l_name.
            wa_APPX_HEADERS-FILEFM_UL = 'BIN'.
            wa_APPX_HEADERS-FIRSTL = first_line.
            wa_APPX_HEADERS-LASTL = last_line.
            wa_APPX_HEADERS-FILELEN = strlen.
            wa_APPX_HEADERS-LAST_USR = sy-uname.
            GET TIME STAMP FIELD wa_appx_headers-TIMESTAMP.
            append wa_APPX_HEADERS to it_APPX_HEADERS.
            while count1 <> 0.
              count1 = count1 - 1.
              if count1 <> 0.
                wa_APPX_LINES_bin-LINE = l_xstring+0(255).
                shift l_xstring left by 255 places in BYTE MODE.
              ELSE.
                wa_APPX_LINES_bin-LINE = l_xstring.
              endif.
              append wa_APPX_LINES_bin to it_APPX_LINES_bin.
              clear: wa_APPX_LINES_bin, wa_APPX_LINES.
            endwhile.
            first_line = last_line + 1.
            clear: strlen, count1, file_name, file_type, l_type, int, rem, l_xstring, l_attachment.
          endloop.
    CALL FUNCTION 'BAPI_NOTIFICATION_CREATE'
            EXPORTING
              NOTIF_EXT                = wa_NOTIF_EXT
            NOTIF_CRM                = wa_NOTIF_CRM
      IBASE_DATA               =
         IMPORTING
           NUMBER                   = Refnum
           NUMB                     = Numb
           REFNUM                   = Ticket_No
           SYSID                    = SYSID
            TABLES
              NOTIF_PARTNERS           = it_NOTIF_PARTNERS
            NOTIF_NOTES              = it_NOTIF_N_EXT
              NOTIF_SAP_DATA           = it_NOTIF_SAP_DATA
            NOTIF_TEXT_HEADERS       = it_NOTIF_TEXT_HEADERS
            NOTIF_TEXT_LINES         = it_NOTIF_TEXT_LINES
            APPX_HEADERS             = it_APPX_HEADERS
            APPX_LINES               = it_APPX_LINES
            APPX_LINES_BIN           = it_APPX_LINES_BIN
             RETURN                   = RETURN
    Please observe how first and last line of attachement is calculated. That is what created problem for me initially.
    Hope this helps.
    Regards,
    Siddhesh S.Tawate

  • Mail to R/3 with attachement type  PDF

    Hi Experts,
    I have a Scenario, Retrieve email with PDF attachment from MailServer and send it to ECC either in as same as email (mail content and attachment) or xml  using PI 70.How can i achieve this?
    I can able to read the mail with attachment but how can i send attachment to ECC or How can i convert into xml(PDF to XML).?
    Regards
    Upendra.V

    Hi Praveen,
    I done Mail To ABAP proxy ..
    I have used Payloadwapbean in my sender Mail adapter and i can see my inbound paylload as :MailMessage(text/xml;charset=utf8) ,Mailttachment-1(application/octet-stream;name="testpdf(attachementname).
    I am getting Mapping Error  :SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_MAIL_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
    plese help me how to reslove this.
    Thanks
    Upendra.V

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Unable to send mail to multiple recipients with attachment

    I'm using a script given in the Oracle page - http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt for sending mail with attachment. Although I'm able to send mail with attachment to a single user, but the same can't be done while the recipients are more than one. Can some one help me ?

    Hi,
    Ca you please send me an example set of parameteres that we need to pass to make this program work?
    I'm not able to attach a file to this program.Can youe please let me know how I can attach a file called 'Test.txt' kept at 'D:\' to this program?
    Thanks.
    Bhavin

  • Send e-mail in HTML-format with attachment

    Does function SO_OBJECT_SEND allow to send e-mail with attachment?
    Does function SO_DOCUMENT_SEND_API1 allow to send e-mail in HTML format?

    Hi SS
    See if you can understand this sample program
    PARAMETERS: po_email TYPE AD_SMTPADR LOWER CASE.
    DATA: li_objcont TYPE STANDARD TABLE OF solisti1,
    li_reclist TYPE STANDARD TABLE OF somlreci1,
    li_objpack TYPE STANDARD TABLE OF sopcklsti1,
    li_objhead TYPE STANDARD TABLE OF solisti1,
    li_content TYPE STANDARD TABLE OF solisti1,
    lwa_objcont TYPE solisti1,
    lwa_reclist TYPE somlreci1,
    lwa_objpack TYPE sopcklsti1,
    lwa_objhead TYPE solisti1,
    lwa_content TYPE solisti1,
    lwa_doc TYPE sodocchgi1,
    l_lines TYPE i.
    REFRESH: li_objcont[], li_reclist[],
    li_objpack[], li_objhead[],
    li_content[].
    CLEAR: lwa_objcont, lwa_reclist,
    lwa_objpack, lwa_objhead,
    lwa_content, lwa_doc.
    MOVE '<body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '<p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE 'This is a sample HTML content from test program' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    lwa_reclist-receiver = po_email.
    lwa_reclist-rec_type = 'U'.
    APPEND lwa_reclist TO li_reclist.
    lwa_objhead = 'test.htm'.
    APPEND lwa_objhead TO li_objhead.
    lwa_content = 'Please find attached document for more details'.
    APPEND lwa_content TO li_content.
    CLEAR l_lines.
    DESCRIBE TABLE li_content LINES l_lines.
    READ TABLE li_content INTO lwa_content INDEX l_lines.
    lwa_doc-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_content ).
    lwa_doc-obj_langu = 'E'.
    lwa_doc-obj_name = 'Test HTML file'.
    lwa_doc-obj_descr = 'Test HTML file'.
    CLEAR lwa_objpack-transf_bin.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'RAW'.
    APPEND lwa_objpack TO li_objpack.
    CLEAR: lwa_objpack, l_lines.
    DESCRIBE TABLE li_objcont LINES l_lines.
    READ TABLE li_objcont INTO lwa_objcont INDEX l_lines.
    lwa_objpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_objcont ).
    lwa_objpack-transf_bin = 'X'.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'HTM' .
    lwa_objpack-obj_name = 'Test HTML file'.
    lwa_objpack-obj_descr = 'Test HTML file'.
    APPEND lwa_objpack TO li_objpack.
    *Sending the mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc
    put_in_outbox = 'X'
    TABLES
    packing_list = li_objpack
    object_header = li_objhead
    contents_bin = li_objcont
    contents_txt = li_content
    receivers = li_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    IF sy-subrc NE 0.
    WRITE:/ 'Document sending failed'.
    ELSE.
    WRITE:/ 'Document successfully sent'.
    COMMIT WORK.
    ENDIF.
    This should give you all you need to know to send an HTML file.
    Thanks buddy

  • Call proxy service from other proxy service with attachment

    Hi!
    I have got an email sending proxy service I would like to call this from an other proxy service and I want to send attachment in email. I can send email with attachment if i call this proxy as a webservice (e.g. from soapUI)
    But if i want to call this email proxy service from other proxy service, the attachment in email is empty. I put a log action (expression: $attachments) in the beginning of email proxy service, and I saw this in the log file:
    +<con:attachments xmlns:con="http://www.bea.com/wli/sb/context"/>+
    So the attachment is really empty...
    I use service callout. I put an insert action in request action of service callout:
    In Variable:
    attachments
    XPath:
    +.+
    Location:
    as first child of
    Expression:
    +<con:attachment xmlns:con="http://www.bea.com/wli/sb/context">+
    +     <con:Content-Type>application/octet-stream</con:Content-Type>+
    +     <con:Content-Disposition>attachment; filename="{$v_fileName}"</con:Content-Disposition>+
    +     <con:Content-Transfer-Encoding>base64</con:Content-Transfer-Encoding>     +
    +     <con:body>{$attachments/ctx:attachment/ctx:body/*}</con:body>+
    +</con:attachment>+
    Why cannot I call this email proxy service from other proxy service for sending email with attachment?
    I tried to solve this other. I called an email sending business service from this proxy service. But in this case I cannot set the body of email. If I put just one Transport Header action in publish action, I could send the email (with empty body). But If I put a replace action in publish action as well then the OSB didn't send the email and I couldn't find any error message in log file... How could I set the body of email in publish action?
    Thanks!
    Viktor

    You should be able to get the current user id from the SPListItemEventProperties object. From here you should be able to create a Claim. For example get the user by using
    user = SPWeb.Users.GetByID(properties.CurrentUserId)
    SPClaim claim = SPClaimProviderManager.CreateUserClaim(user.email, SPOriginalIssuerType.TrustedProvider, issuerIdentifier);
    https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.claims.spclaimprovidermanager.createuserclaim(v=office.14).aspx
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Mail.app - Moving email with attachment to a subfolder causes the email to convert to text format and lose the attachment

    I am Lion on Mac Book pro.
    When I move a mail with attachement to a folder, sometimes, it loses its mime-type and becomes a text formatted message. Hence the contents of the attachments are added as text to the mail and I cannot download the attachments then.
    This does not happen always, but almost 3/10 times.
    Thanks.
    Regards,
    Viraj

    What type of mail account is this (POP, IMAP, .Mac)? If IMAP or .Mac, what are your Preferences > Accounts > Mailbox Behaviors > Drafts settings?
    Go to Apple Menu > System Preferences > Network, choose Network Port Configurations from the Show popup menu, and make sure that the configuration used to connect to Internet appears at the top of the list. Turn OFF all the port configurations except the one needed to connect to Internet and see whether that helps — if it doesn’t, turn ON again the ones you want enabled.
    Open Keychain Access > Keychain First Aid and verify/repair the keychain.
    Try also turning OFF the Search For Certificates options in Keychain Access > Preferences if any of them is ON — take a look at the following articles for more information on this particular issue:
    http://www.hawkwings.net/2006/07/18/apple-mail-phones-home-too/
    http://www.macgeekery.com/tips/mailapp_doesnt_phone_homeeither/

  • Sending mail from JSP page with attachment

    I have a requirement to send mail with attachment from my jsp pages, which should come to a particular mail box. Can any one help me by sending sample codes. Thankx in advance.

    hi,
    When request is posted you have to save file data from request to a file. you can not access the data using request.getParameter("file").

  • Proxy to SOAP scenario-With Attachment and Mapping

    I have a scenario to be developed, it is a Proxy to SOAP sceanrio.
    There are about 8 fields coming from Proxy.
    Can we create an attachment from these fields.
    Also we have to do a mapping of this attachment to a field in the target External Defination and also 2 fields of the 8 have to mapped to the other respective fields of the external defination.
    All this has to be posted on a webservice through SOAP with
    the 2 fields in payload and
    the attachment in the attachemnt section of the message
    Could this be achieved?

    In ABAP proxy you create a message with the two fields which you need for main SOAP message.
    The attachment is created exactly how it is requested from web service.
    You create a String with the XML (including tags) and do a codepage conversion to UTF-8 (or whatever is requested)
    Note: The payload is created in UTF-8 automatically, the attachment is treated as binary.
    You can also use a Java mapping for creating the attachment, if you have good Java skills, but I recommend to use program code for one purpose only on one place.

  • XML file to Proxy Scenario with BPM - ID Steps

    Hi Guys,
    Any one can help me to find  about the scenario XML file to ABAP Proxy with BPM, ID steps please. Any link or logical routing, receiver determination and interface determination idea. Please correct me,
    I have created Business Service as sender to send one xml file to BPM, BPM is sending a message to SNC system. I have created 2 receiver determinations, but I am confusing in interface determination, where to declare OM?
    Please can any one respond bit quicker.
    Thanks  in advance
    Regards
    San

    ES Repository
                         *Service Interfaces*
    Create one outbound service interface for XML file.
    Create one Inbound synchronous Interface for SNC system.
    Create one Abstract Asynchronous interface ,same message type as you used for outbound service interface .This is for Integration process receive step.
    Create one Abstract async interface for receiving the response from SNC system in Integration process.
    Create one Abstract synchronous interface to be used in the Integration process for Send sync step.
    Create on inbound asyn service interface for sending the response from integration process (received from SNC system) to the Receiver System.
                  Operation Mapping.
    Create an Operation Mapping using Abstract sync interface and inbound syn interfaces.
                  Integration Process
    start--->receive Step---->send Synchronous step----->send step.
    Create two container elements
    first with abstrat async interface for the XML request.
    second for abstract asyn interface with the XML response structure (asyn receiver system structure)
    In the send sync step select your abstract syn interface from the F4 help.and select the corresponding request and response message from the container element you defined earlier.
    Integration Directory.
    Create one sender File adapter Communication channel for XML file reading.
    Create two receiver communication channel for sync system(receiver XI adapte for ABAP PROXY) and other for asyn receiver system .
    Create 3 receiver determination
    1.from sender to Integration process.
    2.from Integration process to SNC system.
    3. from Integration process to Asyn Receiver System.
    Create 3 Interface determination.
    Specify Operation mapping while you are creating interface determination from Integration Process to Syn BS.
    Create one sender agreement
    Create two Receiver agreement.
    Regards
    Kubra Fatima.

Maybe you are looking for

  • Boot Camp Assistant, BootROM firmware

    I have a partition on an older MacBook Pro running OS X 10.5.8 which has Windows XP on the partition, installed through Boot Camp. I want to remove the partition and the Windows XP. When I try to start Boot Camp Assistant, it shows the following mess

  • BP opening

    hi all,         i add balance of creditors and debtors through (system initialization-opening balance-BP opening balance).         I use +ve amount for debit and -ve amount for credit but problem is when i check JE for same it shows me +ve amount in

  • Pages Crash: Possible Document Recovery?

    Hey, as I was inserting a table into an extensive lab report I was typing Pages crashed. I selected relauch from the crash window and was not greeted by a recovered version of my document. The last time I saved was a about and hour ago, and I would r

  • Dreamweaver Tag Issues

    On editing PHP files i have created on Dreamweaver, non of them seem to display on the design view. When in the code view, my opening DIV tages for my container etc change from RED to GREY to BLUE when i click on them in no particular order, as if dr

  • Where did my iWeb site go?

    I assume other people are having this problem but I haven't found an answer yet.  My iWeb site has disappeared from the internet.  When I go to my web address I get a page that says Mobileme is closed.  What do I do now? Thanks, Chris p.s. - Why does