weird behavior of pub.client:http

Hi All,

I used pub.client:http service to check whether a specific server is up and running on a specific port so that if it successful,I want to invoke a webService.

I installed tomcat in my local which is running @8080 port. I have installed a webMethods in my work Station. When the Tomcat is up, in my local webMethods, http service is giving a status of 200 by passing http://localhost:8080/ as an input to url input parameter, when Tomcat is down, http service is throwing ‘Connection refused’ error.

Now issue is as below.

I have opened a firewall port from Dev server to my local machine. When I pass http://localhost:8080/ to url parameter of http service it is returning 200 though the server is up or down. I even checked with but it is still returning 200 status irrespective of whether Tomcat is up or down.

I even gave my IPV4 address in place of in the URL but same 200 status is coming as output though Tomcat server is down. I even tried giving wrong server name like http://abc:8080/ but this also giving 200 status

Also kindly let me know any other way to check target server is up on a specific port before invoking a webService to push data to it.

Kindly help me to resolve this issue and let me know if you need any details from me.

I am using wM, Updates: IS_8.2_SP2_Core_Fix11; OS Name : Red Hat Enterprise Linux Server

If I understand you correctly, From you Dev machine, if you are connecting to
http://localhost:8080, it’s pointing to itself, its not connecting to your local machine.

also try to use telnet command to verify connectivity.


Issue is though I gave localhost/<MY_PCNAME>/ its giving 200 status irrespective of server is up or down.

I mean:

as part of http service it is always giving 200 response.


One more thing to update, from my Dev machine, what ever I pass as part of URL of http service it is giving 200 status. I don’t know why its behaving like this. But in local webMethods, if the tomcat is up it is giving 200 ,if tomcat is down, it is giving ‘Connection refused’ error. Not sure what’s wrong in Dev server.

Have you looked at the body of the HTTP response being received? Can you get on the Dev server and hit those URLs via a browser/curl/wget? If so, what do you get back?

I highly doubt that it’s a problem with the pub.client:http service.


Percio, thanks for your response. If http service is not working fine, then in local too it should give wrong results but its working fine in local. Is there any cache which is keeping old result of http service and pulling it every time. Any thoughts around this.

Answer my questions first and then I’ll answer yours :smiley:

Surely,I will tell you, please share more details on curl, wget.


Please Google it.

:slight_smile: will do