I am unable to capture local HTTP traffic when my Java client makes a SOAP request to my local Tomcat instance.
My current configuration is
Tomcat instance - run on localhost:8080
Local Java client - run from Windows cmd line
Fiddler - run on localhost:8888
I used Axis2 wsdl2java to create my client SOAP stub, and used my machines IP address when specifying the WSDL (hosted on Tomcat)
wsdl2java -uri http://192.168.0.5:8080/axis2/services/Version?wsdl -p sample.axisversion -d adb -s
So, the generated code has lines like this throughout:
public VersionStub(org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault {
this(configurationContext,"http://192.168.0.5:8080/axis2/services/Version.VersionHttpSoap12Endpoint/" );
}
My client app uses the generated stub and I set the Java proxy to Fiddler using the following code (which gets called before the SOAP stub is actually used):
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "localhost");
System.getProperties().put("proxyPort", "8888");
...but still I don't see any request or response traffic in Fiddler. What's missing?
Instead of localhost, try to use ipv4.fiddler, which makes sure your localhost traffic goes through fiddler. See also: http://www.fiddler2.com/Fiddler/Help/hookup.asp#Q-LocalTraffic
Related
Strange thing - I have host API on localhost it works proper (via browser). It's a part of bigger project.
I use Postman for testing endpoints, and when I make request via localhost or 127:
-https://localhost:7257/esp32
-https://127.0.0.1:7257/esp32
Postman gives me Status 200 OK and fine data from API, but if I send request via my IP adress:
-https://192.168.8.xxx:7257/esp32 then I see error like this: Error: connect ECONNREFUSED 192.168.8.xxx:7257
What does it cause? Is it correct or no?
Ok, I need to host my application on the outside.
I started a very simple ASP.net web api app. on port 8080.
I used ngrok as a tunneling tool to get a forwarding ip address:
Using postman I posted to the local server with the following request
http://ccf7e40b.ngrok.io/Bot/messages
and get the error: "HTTP Error 400. The request hostname is invalid.". However replacing the forwarding url with localhost:8080 would work.
I have seen several other posts with the same error messages get resolved by adding a binding line in Documents\IISExpress\config\appilcationHost.config to bind to a specific port. However I'm already running on 8080 port.
I'm using Visual Studio 2017.
You have to use modified hostheaders. So in your case, it should work with:
ngrok.exe http -host-header=rewrite localhost:8080
I have an application, and I am trying to intercept its requests with FiddlerCore.
Using Fiddler, I see the requests as follows:
https://i.stack.imgur.com/bhUqK.png
(HTTP CONNECT tunnel into HTTPS request)
When using FiddlerCore, I am only seeing the initial HTTP CONNECT tunnel, and the application is not requesting. after that, stating:
Failed to connect to server.
This is the code I'm using in the BeforeRequest method:
if (oSession.HTTPMethodIs("CONNECT"))
{
oSession["x-replywithtunnel"] = "FakeTunnel";
return;
}
And the output from the FiddlerCore program (upon running the application):
https://i.stack.imgur.com/0Fc2q.png
The application is a Java application, which I had to create a keystore for using the FiddlerRoot certificate, and I am wondering if this is where the problem lies.
(Images as such since low reputation)
Solution: FiddlerCore uses a different SSL certificate than Fiddler itself.
I'm building an Shiny-App with different API connections. It's all running on a server (CentOS Redhat).
I've got a problem with my API. If I'm running this on my terminal (Mac), everything works.
curl --data "InvestAmountInWei=2000000000000000000&Address=Test“ "http://s*******aw.ch:8002/invest"
Same with the Postman-App. I can do a post there and all will be done perfectly. The post request should transfer the ammount and the adress (like an id) to my r-script which is running via plumber.
As sad, if I do this command through terminal or Postman it works. But I need to do this command with the webbrowser.
I used this link to test it:
http://s*********aw.ch:8002/invest?InvestAmountInWei=1000000000000000000&Address=Jennifer
and now I only get this error in my web browser: {"error":["404 - Resource Not Found"]}
If checkt the iptables as well and it should be fine.
# netstat -ntpl | grep 8002
tcp 0 0 16*.**.**.*6:8002 0.0.0.0:* LISTEN 28563/R
any ideas how I can solve this problem?
When you make a request to a URL in your browser, that's a GET request. If you setup your endpoint to support GET and POST requests at the same location, your browser and Postman requests should both work just fine.
If you want your browser to send a POST request, you'll either need to submit a form to it or use JavaScript.
I have a client program running locally in iPhone emulator and local server written in Java. Client talks to server with JSON over HTTP requests. Now I am trying to record a client session http requests with JMeter to use them as a base to load-test server.
The problem is client requests do not go throw JMeter proxy. Client gets 501 "Method not implemented" (it is not because of https, I am using http). There is nothing in JMeter log about the request, and obviously nothing gets recorded in JMeter and the request doesn't reach the server.
There is well-described steps to setup JMeter proxy to record request from a browser, but my client programm is not a browser. Though JSON over HTTP is widely adopted approach, I could not find anything on the web about recording such requests with JMeter. I understand I need to do on the client the same thing browser does when proxying request and what I've found about it is that I need to set Host header to server's host and port, but that did not work and I cannot see how is it related to 501 error client gets.
If someone can explain what should be done on client or how to configure JMeter to let it know where to proxy client's requests or link any manual explaining that, it would be great help. I've been searching for solution for a few hours already and had no luck. Please help.
You can see my question and the answer I got below:
Use Jmeter proxy to record HTTP calls from iOS simulator
In short:
With this tutorial you can record calls from your Android device:
http://blazemeter.com/blog/load-testing-mobile-apps-made-easy
For make same thing with iPhone, do the following steps:
Mac configuration:
system preferences -> Network -> Advanced.. -> Proxies -> check "Web Proxy (HTTP) ->in "Web Proxy Server" field, type your IP (http://www.wikihow.com/Find-Your-IP-Address-on-a-Mac), and choose available port (I using 8080) ->ok -> Apply
iPhone configuration:
Settings -> WiFi -> choose same wifi you use with your Mac -> press on it again to go to it's details -> scroll down ->In HTTP proxy, choose Manual -> server = your mac IP you found earlier -> port = the port you chosen (maybe 8080)
Now You can start recording all "iPhone network out" using jmeter recording controller