on ‎2015 Mar 12 4:35 PM
Hi all,
I have created a RESTwebservice and the transaction/IWFND/GW_CLIENT allows to use an XML in the HTTP request.
My question is, how can I get the XML File where I can put the data that I need to perform the CREATE, READ, etc Requests?
When I get the metadata of my webservice (http://p2w4r5s8:8080/sap/opu/odata/sap/ZZ_TEST_GATEWAY_002_SRV/$metadata), then I get answer contained in the attachment file metadata_answer.xml
How can I use the metadata XML to use it in the CREATE, READ, DELETE, ... Requests?
The idea is to use an XML in the request and not to put all the necessary data in the URL-String:
Cheers and thanks in advance
Mar
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The request that you showed in the Gateway client ../ZZZ_ENTITY_002(IBukrs='XD45',...) is the valid GET request to obtain a single entity using OData.
You will only provide data via XML in the http body of your request if you create or update an entity, not for READ requests.
To create such an XML for a CREATE or UPDATE you can perform your read request and then press the button "use as request" above the HTTP response window and then change the content and the http method to either PUT or POST.
If you use POST don't forget to change the URL so that it only contains the entityset .../ZZZ_ENTITY_002 while a PUT would be performed on the entity itself ../ZZZ_ENTITY_002(IBukrs='XD45',...)
Best Regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.