on 09-10-2015 9:34 PM - last edited on 02-04-2024 3:35 AM by postmig_api_4
I need to use a debug proxy to see the REST calls between hybris and datahub.
Normally you can get java to use a proxy by specifying the parameters:
-Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888
e.g. as JAVA_TOOL_OPTIONS environment variable. In Maven it will need to be put to the configuration of the tomcat7 plug-in.
I have been trying different things that I could find via google for hybris and datahub and neither of them would use the proxy. Did anyone do that yet and knows how to do that?
Have you considered a debugging proxy tool like Fiddler or Charles and just pointing the Datahub or hybris side directly to the proxy to see the request contents? i.e.
datahub.extension.exportURL=http://localhost:{fiddlerport}/
or
datahubadapter.datahuboutbound.url=http://localhost:{fiddlerport}/datahub-webapp/v1
Also, Wireshark can capture the messages as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using Charles. But pointing datahub or hybris to the proxy directly is not bringing me very far as I can't see them talking to each other, I see only one initial post. And sure, I could use Wireshark, but generally it's not really hard to get java to go through a proxy, just in these cases there are wrappers that start the jvm and I need them to use the proxy parameters.
I've also experienced issues setting a proxy with JVM parameters in hybris. Although advice is quite good and I've used it to see requests between hybris and datahub. With Fiddler you can root incoming requests to a new port so it allows to keep communcation between hybris and the datahub AND tracking request in Fiddler. To do that in Rules->Custom Rules, edit the OnBeforeRequest method and add if (oSession.host.toLowerCase() == "localhost:8888") oSession.host = "localhost:8080";
(Fiddler is listening on port 8888 by default)
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.