Six Stars

tRestClient post from csv file

Hello

I need you help for the following job:

 

tFileInputDelimited -> tXMLMap -> tRestClient

MetaData is: email, firstname, lastname, website_id

 

I have this error on tRestClient:

Exception in component tRESTClient_1
javax.ws.rs.NotFoundException: HTTP 404 Not Found
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:504)

 

Please note atached printscreens

By the way, url destination is Magento

Can you help on this?

 

Thanks

 

4 REPLIES
Nine Stars

Re: tRestClient post from csv file

HTTP 404 Not Found... basically ... your endpoint is 'non-existing' (maybe case sensitive)
Suggestion, try it first (check your version of Magento) at/with : https://devdocs.magento.com/swagger/



Six Stars

Re: tRestClient post from csv file

Hi
Url is ok.
I have tested same content with postman tool and it works fine.
Has anyone here made rest posts with magento?
Nine Stars

Re: tRestClient post from csv file

Did you set your headers correctly, Postman set them on some defaults but in Talend you need to do it yourself if not (probably) the magento api isn't be capable of handling your REST call ?
Use the headers from your postman call.



Six Stars

Re: tRestClient post from csv file

Hello

Yes, headers are correct since we are using specific headers, and they work fine in Postman

I made several integrations and magento is the only one with this issue....