papowell
14 years agoOccasional Contributor
Generated MockRequest does not use correct port
OS/Java - FreeBSD/OpenJava1.6
I am going through the tutorials step by step. Working on the MockService tutorial. Created a Response as shown in the tutorial, then started the MockServer. I used telnet localhost 8088 to check that the Mockserver was running and listening on localhost port 80.
I created a request to the MockServer. The URL was:
http://laptop_81.private:8088/mockCurre ... rterSoap12. Here is the XML I got back:
HTTP/1.1 404 Not Found
Date: Thu, 16 Jun 2011 18:05:27 GMT
Server: Apache/2.2.17 (FreeBSD) DAV/2 PHP/5.3.5 with Suhosin-Patch mod_ssl/2.2.17 OpenSSL/0.9.8n mod_perl/2.0.4 Perl/v5.10.1
Content-Length: 225
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /mockCurrencyConvertorSoap12 was not found on this server.</p>
</body></html>
Note the 'Server' header. This is the test Apache server I run on this system. Also in the
Apache log I have:
127.0.0.1 - - [16/Jun/2011:10:29:02 -0700] "POST /mockCurrencyConvertorSoap12 HTTP/1.1" 404 225
So even though the URL had a port number, it was not being used. So I editted the url to be:
http://localhost:8088/mockCurrencyConvertorSoap12
And now I got:
HTTP/1.1 200 OK
Content-Type: application/soap+xml;charset=UTF-8
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://www.webserviceX.NET/">
<soap:Header/>
<soap:Body>
<web:ConversionRateResponse>
<web:ConversionRateResult>2.34</web:ConversionRateResult>
</web:ConversionRateResponse>
</soap:Body>
</soap:Envelope>
So it appears that the URL displayed is not the URL being used. Sigh....
I am going through the tutorials step by step. Working on the MockService tutorial. Created a Response as shown in the tutorial, then started the MockServer. I used telnet localhost 8088 to check that the Mockserver was running and listening on localhost port 80.
I created a request to the MockServer. The URL was:
http://laptop_81.private:8088/mockCurre ... rterSoap12. Here is the XML I got back:
HTTP/1.1 404 Not Found
Date: Thu, 16 Jun 2011 18:05:27 GMT
Server: Apache/2.2.17 (FreeBSD) DAV/2 PHP/5.3.5 with Suhosin-Patch mod_ssl/2.2.17 OpenSSL/0.9.8n mod_perl/2.0.4 Perl/v5.10.1
Content-Length: 225
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /mockCurrencyConvertorSoap12 was not found on this server.</p>
</body></html>
Note the 'Server' header. This is the test Apache server I run on this system. Also in the
Apache log I have:
127.0.0.1 - - [16/Jun/2011:10:29:02 -0700] "POST /mockCurrencyConvertorSoap12 HTTP/1.1" 404 225
So even though the URL had a port number, it was not being used. So I editted the url to be:
http://localhost:8088/mockCurrencyConvertorSoap12
And now I got:
HTTP/1.1 200 OK
Content-Type: application/soap+xml;charset=UTF-8
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://www.webserviceX.NET/">
<soap:Header/>
<soap:Body>
<web:ConversionRateResponse>
<web:ConversionRateResult>2.34</web:ConversionRateResult>
</web:ConversionRateResponse>
</soap:Body>
</soap:Envelope>
So it appears that the URL displayed is not the URL being used. Sigh....