SOAP session cookie

One Star

SOAP session cookie

Hi all you Talend afficionados
I'm fairly new to Talend and webservices, and I need to read data from e-conomic.com through their web service. I'm using the tSOAP_1 component, and have successfully connected with a token.
But when I try to do anything else, I get an authentication error (not logged in). Apparently the webservice uses cookies to authenticate the connection.
As the documentation says: "Independently of which language/framework you are using you need to ensure it sends cookies back to the server, as we use a session cookie to ensure you are connected."
When connecting something like this:
<ConnectWithTokenResponse xmlns="http://e-conomic.com"> <ConnectWithTokenResult>mehzyl5551r22o55u3mp3e55</ConnectWithTokenResult>
</ConnectWithTokenResponse>
is returned, and i suppose the "meh...." is the cookie.
How do I "ensure it sends cookies back to the server" when calling the data retrieving parts of the API? I was hoping of a "use cookies" checkmark on the component, but something else is needed. ;-)
Any help much appreciated.

How to use the API: http://e-conomic.github.io/eco-api-sdk-ref-docs/
Moderator

Re: SOAP session cookie

Hi,
It seems you are looking for an option "Use cache to save resource" which allows you to process the file data flow without saving it on your drive in tsoap?
Did you try to download file from e-conomic.com web service?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SOAP session cookie

Hi Talend Experts,
I am new to Talend/Java.  I am implementing soap request that posts request to webservice and having trouble in implementing due to the issue. need help fix the issue.
tsoap (Login)->tsoap (Invoke web req for loading data)->tsoap (getjobsStatus in loop)->tsoap (Logout)
(Note : there other components used like tExtractsXMLFields etc and not mentioned here)
Login request (takes xml which contains username and password) is completes successfully and receives to session/LoginResults that I use in subsequent request to keep the session.
the 2nd tsoap request, which invokes webservice to load data on BIRST app. The response will come through some time not and get error "Token is invalid or token has expired". It seems that it requires cookies need to downloaded on http header in the first request and same thing need to passed back to subsequent request to keep connection alive. I was checking tsoap component but does not seems be any option.
Could you please help me providing suggestions to solve this issue.
Please let me know if any other information need to be provided.
One Star

Re: SOAP session cookie

Hi Jesper,
did you manage to solve this Problem? I Have the exact same issue?
Br
Rasmus Rødby
One Star

Re: SOAP session cookie

did anyone manage to solve this Problem? I Have the exact same issue?
Six Stars fmh
Six Stars

Re: SOAP session cookie

I have the same problem, why is the SOAP componente not just having an output field for the headers as a XML or anything else which i can process?
Moderator

Re: SOAP session cookie

Hello,

tRESTClient has the advanced properties where you can set outgoing headers.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Six Stars fmh
Six Stars

Re: SOAP session cookie

Hello xdshi,

thanks for answering. The problem is that i need to process the HTTP header's Set-Cookie Attribute which is received after i do a SOAP request with login credentials. The proposed solution by Dijke here https://community.talend.com/t5/Design-and-Development/tSOAP-access-the-response-header/m-p/133730#M... is doing that via a low-level Hack through tSystem command line -> calling curl and writing the cookie to a file which i can then process with a file component.

I was just wondering, why i can not access the basic underlying HTTP stuff with the tSOAP component, it would make much sense if a user could generally do that. I know that SOAP is slowly fading away in the API world and REST is the way to go, but there are a lot of "special" APIs out in the wild which have very specific requirements which sometimes are not the standard, so it would be nice to be able to use components like the tSOAP with more options (especially everything which is part of a response).

with best regards,

fmh