Converting a SOAP UI SOAP request to curl - curl via mitmproxy works

Francis Zabala picture Francis Zabala · Oct 9, 2015 · Viewed 9.3k times · Source

Well, basically that's my question. I honestly don't know what using mitmproxy results in a successful request.

Here's what I did:

  • Created a request from WSDL and was able to query the server successfully
  • Recreated that request using curl. I tried my best to create the same request as soapui does and by inspecting the request using ngrok and requestb.in but it still failed.
  • I tried mitmproxy because why not and I am running out of ideas and it worked!

I really don't know what's going on. Why using mitmproxy made it work.

Answer

Francis Zabala picture Francis Zabala · Oct 9, 2015

Ok, it think I found out what happened.

Using mitmproxy "cleans" white spaces in my request. That is why I was successfully getting a response from the server.

This was the culprit:

 --header "SOAPAction: \"http://myurk.com/soap/queryRequest\" "

Notice the space I have between \" and "? Removing that whitespace got it working. Mitmproxy probably cleaned that out for me.