XML Attachments

Hello All -
Is it possible to send attachments like PDF/DOC etc with XML in XI?
Let me know if its possible and how?
Thanks in advance,
Gerry

Hi Gerald,
This is possible.
If you want your file adeapter to read contents from a PDF file, check out the folloing blog,
/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
If you want your file adapter to generate its output into a PDF file, then check the following blog,
/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
Regards,
Bhavesh

Similar Messages

  • Email xml attachments: Problems with charset

    Hi all,
    I have an email proxy to read emails with xml attachements. In the pipeline i recovered the xml file and covert it to Base64. When i execute it on a windows environment the process works fine with all characters (ó,ò,ñ,Ç, etc..) but if it is executed on a unix enviroment these chars aren't codified rigthly.
    Some suggestions, please...
    Thanks a lot,
    Jordi.

    Hi,
    No errors in OSB. Yes, i know "Request encoding" field, but doesn't work. I think this only apply to email body but not for xml attachments, i don't know... Yes, the console shows bad chars as well as the log file.
    If the xml attachment has not special chars then OSB can process the file, convert to Base64 and send this file to destination system. Then, destion system (TrustedX: to verify digital signature) return ok.
    If the xml attachment contains "ñ, ó,etc...." chars then OSB can process the file, convert to Base64 and send this file to TrustedX, but TrustedX return "bad chars" error.
    I tried to save the Base64 file and descode this file. The result was a XML file with bad chars instead of special chars...
    Do you think someting like this can resolve the problem?: -Duser.language=es -Duser.region=ES -DLANG=es_ES.iso885915@euro -DNLS_LANG=spanish_spain.we8iso8859p15 -DNLS_NUMERIC_CHARACTERS=,. OR -Dfile.encoding=??? --> in the OSB startup file. Am not sure because on windows works without these options....
    Thanks for your response....
    thanks.....
    Edited by: [email protected] on 11-ene-2010 16:52
    Edited by: [email protected] on 11-ene-2010 16:52
    Edited by: [email protected] on 11-ene-2010 16:53

  • Mapping multiple xml attachments

    Dear all,
    We have a scenario where we receive multiple xml messages in a zip file. It is possible to unzip this file using the standard PayloadZipBean, and the xml messages are added as attachments to my PI message.
    Now I want to map each attachment to a target message. What is the best way to achieve this?
    I have seen this thread for accessing the attachments in the graphical map:
    /people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message-in-the-message-mapping
    However, should I develop an additional UDF for parsing the data? How can I achieve this?
    Any suggestions?
    Regards,
    Rudy

    > Each xml attachment should result in one service call.
    In that case I recommend to unzip the file with an OS command and process the XML files individually.
    But when you say, you have a sync call, what do you want to do with the response message?

  • Process attachments with sender email adapter

    Hi @ all,
    I have some problems dealing with xml attachments on emails. I configured the email sender adapter by using Michals Blog
    <a href="/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step:///people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    Unfortunately the mail header looks different as the one in the blog:
    <b>Content-ID: <[email protected]>
    Content-Type: application/octet-stream;name="[email protected]"
    Content-Disposition: attachment;filename="MailAttachment-1.bin"
    Content-Description: MailAttachment-1</b>
    What can I do to make it look like in the blog?
    thanks and Regards.
    Oliver.

    Hi,
    Try With the Following Blogs
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    Reward Points if Helpful
    Regards
    Khanna

  • Mail Sender Adapter with multiple sMIME attachments

    Hi!
    I 'm using XI 3.0 SP 15.
    I have problems with my Mail-Sender-Adapter.
    The mails, I fetch, contain a certificate and multiple xml-attachments. The xml's represent an IDOC-structure (INVOIC.INVOIC02).
    The task is to first check the certificate, and then to send each of the XML attachments separately to an SAP-System.
    1) We have twelve partner which use this e-Invoicing interface. How do I administer the certificates and do I have to create for each partner a "Sendervereinbarung"?
    2)
    The second problem is, that I have multiple payloads which have to be processed separately. How can this be done?
    kind regards and thanks a lot for your help
    MArtin

    As we have multiple xml-attachments, I guess we have a major problem anyway.
    I guess Certificate verification in the sebder agreement is done after the Module Processing of the email-adapter isn't it?
    Due to the multiple attachments we have to write a customer specific Module for the email-adapter anyway.
    I guess the only way is that the module validates the certificate against the J2EE KeyStore and then extracts the various xml attachments to a file share.
    A File sender adapter then polls the file share and the sender aggreement / receiver agreement /mapping ... process starts.
    The only question is if the file adapter works also without a sender agreement, so that the xml's are stored on the file share
    Do you have an idea, if this works? or do you see any alternatives?
    thanks alot for your help!!
    MArtin

  • Adapter Module: Validate an XML with an XSD

    Hello all,
    I'm developing a PI adapter module (Exchange Infrastructure 3.0) for the Mail Adapter. In this module I need to get each XML attachment and then validate with an XSD schema, for this I'm using the SAX parser.
    I successfully retrieved all XML attachments but when I'm trying to use the method setProperty of the SAXParser instance I'm getting an exception, bellow the code snippet.
         private static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         private static final String SCHEMA_SOURCE   = "http://java.sun.com/xml/jaxp/properties/schemaSource";
         private static final String XML_SCHEMA      = "http://www.w3.org/2001/XMLSchema";
         public boolean isValid(byte[] src, AuditMessageKey amk1){
              SAXParserFactory spf = SAXParserFactory.newInstance();
              SAXParser sp = null;
              spf.setNamespaceAware(true);
              spf.setValidating(true);
              String[] schemas = new String[MAX_SCHEMAS];
              schemas[0] = getClass().getResource(SCHEMA1).getFile();
              schemas[1] = getClass().getResource(SCHEMA2).getFile();
              schemas[2] = getClass().getResource(SCHEMA3).getFile();
              try {
                   sp = spf.newSAXParser();
              catch (Exception e){
                   Audit.addAuditLogEntry(amk1, AuditLogStatus.ERROR, "MultipleAttachments: Error creating parser.");
                   return false;
    // HERE IS THE STEP THROWING THE EXCEPTION
              try {
                   sp.setProperty(SCHEMA_LANGUAGE, XML_SCHEMA);
              catch (Exception e){
                   Audit.addAuditLogEntry(amk1, AuditLogStatus.ERROR, "MultipleAttachments: Error setting schema.");
                   return false;
    Did Anyone have faced this issue? How can I solve this?
    Best regards,
    David

    Hi David,
    we developed a xsd validation with java mapping.
    SAP has it's own parser. At the time we developed there was a bad bug in this parser. The parser throwed a fatal error although the xml was valid!
    SAP corrected the error. But this is over 1,5 years ago. I recommend a OSS .
    Regards Mario

  • Help converting or reading SOAP XML-attachment instead of payload

    Hi,
    I have to setup a webservice that excepts an xml-file as an attachment and read that xml-file as if it where the main payload of the message.
    The messages we receive holds all the data I need in the attachment instead of the data being in the SOAP-body itself. This isnt something I can change since this is a solution provided by amadeus e-travel and I have no chance of changing how they send data to us.
    I have searched and searched the forums but havent been able to find a solution(that I understand) to how I can access the xml-file either in a mapping-routine or by simply swapping the payload with the attachment all together.
    As of now I have a webservice that is functional and receives the call from the source(amadeus e-travel) without a problem. I can also see the attachment in SXMB_MONI where it looks like a perfect xml-structure. But I have no idea on how to access the attachment so that I can use the data inside it in an abap-proxy in our ECC-system.
    As far as I have read on the forums I cannot use the payloadswapbean in the SOAP senderadapter so that option is out. I have seen mention of a java-class for reading attachements in mapping-routines but sadly I'm not much of a Java-programmer and dont have access to one either at the moment. I would need a detailed explanation in order for a java-program to be a viable solution for me.
    Is there some trick I have missed here or blog that shows how to read xml-attachments in a soap-message?
    Is there any standard Java-code I can use to read the whole xml-structure from the attachment in a mapping-routine?
    Any help would be very much appreciated!
    Thanks in advance ,
    Halvor

    Option-1:
    This might be a crude way, but you can acheive by a 2 step process...
    Step1 (Scenario-1) - Receive XML-Msg + Attachment using SOAP Sender adapter. As we have payloadwaapbean module limitation in sender adapter. Let it be a passthru to receiver SOAP adapter. (Don't do any processing in integration engine, like msg mapping or thything). In Rx SOAP adapter,use payloadswapbean to swap XML msg with Payload and resent it to 2nd integration scenario...
    Step2(Scenario-2) - As you have the Attachment as main-payload, you can continue ur normal msg processing on it.
    Option2:
    SOAP messages can also be processed using AXIS-SOAP Adapter.. you can add XI module in it Check it if it might help you...
    http://help.sap.com/saphelp_nw04/helpdata/EN/45/a4a36de28552f7e10000000a1553f7/content.htm
    Regards,
    Siva Maranani

  • XMl File into email attchements with Email package

    Hy All,
    I have to send email from XI with .xml attachments. For this scenario i have to use Mail package because of the meail adresse of the recevier is depending on the content of the .xml File.
    At the moment it send the email to right email adresse (Mapping executed) but the attachment is empty.
    Could anyone help me.
    I look at all the entries in SDN but i cannot find a clear response of my problem.
    Thank you

    Hi,
    Have a look on these links.
    1. http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
         2. http://help.sap.com/saphelp_nw2004s/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
    3. /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4360. [original link is broken] [original link is broken] [original link is broken]
    Regards
    Aashish Sinha

  • Reading attachments in PI map

    Hi,
    I have a scenario where, i have attachment (PDF) are getting attached through Proxy. I need to save these attachments to Live Link Folder.
    I have seen some posts here where they have explained the java code used in UDF to read the attachments. I have implemented that. The problem is Message mapping when i test is working fine, no errors. But the operation mapping throws the error. I have checked the "Read Attachments" Flag but still it doesn't work.
    Can any body please help me with some blog or steps that explains the steps.
    Also i read on SDN that only XML attachments can be read, but that also didn't worked for me.
    Any help will be really appreciated
    Thanks
    -Kulwant

    Hi,
    >>>I have a scenario where, i have attachment (PDF) are getting attached through Proxy. I need to save these attachments to Live Link Folder.
    why don't you use swappayload bean to put the PDF into the folder ?
    Regards,
    Michal Krawczyk

  • Send email with XMl attachment

    Hi All,
    My requrement are, to send emails to particular person "PDF" attachment and "XML" attachments.
    i did pdf by using convert spool to pef and send email to that vendor.its working .
    But i dnt know how to send email with XML attachment.Is there any function for convert spool to xml and email to that vendor.Please send me code ASAP.
    i have to sumbit this object soon.Please help me regarding this issue.
    Abhi...

    Hi,
       Try this out.
    ISR_FI_SEND_EMAIL
    ISR_FI_SEND_EMAIL_NEW_USER
    SLS_CUST_SEND_EMAIL_TOOL
    OR
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara like selc occurs 0 with header line.
    data g_objparb like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
    text(4096) type c,
    end of g_files.
    data : fold_number(12) type c,
    fold_yr(2) type c,
    fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
    user = g_user
    PREPARE_FOR_FOLDER_ACCESS = ' '
    importing
    user_data = g_user_data
    EXCEPTIONS
    USER_NOT_EXIST = 1
    PARAMETER_ERROR = 2
    X_ERROR = 3
    OTHERS = 4
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number = g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
    g_objhead,
    g_objpara,
    g_objparb,
    g_receipients,
    g_attachments,
    g_references,
    g_files.
    method1 = 'SAVE'.
    g_document-foltp = fold_type.
    g_document-folyr = fold_yr.
    g_document-folno = fold_number.
    g_document-objtp = g_user_data-object_typ.
    *g_document-OBJYR = '27'.
    *g_document-OBJNO = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes = 'sap-img.com testing by program'.
    g_document-folrg = 'O'.
    *g_document-okcode = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes = 'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = sy-uname
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    FOLMEM_DATA =
    RECEIVE_DATA =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header.
    *-- End of Program
    Also check this links as well.
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    Hope this will help.
    Regards

  • XML attachment in Document Viewer

    Hi,
    I am having problems with XML attachments with Document Viewer. I already posted a thread in the general application server forum, but thought that there might be interested people in this forum also.
    Document Viewer and XML Stylesheet
    Sorry for the possible inconvenience of the double post.
    Regards,
    Karri

    Hi Karri,
    Believe what you are looking  at is a direct translation of Open XML Documents (.DOCX) to HTML, enabling access to the information in the Open XML format from any platform with a Web browser i.e, Document viewer in this case.A plug-in for Firefox, IE7 and IE8 is available  that allows users to view Open XML documents (.DOCX) within the browser on Windows and Linux platforms.
    Trust the below link will aid you resolve this:
    http://blogs.msdn.com/interoperability/archive/2009/05/17/openxml-document-viewer-v1-released-viewing-docx-files-as-html.aspx
    Regards,
    Pradeepkumar Haragoldavar

  • Payload Swap bean not working

    Hi All,
    We are working on PI 7.11. We are trying to retrieve the attachments from the mails and convert them into files. We have enabled Keep Attachments in sender mail adapter. For swapping the payload we used payload swap bean. We referred the below blog
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    We are just trying with XML attachments.
    The problem now is the payloads are not swapping. The file contains only the body of the mail not the attachment. I dont know what I'm missing. Please advice
    Regards,
    Malini

    Hi abhishek,
    Please find below the config done in adapters
    1     localejbs/AF_Modules/PayloadSwapBean                          Local Enterprise Bean     1
    2     sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean     mail
    1     swap.keyName     Content-Description
    1     swap.keyName     Content-Disposition
    1     swap.keyValue     MailAttachment-1
    1     swap.keyValue     attachment;filename="MailAttachment-1.xml"
    Regards,
    Malini

  • How to pass text message as a body in mail adapter

    Hi ,
    I configued mail adapter and I am receiving the message as xml attachments.But I need to get message in body as text formate not an xml message.
    for exaple I am getting the message like this as attachment
      <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MT_MAIL xmlns:ns0="http://it.com/FI/I001">
    -<MAIL>
    <A>
      <FILE>PLEASE KEEP THE FILE</FILE>
      </A>
    <B>
    <FILE>PLEASE KEEP FILE</FILE>
      </B>
      </MAIL>
      </ns0:MT_MAIL>
    I required message in MAIL BODY ( NO attachment) like below
    A PLEASE KEEP THE FILE
    B PLEASE KEEP THE FILE
    LIKE THAT  I NEED MY OUTPUT IN MAIL BODY ...
    PLEASE GUID HOW TO PROCEED ....

    PayloadSwap Bean to read contents of the attachment: /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    XIPAYLOAD is protocol to be used in the mail channel...many blogs available for how to send mail as body.
    Regards,
    Abhishek.

  • My macbook pro crashed and the hard drive was replaced. How do I restore my backup pre- 9.6 iphoto library to the 9.6.1 iphoto library? They look completely different.

    My macbook pro crashed and the hard drive was replaced. How do I restore my backup pre- 9.6 iphoto library to the 9.6.1 iphoto library? They look completely different. When I look at my backed-up iphoto library folder I see lots of files and folders: ALbumData.xml, Attachments folder, etc. The 9.6.1 iphoto library doesn't appear to be a folder at all. Help!

    iPhoto 6 and earlier libraries were regular folders with the kind of files your reporting.  With the advent of iPhoto 7 the library folder was changed to a package similar to the application packages but have essentially the same files and folders inside.  There's no reason to have access to the inside of the iPhoto Library so Apple changed them to packages.
    Do you have a backup copy of the iPhoto Library from before the HD crash.  If so restore it to the Pictures folder in your Home folder.  If you previous version of iPhoto was iPhoto 7 or earlier download and run the iPhoto Library Upgrader 1.1 on your library before trying to open it with iPhoto 9.6.1.

  • Doc Literal vs. RPC

    I'm confused about the best practice for sending attached XML messages. I had always felt that RPC was fine for this and yet I was recently told that Doc Literal is the preferred method that both IBM and Microsoft recommend for sending XML attachments.
    To compound the problem it appears that SAAJ allows my RPC model to handle this task quite well. Is this all a canard or is it marketing differences between different companies ?
    Inquiring if confused minds want to know.

    The major problem in RPC is different company had different serilization method, for exampe, some company may make use of MIME , and the other is DIME. document based avoid this sort of confusion. but RPC is more easily to use.

Maybe you are looking for