Forum Discussion

nocontrol's avatar
13 years ago

Redirected POST becomes GET

Hello
We send a http-POST to a Server. The server response with "HTTP/1.1 302 Found". After this, soapUI is sending a GET instead of a POST-Request to the new address.
Please see http-Log below. By the way, with soapUI 3.6.1 it smoothly works.

Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "POST /export HTTP/1.1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "SOAPAction: "http://.../soap1.1"[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Content-Length: 308[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Host: someserver.com[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exp="http://....">[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> " <soapenv:Header/>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> " <soapenv:Body>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> " <exp:ActRequest>xxx</exp:ActRequest>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> " </soapenv:Body>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "</soapenv:Envelope>"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "HTTP/1.1 302 Found[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Date: Tue, 10 Apr 2012 13:47:27 GMT[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Server: Apache[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Location: https://.....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Content-Length: 245[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Keep-Alive: timeout=10, max=500[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<html><head>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<title>302 Found</title>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "</head><body>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<h1>Found</h1>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<p>The document has moved <a href=".....">here</a>.</p>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "</body></html>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "GET /targetapp/param_mapping/zzz HTTP/1.1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "SOAPAction: "http://..../soap1.1"[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Host: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie: .....=[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "HTTP/1.1 303 See Other[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Date: Tue, 10 Apr 2012 13:47:27 GMT[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Server: Apache[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Location: /auth/login?Location=https%3A%2F%2F....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Keep-Alive: timeout=10, max=499[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Transfer-Encoding: chunked[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Content-Type: text/html[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "98[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<html><A HREF="/auth/login?Location=https%3A%2F%2F....">Please follow this link.</A></html>"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "0[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "GET /auth/login?Location=https%3A%2F%2F.... HTTP/1.1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "SOAPAction: "http://..../soap1.1"[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Host: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "HTTP/1.1 302 Found[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Date: Tue, 10 Apr 2012 13:47:27 GMT[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Server: Apache[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Content-Length: 0[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Location: /export/[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "X-FRAME-OPTIONS: SAMEORIGIN[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Keep-Alive: timeout=10, max=498[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "GET /export/ HTTP/1.1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "SOAPAction: "http://..../soap1.1"[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Host: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie: ....[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:>> "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Date: Tue, 10 Apr 2012 13:47:27 GMT[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Server: Apache[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "content-type: text/html; charset=utf8[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "X-FRAME-OPTIONS: SAMEORIGIN[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Keep-Alive: timeout=10, max=497[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Connection: Keep-Alive[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "Transfer-Encoding: chunked[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "2a2[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<html>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<head><title>MessageServlet</title></head>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<body>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "<h3>Message Servlet is in Status OK</h3>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "</body></html>[\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "0[\r][\n]"
Tue Apr 10 15:47:26 CEST 2012:DEBUG:<< "[\r][\n]"
  • balak84's avatar
    balak84
    Occasional Contributor
    Hi,

    If it is this redirect that you want to stop and want to have the actual service process as two separate steps, then there is a solution.

    Select your respective Test Step within the Test Case. Post selection on the left hand side, there would be a property panel (TestRequest Properties). The would be a specific "Property" called "Follow Redirects". Change the value of this property from "true" to "false". (This appears as a drop down in the "Value" field)

    Hope it helps

    Regards,
    Bala.