on 12-03-2014 1:22 PM
Hello!
I have still some Problems with my simple Scenario. It uses a file Sender Adapter to read a .pdf file from disk, and sends it to an email address by mail Receiver Adapter! To achieve that the attachment in the mail has the same Name as the file read by the file Sender, i created a UDF with some Java coding. Now, there is a problem: There is some error message that says "Content is not allowed in Prolog" and I dont't know what is meant by this?
BR, EF
check the below message thread for .PDF file Scenario :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using any Message Mapping ?
Sender is .Pdf file, the error shows that System is not able to parse the file data in XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
The only mapping that takes place is a dummy mapping, only to get the process running ... what i want is simple, i want to read a pdf file by file Sender and send it to a mail Receiver ... i do not Need any mapping if you mean that! I created it just for the purpose of starting the process ...
As already mentioned by Sandeed, i believe it's bacuase you are trying to process PDF file.
GO for the java mapping and set the attachment name in it.
Refer to below thread for the java code
Hi!
Just for my own curiosity, ... is there absolutely no field, which could be read from the Sender File Adapter? I cannot believe, that i extra have to write a complete Java Mapping, just to get the filename which has definitely been provided to the Adapter when it read the file from disk ...?
BR, EF
Hi!
I will check your solution, but what I ask myself is, why does this solution http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/11/10/xi-the-same-filename-from-a-sende... not work for me? What I get here, is a Content not allowed in Prolog error .. AND i have used my Integrated Configuration without SWCVs ...
BR, EF
Hi Elmar,
According with Shabarish suggestion conf.get() method works only in runtime period. Have you tried to use conf.put(key, myFileName); instruction?. Check Shabarish blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/03/26/dynamic-configuration-vs-variable...
Regards.
Hi Elmar
Just adding my two cents here.
The blog you referred to is describing a File sender adapter to File receiver adapter scenario. Your scenario on the other hand uses a Mail receiver adapter. Each adapter behaves differently and has different functionality that you cannot expect an apple-to-apple comparison.
For your case, the "Content not allowed in Prolog" is actually caused by two issues. Both are due to parsing of non-XML content.
If you look carefully, the first time you encountered the error, it is caused by a RoutingException (in screenshot above.) This is because of the original SWCV setting in your ICO will not work on a non-XML file, a binary PDF for your case. Removing the SWCV from your ICO only resolved the RoutingException.
Once the first error is resolved, you hit a mapping Runtime Exception which you listed in the blog below.
XI: The same filename from a sender to a receiver file adapter - SP14
As already mentioned by others, this second error is caused by executing a graphical message mapping on a non-XML content. Graphical message mapping can only handle XML content, therefore you cannot even have a simple 1-1 mapping with UDF and expect it to work. Your source binary content does not (and will never) match at all source Data type. This needs to be handled as a Java mapping - whether you create it in an external Java IDE or use this trick to embed it directly in ESR.
Rgds
Eng Swee
Hello!
Here my experience during the last several hours ...
I built an ICO and only defined a File Sender CC and a Mail Receiver CC. I created NO mapping and only 2 Dummy Service Interfaces. Just to make the process work! When I tested it, i got a mail with the wrong Name, this is OK. When i added a Message Mapping, and following an Operation Mapping, then the "Content not allowed in Prolog" error came up! When i did no graphical mapping between the two dummy SIs, then i got a mail with a 209Byte attachment in XML. So, again I tried to map one single field ... this time, the "Content not allowed" error was here again. I have NO SWCVs defined in my ICO, so this cannot be the reason ... What else could be wrong? There is no UDF at the Moment or anything else, just an empty mapping object, what I will Need in the future to Change the filename ...
BR, EF
Hi Elmar
As have been mentioned, as long as you use Message Mapping (or you can call it Graphical Mapping) this error with occur - it does not matter whether it has a UDF or not.
Because you are dealing with binary file, you need Java mapping. Are you familiar with creating Java mappings? You need to create this by writing Java codes in an external IDE - Eclipse or NWDS, and then compile it into a JAR archive file and import it into ESR as an imported archive. Use the imported archive in your Operation mapping (instead of message mapping.)
I suggest that you search in SCN for some guide on how to create Java mapping - there are plenty of wiki and blogs around this topic.
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.