Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

SAP PI Proxy 2 Mail using JavaMapping and XIPAYLOAD

$
0
0

Hi guys, I need your help to solve this problem, I have a scenario with a Proxy Sender and Mail receiver, on proxy, the SAP service was generated a Payload Attachment with the MAIL TO value for use to send my e-mail, I would like ready this value and delete the input payload attach, I will use this value in the my XIPAYLOAD xml generated by my javammapping. My problem, I´m using SAP PI 7.31 but I can not delete the attach payload because the attach payload will be a another attach file in mail sended by the SAP PI. The source code used by me is:

 

 

    InputAttachments ipAtt = input.getInputAttachments();

 

    if (ipAtt.areAttachmentsAvailable()){

      Collection<String> colAtt = ipAtt.getAllContentIds(true);

      Iterator<String> itAtt = colAtt.iterator();

 

      String attachId = "";

      Attachment attach = null;

      while(itAtt.hasNext()){

        attachId = itAtt.next();

        attach= ipAtt.getAttachment(attachId);

 

 

        e_mail = this.byte2String(attach.getContent());

 

 

        OutputAttachments outAtt = output.getOutputAttachments();

                                                        output.getOutputAttachments().removeAttachment(attachId);

        outAtt.removeAttachment(attachId);

        }

                                                   }

 

Can you help me??

 

Tks


Viewing all articles
Browse latest Browse all 7030

Trending Articles