on 02-16-2011 4:37 PM
Hi all,
I've this scenario: FlatFile1->PI7.0->HTTP
The message to be exchange is a pdf file. This file is sent successfully.
I'm using a HTTP receiver channel and I would like to send also the file name of pdf. This information is present on Dynamic Configuration.
How can I do it?
In the HTTP receiver channel there are the "_Header Fields_" parameter and the Adapter-Specific Message Attribute (_Apply HTTP Header Fields_).
Could I use them? How?
thanks
Regards
Daniele
Daniel,
Use Dynamic configuration and also enable ASMA in the communication channel of http receiver
>>In the HTTP receiver channel there are the "Header Fields" parameter and the Adapter-Specific Message Attribute (_Apply HTTP Header Fields_).
Could I use them? How?
Follow this link. This would give enough information
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
You have to do 2 things
1) Create Dynamic configuration code using UDF -
explained in the blog
2) USE ASMA fieids -- explained in the blog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Baskar,
I think the blog is very usefull.
Only one doubt:
Currently, I have only created a configuration scenario that reads the PDF file and sends it via http (without interface mapping).
Based on the blog, I should create a mapping object to use the UDF to map the filename.
This way, will the pdf be maintained in the payload?
In the FILE sender channel, I have already configured the ASMA setting the FILENAME flag, so in the Dynamic Configuration I have the file name:
<? xml version = "1.0" encoding = "UTF-8" standalone = "yes"?>
- <! - Inbound Message
->
- <SAP: DynamicConfiguration xmlns: SAP = "http://sap.com/xi/XI/Message/30" xmlns: SOAP = "http://schemas.xmlsoap.org/soap/envelope/" SOAP: mustUnderstand = "1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFTPHost"> 10.254.1.1:21 </ SAP: Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory"> /xxxxx/Invoice </ SAP: Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName"> file.pdf </ SAP: Record>
</ SAP: DynamicConfiguration>
Can I use this information directly in the HTTP receiver channel without creating mapping object?
thanks
regards
Daniele
Can I use this information directly in the HTTP receiver channel without creating mapping object?
yes you can do it. Please follow the Stefan's blog. It does as you need.
Note: getFileName method reads your source file name and setFileName method set the fileName for your taget side.
Standard adapter bean should appear after the dynamic configuration bean.
I've solved the problem following the Stefan's blog.
I've configured the Module Tab of FILE sender channel as follow:
Processing Sequence:
1. AF_Modules/DynamicConfigurationBean / Local Enterprise Bean / getFilename
2. AF_Modules/DynamicConfigurationBean / Local Enterprise Bean / setFilename
3. CallSapAdapter / Local Enterprise Bean / 0
Module Configuration:
getFilename / key.1 / write http://sap.com/xi/XI/System/File FileName
getFilename / value.1 / module.filename
setFilename / key.1 / read http://sap.com/xi/XI/System/HTTP HeaderFieldOne
setFilename / value.1 / module.filename
and the HTTP receiver channel as follow:
enable "Use Adapter-Specific message Attribute"
enable "Apply HTTP Header Fields"
thanks you very much
Daniele
> I'm using a HTTP receiver channel and I would like to send also the file name of pdf. This information is present on Dynamic Configuration.
> How can I do it?
Could you explain, how you want to send the file name to receiver?
Based on this information we can discuss a solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Could you explain, how you want to send the file name to receiver?
> Based on this information we can discuss a solution.
From the subject, I suppose she wants to send it via some HTTP Header.
@Daniele,
the blog linked above has pretty much everything you need.
Basically, you'd need an UDF in your mapping to do a conf.get() to get the FileName ASMA set by the sender file adapter and then do a conf.put() to add it to the HeaderFieldOne ASMA of the receiver HTTP Adapter.
BR,
Henrique.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.