Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rest Service - PUT - xml input ?

Bonjour, 

using REST service from a provider, I am able to "call" an endpoint in "GET" mode ... but I have difficulties to use the "PUT" mode.

 

Do you have some exemples/template  to share ?  

how to provide xml message to tRESTClient ? 

 

thank you for your support.

 

Labels (3)
4 Replies
Anonymous
Not applicable
Author

Bonjour Manohar and thank you for your help.
I followed the link you provided. It is still unclear what is the link between the xml structure you have in output of the txmlmap and the relative path of the tRestclient ...
on my side, I received a xsd and xml file exemple from the provider ...
any idea ?

xml exemple

<?xml version="1.0" encoding="UTF-8"?>
<briefingattachment xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MyProvider.xsd">
<name>briefingRulesValid.xml</name>
<attachmentType>ADDITIONAL_DOCUMENT</attachmentType>
<contentType>application/pdf</contentType>
<validFrom>2014-10-01</validFrom>
<validTo>2014-11-26</validTo>
<revision>1</revision>
<rules>
<acftRegExcl>OAVA</acftRegExcl>
<depAirpCodeExcl>EPWA</depAirpCodeExcl>
<arrAirpCodeIncl>EPHA</arrAirpCodeIncl>
<arrAirpCodeIncl>EP*</arrAirpCodeIncl>
</rules>
</briefingattachment>
Anonymous
Not applicable
Author

I wish to mention that I am using Talend Studio ETL ... and in the provider documentation, a major remark is concerning the BODY part ...
GET : Body : Empty
PUT : Body : Full Ressource

for the get that works, I pass some input parameters in the trestclient ...
Anonymous
Not applicable
Author

Answer for the API/Service provider :
"Our PUT Leg Attachment API call is a Multipart call. This means that the request needs to have 2 attachments: one referring back to the PDF/JPEG/PNG file (called ‘file’), one referring back to the metadata file in XML (called ‘data’). This also means that the parameters I provided to you are not to be included as query parameters, but should be included in the XML of the metadata and attached to the Multipart call."

???
I do not have enought expertise in REST nor in Talend to fully understand ...