on 06-19-2007 12:33 PM
Hi all,
I have a scenario in which I am sending a binary file from one folder to another using a file sender and file receiver adapter.
But, I have another file receiver to this message which expects the filename of the above binary file in the form of an XML file.
I want to know is this possible to receive an adapter specific value in the form of XML when we havent sent any xml from source side?
Please reply.
Sumit
Hi all,
Thanks for showing the interest.
The Structure of my source message is:
Message -:
Binary File - of type 64basebinary 1:1
Filename - of type String 0:1 (as it will be empty initially)
Target Message 1 -:
Binary File - of type 64basebinary 1:1
Target Message 2 -:
FileName - of type String 1:1
I have two mappings
Mapping 1-:
Source - Binary to target 1 Binary File
Mapping 2-:
Source-FileName to Tarfet 2 Filename.
When i activate the chages the Binary file reaches the destination.
But, I am not getting any target 2 message.
All channels are working fine.
Please Help
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sumit,
I configured the scenario ,as per your requirement. Kindly have a look at the below URL and reply back, if you have any issues on that.
http://sapient.xi.googlepages.com/xi-excellentintegration
Best regards,
raj.
Good one Raj,just a small question,is it possible to do this in a bypass manner and check the adapter specific message attributes.
i can give filename as . and use ASMA,won't that make sure that the any files is picked up and delivered with the same name as sender?
keep up the good work
thanx
Ahmad
One question.
What do you want to have in the METADATA.XML file?
1. Any valid XML data (but what is the use of this?) - If so, just create a mapping with all constants filling it and pass it to receiver.
2. Some XML based on input .tiff file - If so, then use a Java mapping and populate the target msg and pass it to receiver.
Regards,
Jai Shankar
Raj,
I am getting the following error when I look into the SXMB_MONI for XML receiver.
<b><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_Invoice_to_Name_</SAP:P1>
<SAP:P2>java.lang.NullPointerException</SAP:P2>
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Invoice_to_Name_ a java.lang.NullPointerException was thrown:</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error></b></b>
Hi Raj,
I just want to enquire one thing. We have mentioned
file name = *
But if I use FTP it doesnt work.
Is there a way to make . work with FTP.
Please reply.
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raj,
Thanks a lot man.
There was some internal problem in my scenario.
I have changed the ponts to 10.
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
I am sending the .tiff file. Paste???
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sumit,
I'm really sorry, if I misunderstoo ur scenario. Basically u are receiving Tiff(Image file) do u want the file to convert into XML ? Can u please be little bit more specific.
<b> just want the name of the binary file sent to be passed through the second(non-binary) file receiver as a XML file</b>
The above line is little bit confusing.
Best regards,
raj.
Raj,
Thanks for taking interest!
I have two file receiver aadapters.
One is receiving the plain binary file.
Other is also a file receiver adapter which is configured to receive a text file(
File Name scheme: xi_meta.xml
This file is supposed to contain the Name of the "Binary File" as a field.
If the scenario is still not clear. I am ready to explain again :).
Sumit
you need to write a UDF and use mapping based message split.
Here is the link for mapping based message split:
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
Here is the code for UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String FName = conf.get(key);
return FName;
Hope this helps,
Regards,
Ravi
Sumit,
I got ur sceario.
I'm sure u have designed the data type for the target file am I right.
Let say it looks like
DT_Filename
File 1..1
Filename 1..1
U might have created the message type for the same.
Please create the message mapping with the source and target as same(above structure).
Now create simple UDF with no input.
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION );
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File","FileName");
String name = conf.get(key);
return ""name"";
UDF mapping
UDF --> Filename[Target node, as per my data type designed above]
Hope it helps!!!
If not kindly revert back.
Best regards,
raj.
Hi All,
Thanks for your replies.
I guess i have to explain the scenario again .
I do not want the XML file at the receiver to be of same name.
I just want the name of the binary file sent to be passed through the second(non-binary) file receiver as a XML file.
I have used the DynamicConfiguration in UDF but I am not getting any XML as output in this scenario.
Please help me.
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
you just need to mark the following checkboxes
Adapter Specific message attributes (SetAdapter Specific message attributes )
and
File Name
in both sender and receiver file adapter.
So, it gets the file name and creates the file with the same name.
no UDF reqd:)
Regards
Pushkar
Message was edited by:
Pushkar Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
yes,you can do it with Dynamic Configuration in mapping.Using this in UDF you can map your File Name to some field and then use it at receiver side communication channel as a variable.
Dont forget to give reward points.****
Thanks & Regards,
Akshay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sumit,
Please correct me if I uderstood your scenario wrong. In source you have some file which is not XML , but in the receiver side you want the file with XML with same file name as source. Am I right? If not can u please clarify the scenario,please.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.