on 08-28-2018 6:08 AM
Hi, I am trying to upsert the attachment in success factors for one of the field(Custom Field) in OData API. Actually, i got the PDF file from the third party response and i have to upsert that PDF File in JobApplication API. I didn't see that field from the fields list in the API(Job Application) while configuring the adapter. Do i need to attach through Attachment API? If yes, what is the procedure and what is the association between Attachment API and Job Application API?
Hi, I have resolved this issue and written the blog on this. Following is the URL for the blog:
https://blogs.sap.com/2018/09/16/how-to-upsert-the-attachments-into-successfactors-using-sap-cpi/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Imran,
Please read the API documentation about the format in which data of attachment needs to be passed.
As per my understanding you need to convert the attachment data to Base64 Encoded and pass that value to file content.The xml which you are passing is incorrect.Please generate XML as per the schema generated by model operation ( with above sublevel 1 selected ).
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have done the Base 64 for PDF content. Then also, no luck. That XML is source structure(Custom Structure) in map. The target side i have taken the XML Schema generated for Job Application.
Map ScreenShot:
I am getting the following error:
com.sap.gateway.core.ip.component.odata.exception.OsciException: HTTP Request failed with error : executeUtil : failed with error. Message = The target server failed to respond
Final Message i am posting:
Hi Sri,
Thanks for giving the answer. I have created the target structure and i am facing issues while creating the source structure. I am getting the following error:
com.sap.xi.mapping.camel.XiMappingException: com.sap.aii.utilxi.misc.api.BaseRuntimeException: The content of elements must consist of well-formed character data or markup., cause: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 2; The content of elements must consist of well-formed character data or markup.
Iflow Screenshot:
What i did was, i have created the source structure in Content Modifier 3. I have read the pdf body in property as ${in.body} and creating the body in Content modifier 3 as below.
<?xml version="1.0" encoding="UTF-8"?>
<Attachment>
<Attachment>
<fileName>Test_Result.pdf</fileName>
<fileExtension>pdf</fileExtension>
<ApplicationID>192025</ApplicationID>
<fileContent>${property.PDF_File}</fileContent>
</Attachment>
</Attachment>
Map Screenshot:
PDF Output From HTTP Adapter looks like below:
Note: While i am sending this output file to SFTP, i can see and read the original PDF File.
So, please suggest me on how to read the output PDF file(From HTTP Adapter) and create the source strcuture to map the JobApplication API Structure. Thank you.
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.
User | Count |
---|---|
84 | |
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.