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)
  • 325 replies
  • May 8, 2025

Hi ​@Erik Hofmann,

You can send like below. 

 

PROCEDURE Send_Personel_Info_To_Next4Biz(attr_ IN VARCHAR2) IS
	xml_ CLOB;
BEGIN
	xml_ := xml_ || '<Fields>';
	xml_ := xml_ || '<nmr_tckn>' || client_sys.get_item_value('TCKN', attr_) || '</nmr_tckn>';
	xml_ := xml_ || '<nmr_sicil_no>' || client_sys.get_item_value('SICIL_NO', attr_) || '</nmr_sicil_no>';
	IF client_sys.get_item_value('HAKEDILEN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_hakedilenizin>' || client_sys.get_item_value('HAKEDILEN_IZIN', attr_) || '</txt_hakedilenizin>';
	END IF;
	IF client_sys.get_item_value('KULLANILAN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_kullanilanizin>' || client_sys.get_item_value('KULLANILAN_IZIN', attr_) || '</txt_kullanilanizin>';
	END IF;
	IF client_sys.get_item_value('KALAN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_kalanizin>' || client_sys.get_item_value('KALAN_IZIN', attr_) || '</txt_kalanizin>';
	END IF;
	xml_ := xml_ || '</Fields>';
    ifsapp.plsql_rest_sender_api.call_rest_endpoint(rest_service_ => 'NEXT4BIZ_PERSONEL_AKTARMA', 
                                                    xml_ => xml_, 
                                                    key_ref_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
                                                    fnd_user_ => fnd_session_api.get_fnd_user(), 
                                                    callback_func_ => 'xxxxxxxxxx_api.next4biz_callback', 
                                                    http_method_ => 'POST',
                                                    http_req_headers_ => 'Content-Type: application/xml', 
                                                    sender_ => 'IFS',
                                                    subject_ => 'Next4Biz Personel Aktarma İsteği');

END 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. 

 

PROCEDURE Send_Personel_Info_To_Next4Biz(attr_ IN VARCHAR2) IS
	xml_ CLOB;
BEGIN
	xml_ := xml_ || '<Fields>';
	xml_ := xml_ || '<nmr_tckn>' || client_sys.get_item_value('TCKN', attr_) || '</nmr_tckn>';
	xml_ := xml_ || '<nmr_sicil_no>' || client_sys.get_item_value('SICIL_NO', attr_) || '</nmr_sicil_no>';
	IF client_sys.get_item_value('HAKEDILEN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_hakedilenizin>' || client_sys.get_item_value('HAKEDILEN_IZIN', attr_) || '</txt_hakedilenizin>';
	END IF;
	IF client_sys.get_item_value('KULLANILAN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_kullanilanizin>' || client_sys.get_item_value('KULLANILAN_IZIN', attr_) || '</txt_kullanilanizin>';
	END IF;
	IF client_sys.get_item_value('KALAN_IZIN', attr_) IS NOT NULL THEN
		xml_ := xml_ || '<txt_kalanizin>' || client_sys.get_item_value('KALAN_IZIN', attr_) || '</txt_kalanizin>';
	END IF;
	xml_ := xml_ || '</Fields>';
    ifsapp.plsql_rest_sender_api.call_rest_endpoint(rest_service_ => 'NEXT4BIZ_PERSONEL_AKTARMA', 
                                                    xml_ => xml_, 
                                                    key_ref_ => 'NEXT4BIZ_PERSONEL_AKTARMA',
                                                    fnd_user_ => fnd_session_api.get_fnd_user(), 
                                                    callback_func_ => 'xxxxxxxxxx_api.next4biz_callback', 
                                                    http_method_ => 'POST',
                                                    http_req_headers_ => 'Content-Type: application/xml', 
                                                    sender_ => 'IFS',
                                                    subject_ => 'Next4Biz Personel Aktarma İsteği');

END 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)
  • 325 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