cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a debug proxy with hybris and datahub?

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

ArthurPerry
Employee
Employee
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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)