Hi,
i have to fetch json response from url using cookie concept.
I have tried with using only trestclient step there is no cookie option is available and later on i tried with tfilefetch component to use the cookie concept it is giving 200 as a response but i am not able to get any response from the tfilefetch?
1) I haved logged in using tfilefetch component using tfilefetch with cookie concept i,e giving 200 as response code.
2) I am trying to get json response from the one more url using tfilefetch component it is giving as 200 response code but in that file only html content is generated instead of response code using existing cookies which i have used it in step 1.
Output log from two tfilefetch components is
Status Line: HTTP/1.1 200 OK
*** Response Header ***
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en-US
Content-Length: 3072
Vary: Accept-Encoding
Date: Thu, 09 Jan 2014 13:34:02 GMT
Status Line: HTTP/1.1 200 OK
*** Response Header ***
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en-US
Content-Length: 3072
Vary: Accept-Encoding
Date: Thu, 09 Jan 2014 13:34:07 GMT
How can we do it ? Is there any work around to do this.. Please give ur suggestions.
Hi
tFileFetch is used to download a file with http or ftp procotol to local machine, this component don't have a schema and it do not returns a response, this component is always used alone, it has no output. If you want to call a rest web service, you should use the tRestClient or tRest component.
Shong
If i am using trestclient i cant use the cookie concept.. Basically i have to use cookie concept for the login once that is done i wanted to use that cookie variable to another job So how can i use that using trest client or trest ?
There is no 'save or read cookie' option on tRestClient component, so you can't use the rest component to call the web service in this case. I would suggest you to report a feature issue on our bugtracker to inform our developers, they will investigate this issue further.
Shong
Hi,
I need to send users data to intercom by using intercom api.
I designed a job having a flow of tFileInputJSON ->tXMLMap -> tRestClient -> tLogRow.
I got response code 200 ok but users are not sending at intercom.
My output is -
Starting job Intermediate at 09:57 21/10/2015.
connecting to socket on port 3389
connected
: org.apache.cxf.interceptor.LoggingOutInterceptor - Outbound Message
---------------------------
ID: 1
Address:
Http-Method: POST
Content-Type: application/json
Headers: {Content-Type=, Accept=, Authorization=}
Payload: {"items":{"user_id":"swati1036","email":"w@serenity.io","name":"Serenity Washburne","signed_up_at":1392731325,"last_seen_ip":"1.2.3.6","last_seen_user_agent":"Mozilla\/5.0(Macintosh; Intel Mac OS X 10.9"}}
--------------------------------------
: org.apache.cxf.interceptor.LoggingInInterceptor - Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: application/json; charset=utf-8
Headers: {Cache-Control=, connection=, Content-Length=, content-type=, Date=, ETag=, Server=, Status=, Strict-Transport-Security=, Vary=, X-Content-Type-Options=, X-Frame-Options=, X-Intercom-Version=, X-Intercomrade=, X-RateLimit-Limit=, X-RateLimit-Remaining=, X-RateLimit-Reset=, X-Request-Id=, X-Runtime=, X-XSS-Protection=}
Payload: {"app_id":"p4lt44zd","id":"job_f220bbc4_77ea_11e5_9d9a_25b12484386c","created_at":1445428667,"completed_at":null,"closing_at":1445429567,"updated_at":1445428667,"name":"api_bulk_job","state":"running","links":{"error":"","self":""}}
--------------------------------------
statusCode: 200|body: |string: {"app_id":"p4lt44zd","id":"job_f220bbc4_77ea_11e5_9d9a_25b12484386c","created_at":1445428667,"completed_at":null,"closing_at":1445429567,"updated_at":1445428667,"name":"api_bulk_job","state":"running","links":{"error":"","self":""}}
disconnected
Job Intermediate ended at 09:57 21/10/2015.