on 01-24-2016 10:21 AM
Dear Experts,
I have developed an OData service in my Gateway system. I have created a function import in the service.
I have a requirement to pass xml as data to import parameter of this function import.
Below is my xml data which i am passing to import parameter i_xml_value
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DATA SEMANTIC_OBJECT="Recommendation-maintainScenario&/Scenarios/SAP_CROSS_SELL_WEB_CHECKOUT " COMPLETE_URL="">
</DATA>
</asx:values>
</asx:abap>
Below is the complete call
/sap/opu/odata/sap/MyServiceName/MyFunctionImportName?I_XML_VALUE='
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><DATA SEMANTIC_OBJECT="Recommendation-maintainScenario&/Scenarios/SAP_CROSS_SELL_WEB_CHECKOUT " COMPLETE_URL=""></DATA></asx:values></asx:abap>
'
I am getting repose as "Malformed URI literal syntax" (please find attachment), Could you please guide me about how can i send xml as input value to my service function import.
Help is much appreciated.
Thanks,
Anurag.
Hi,
Is '&' intentional in your XML ?
/sap/opu/odata/sap/MyServiceName/MyFunctionImportName?I_XML_VALUE='
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><DATA SEMANTIC_OBJECT="Recommendation-maintainScenario&/Scenarios/SAP_CROSS_SELL_WEB_CHECKOUT " COMPLETE_URL=""></DATA></asx:values></asx:abap>
'
Remove it if not needed.
Character '&' causes the problem in this case.
However I would be interested to know what is the use case, why do you need to pass XML as parameter value ?
Regards
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anurag,
Looks like problem is with the string you are sending as input.
What is the operation? GET / POST ?
However,
Did you try to send a simple string as input first ? say for example as below. Is it working ?
/sap/opu/odata/sap/MyServiceName/MyFunctionImportName?I_XML_VALUE='Anurag Bajaj'
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.