Quantcast
Channel: Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 741

Binary files validation and routing in SAP PI 7.31

$
0
0


Business Requirement:

Vendor will submit article & price information via Email as xml attachment. PI has to poll the Email server, retrieve these mails and convert it into proxy messages.Sometimes,vendors will post messages as non xml content like pdf,excel etc.Since PI will accept xml content,invalid files will be failing in PI.In order to avoid those failures,we have to validate and route those invalid messages to business team via email.


Solution:
Valid xml can be determined based on the content type attribute in soap header.By assigning this value to context object in receiver determination condition,messages will be routed to appropriate receivers.By using this approach,invalid messages will be routed to business team for reprocessing.This avoids message failure in PI.

 

Beans used in sender mail channel:

 

1.MultipartHeaderBean:

This bean is used to add mail attachment attributes, such as content ID, content description, content type, content disposition to dynamic configuration.

 

2.DynamicConfigurationBean:

This module is used to edit the message header for adapter-specific message attributes. You can add attributes to the header or delete attributes from the header.

 

dync.png


Steps in assigning content type to context object:

1.Part[1].Content-Type- This attribute holds attachment content type.

2.This attribute value was assigned to variable "module.part[1].content-Type" and this variable holds message type.


dyn1.png


3.Now this variable has been assinged to context object "XHeaderName1".

4.This context object was used in RD condition for routing messages.

dync2.png

 

If the message is invalid xml content,it will be routed to receiver "BC_BSS".This component will use mail receiver channel for routing it to business team.By using this approach,binary files are validated and routed in SAP PI.

 


Content type attribute in payload(SOAP Header):

soap2.png

This field holds both file content and file name.

 

 

 


Viewing all articles
Browse latest Browse all 741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>