cancel
Showing results for 
Search instead for 
Did you mean: 

File to File (proxy) scenario, need to get filename that will move to send thru proxy interface

Former Member
0 Kudos

hi

i have a request about a File to File and proxy Scenario, in the proxy need to send the name of the file, extension and date-time of the file move in the File to file, inside(message mapping) need to get some file property's,  i need to create the ESB objects,

my doubt is, do i need to do it in java mapping or is it way to do it with UDF?

i have this code for UDF, it works with xml files, but dont work with image files(*.tiff,*.jpeg) and PDFs files

i keep getting the error message "Content is not allowed"

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Request Message Mapping

  -->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Category>Application</SAP:Category>

  <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

  <SAP:P1>com/sap/xi/tf/_MM_ScanFilePL_</SAP:P1>

  <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

  <SAP:P3>Content is not allowed in prolog.</SAP:P3>

  <SAP:P4 />

  <SAP:AdditionalText />

  <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_ScanFilePL_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Content is not allowed in prolog.</SAP:Stack>

  <SAP:Retry>M</SAP:Retry>

  </SAP:Error>

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can do both java mapping or UDF.  The point is you need to set content type different for image files. You can also do base64 encoding first and follow this link for sample

http://stackoverflow.com/questions/1312832/java-image-encoding-in-xml

Former Member
0 Kudos

Hi Baskar, thanks for the help,

but im still lost,  with UDF, do i need to do receive in my message mapping with this

Source(xsd:base64Binary) -> UDF-ENCODE -> UDF-DECODE -> Target(xsd:base64Binary)

the encode and decode is from the page you send me.

thanks for the help Baskar

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You just need to do encode and send it to target system. On the target system they might have to use the same decoding or similar logic to extract the original image

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Can you paste ur code here?

I had a similar scenario where i need to send the file name which is transferred to FTP server (file to file scenario) to Proxy (SAP system) and IMO, using java mapping is more advisable.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit

i been following this examples and got this code, from here.

http://saptechnical.com/Tips/XI/ASMA/Index.htm

http://scn.sap.com/people/ryan.crosby/blog/2009/02/27/file-xi-proxy-scenario--moving-binary-files-wi...

http://scn.sap.com/message/13562783.

i will start with the java mapping just waiting for the basis team to give me the jar files that i need.

now im just reading Baskar link, if i get it to work i will tell you, either way if you got more information please post it, so we could help each other.

thanks

Regards,

Erick