Skip to main content
Question

Sending XML via REST


Forum|alt.badge.img+1

Hello all, 

 

is it possible(if yes how?) to send XML data via REST Call (Patch, PUT)?

I export profile data which is in our case a xml file → edit it → and now i try to upload it (import) but get stuck by sending the xml

 

Best regards

Erik

5 replies

hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 326 replies
  • May 8, 2025

Hi ​@Erik Hofmann,

You can send like below. 

 

1PROCEDURE Send_Personel_Info_To_Next4Biz(attr_ IN VARCHAR2) IS
2 xml_ CLOB;
3BEGIN
4 xml_ := xml_ || '<Fields>';
5 xml_ := xml_ || '<nmr_tckn>' || client_sys.get_item_value('TCKN', attr_) || '</nmr_tckn>';
6 xml_ := xml_ || '<nmr_sicil_no>' || client_sys.get_item_value('SICIL_NO', attr_) || '</nmr_sicil_no>';
7 IF client_sys.get_item_value('HAKEDILEN_IZIN', attr_) IS NOT NULL THEN
8 xml_ := xml_ || '<txt_hakedilenizin>' || client_sys.get_item_value('HAKEDILEN_IZIN', attr_) || '</txt_hakedilenizin>';
9 END IF;
10 IF client_sys.get_item_value('KULLANILAN_IZIN', attr_) IS NOT NULL THEN
11 xml_ := xml_ || '<txt_kullanilanizin>' || client_sys.get_item_value('KULLANILAN_IZIN', attr_) || '</txt_kullanilanizin>';
12 END IF;
13 IF client_sys.get_item_value('KALAN_IZIN', attr_) IS NOT NULL THEN
14 xml_ := xml_ || '<txt_kalanizin>' || client_sys.get_item_value('KALAN_IZIN', attr_) || '</txt_kalanizin>';
15 END IF;
16 xml_ := xml_ || '</Fields>';
17 ifsapp.plsql_rest_sender_api.call_rest_endpoint(rest_service_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
18 xml_ => xml_,
19 key_ref_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
20 fnd_user_ => fnd_session_api.get_fnd_user(),
21 callback_func_ => 'xxxxxxxxxx_api.next4biz_callback',
22 http_method_ => 'POST',
23 http_req_headers_ => 'Content-Type: application/xml',
24 sender_ => 'IFS',
25 subject_ => 'Next4Biz Personel Aktarma İsteği');
26
27END Send_Personel_Info_To_Next4Biz;

 


Forum|alt.badge.img+1
  • Author
  • Do Gooder (Customer)
  • 3 replies
  • May 8, 2025
hhy38 wrote:

Hi ​@Erik Hofmann,

You can send like below. 

 

1PROCEDURE Send_Personel_Info_To_Next4Biz(attr_ IN VARCHAR2) IS
2 xml_ CLOB;
3BEGIN
4 xml_ := xml_ || '<Fields>';
5 xml_ := xml_ || '<nmr_tckn>' || client_sys.get_item_value('TCKN', attr_) || '</nmr_tckn>';
6 xml_ := xml_ || '<nmr_sicil_no>' || client_sys.get_item_value('SICIL_NO', attr_) || '</nmr_sicil_no>';
7 IF client_sys.get_item_value('HAKEDILEN_IZIN', attr_) IS NOT NULL THEN
8 xml_ := xml_ || '<txt_hakedilenizin>' || client_sys.get_item_value('HAKEDILEN_IZIN', attr_) || '</txt_hakedilenizin>';
9 END IF;
10 IF client_sys.get_item_value('KULLANILAN_IZIN', attr_) IS NOT NULL THEN
11 xml_ := xml_ || '<txt_kullanilanizin>' || client_sys.get_item_value('KULLANILAN_IZIN', attr_) || '</txt_kullanilanizin>';
12 END IF;
13 IF client_sys.get_item_value('KALAN_IZIN', attr_) IS NOT NULL THEN
14 xml_ := xml_ || '<txt_kalanizin>' || client_sys.get_item_value('KALAN_IZIN', attr_) || '</txt_kalanizin>';
15 END IF;
16 xml_ := xml_ || '</Fields>';
17 ifsapp.plsql_rest_sender_api.call_rest_endpoint(rest_service_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
18 xml_ => xml_,
19 key_ref_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
20 fnd_user_ => fnd_session_api.get_fnd_user(),
21 callback_func_ => 'xxxxxxxxxx_api.next4biz_callback',
22 http_method_ => 'POST',
23 http_req_headers_ => 'Content-Type: application/xml',
24 sender_ => 'IFS',
25 subject_ => 'Next4Biz Personel Aktarma İsteği');
26
27END Send_Personel_Info_To_Next4Biz;

 

Thank you for the fast reply. 

 

Is it also possible to do this via REST/API in an airflow job?

 

Best Regards

Erik


hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 326 replies
  • May 8, 2025

You are welcome. What is the airflow job? I have never heard about it :)


Forum|alt.badge.img+1
  • Author
  • Do Gooder (Customer)
  • 3 replies
  • May 8, 2025

It´s a bit complicated. So I get all the stuff I want. A handfull of profile xmls (keyuser) sort them and want ro roll them out to all other users (sorted). The only problem is I dont get where or how to send these xmls back to IFS. (From a local Array)


Forum|alt.badge.img+1
  • Author
  • Do Gooder (Customer)
  • 3 replies
  • May 8, 2025
Erik Hofmann wrote:

It´s a bit complicated. So I get all the stuff I want. A handfull of profile xmls (keyuser) sort them and want ro roll them out to all other users (sorted). The only problem is I dont get where or how to send these xmls back to IFS. (From a local Array)

would also be possible as a file


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings