Debugging TRKD API based client app using Fidder

Best Answer
-
Fiddler is an HTTP Proxy running on port 8888 (by default) on your local PC. You can configure any application which accepts a HTTP Proxy to run through Fiddler so you can debug its traffic. WinINET-based applications (E.g. Microsoft Office, Internet Explorer, etc) should automatically use Fiddler while it's running and the "Capture Traffic" box is checked on the Fiddler File menu.
.NET framework
While launched, Fiddler sets itself as the WinINET proxy server so if an application is configured to use the default proxy, Fiddler starts catching the traffic automatically. In case of WCF web-service client application, bindings are configured such way by default so ordinarily you won't need any additional actions for Fiddler to start catching requests and responses from a TRKD API application. In other cases or if you want to setup a proxy server in the code explicitly, you can use the approach described below.
In order to start catch request / responses TRKD API add the following code to your .NET application (SSL connection supported):...
WebProxy wproxy = new WebProxy("http://localhost:8888", true);
WebRequest.DefaultWebProxy = wproxy;
ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallback;
...
static bool CertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
return true;}
It is also necessary to update the application configuration file (web.config or app.config) to use Fiddler as proxy server.
JAVATraffic in Java based application can be redirected to Fiddler with the following way:
jre -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 MyApp
Or in code:
• for http traffic:
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8888");
• for https traffic:
System.setProperty("https.proxySet", "true");
System.setProperty("https.proxyHost", "localhost");System.setProperty("https.proxyPort", "8888");
Note: when capturing HTTPS traffic using Fiddler you may face with the following exception:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetIn this case you need to import Fiddler certificate into local keystore.
To get Fiddler certificate please go to Fiddler Options -> HTTPS and click Export Root Certificate to Desktop button. Then use that same mechanism of adding of the certificate to keystore as described in the article How to import TRKD certificate into local Java keystore?
PHPYou can set up the Fiddler proxy in PHP code with PHP/CURL library. Add the following code to application in order to pass traffic through Fiddler:
curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');Another way is to set the Fiddler proxy for a PHP SOAP client individually:
$client = new SoapClient($wsdl_url, array('soap_version' => SOAP_1_2, "proxy_host" => '127.0.0.1', "proxy_port" => 8888));
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛