Skip to Content

Help with HTTP CLIENT JSON Output adapter configuration for SAP HANA Smart data streaming

Hi

I created a SDS project using HTTP CLIENT JSON OUTPUT ADAPTER so that i can post the data coming in to XS Odata service, But somehow this is not working.

Upon checking the logs i found below errors related to SSL and custom header protection. Please let me know where i am going wrong.

sslstream Socket error: Couldn’t read from SSL [Windows server] 08-23-2017 07:18:45.369 WARN [pool-8-thread-6] (HttpThread$CSRFTokenFetcher.fetchCSRFToken) Error code:402706, Severity : 3 (Error)Error message:Statuscode of http://<host>:<port>/xsodata/XS_OData/Services/xsodata.xsodata/USER to get custom header protection token is 404.Error description:Statuscode of http://<host>:<port>/xsodata/XS_OData/Services/xsodata.xsodata/USER to get custom header protection token is 404.08-23-2017 07:18:45.369 ERROR [pool-8-thread-6] (HttpThread.execute) Error code:402705, Severity : 3 (Error)Error message:Fail to fetch custom header protection token.Error description:Fail to fetch custom header protection token.

CCL for the project is as below

CREATE INPUT STREAM NEWSTREAM SCHEMA

(CREATE INPUT STREAM NEWSTREAM SCHEMA ( MANDT integer , NODE integer , USERNAME string , DATECHANGED seconddate , TIMECHANGED time )

PRIMARY KEY ( NODE , MANDT ); ATTACH OUTPUT ADAPTER HTTP_Client_JSON_Output_Adapter1 TYPE toolkit_http_json_output

TO NEWSTREAMPROPERTIES bodyCharset = 'UTF-8' ,

retryNumber = 1 ,

requestUrl = 'http://<host>:<port>/xsodata/XS_OData/Services/xsodata.xsodata/USER' , requestUsername = 'username' , requestPassword = 'password' ,

jsonColsMappingList = 'MANDT,NODE,USERNAME,DATECHANGED,TIMECHANGED' , OutputBase = TRUE ,

proxyHost = '<host>' ,

proxyPort = <port> ,

serverType = 'SAP' ,

csrfTokenFetchUrl = 'http://<host>:<port>/xsodata/XS_OData/Services/xsodata.xsodata/USER' ;

Thanks,

Abu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 29, 2017 at 07:07 PM

    The 404 error you are getting is a "Page not found" HTTP error and indicates the URL you specified for the "csrfTokenFetchUrl" parameter doesn't exist. From the log output, the URL you specified was "http://<host>:<port>/xsodata/XS_OData/Services/xsodata.xsodata/USER"

    A few questions:

    1) Did you specify the <host> and <port> values in your application?

    - I understand if you are blanking them out here to hide the actual values

    2) Are you able to access that URL from a web browser?

    3) Are you able to get the sample application in this blog post working?

    Smart Data Streaming: Connecting to XSA Applications with New Adapters in 2.0

    4) One difference I notice between your URL and the URL in the sample in the above blog post is that the same specifies a URL that includes ".../basic.xsodata/..." whereas your URL specifies ".../xsodata.xsodata/..." At this point I'm entirely sure that this is relevant, but I believe it might be.

    Add comment
    10|10000 characters needed characters exceeded