on 2021 Jul 16 5:38 PM
Hi,
I have to trigger the POST call with XML payload to Data center intergration webservice from bartender software to print labels for Orders in SAP UI5 application.
This service is added in BTP,destination and connection is successful. this service accepts only XML format data.
How to formulate XML in ui5 from data in the ui5 form screen and read the response.
I tried in string to formulate XML, but error and $.ajax().
the below tag control will be multiple based on order and repetitive.
<xSubString Name="_Field">
<Value>111</Value>
</xSubString>
XML format:
<?xml
version="1.0" encoding="UTF-8"?>
<XMLScript Version="1.0">
<level>
<Xprint>
<Form SaveAtEndOfJob="true" CloseAtEndOfJob="false">\\dummy
data print</Format>
<xSubString Name="_Field">
<Value>111</Value>
</xSubString>
<xSubString
Name="_Field">
<Value>111</Value>
</xSubString>
<Setup>
<copies>1</Copies>
<Printer>PDF</Printer>
</Setup>
</Xprint>
</level>
</XMLScript>
$.ajax({
type: "POST", url: sURL,
content: "text/xml", datatype: "text/json",
success: this.resSuccess,
error: this.resError });
I followed this blog SOAP service an tried all the possibility. but not happening the response is always error.
I have added this webservice in destination in BTP and in neo-app.json as well. But, issue is not able to invoke this from my controller method. - how to fetch this from neo-app.json?
Any leads will be much appreciated.
Thanks in advance,
Soumya
Request clarification before answering.
In your ajax call you send a GET and not a POSt with a payload.
I would suggest that you find a way to call the API using REST or OData.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Post also is possible with AJAX call as in the post ajax call for soap service. this is not OData service.
its external webservice i am invoking.
thanks,
Soumya
User | Count |
---|---|
73 | |
21 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.