LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Netcat for webservice status (https://www.linuxquestions.org/questions/linux-newbie-8/netcat-for-webservice-status-4175451591/)

system1 02-25-2013 03:22 AM

Netcat for webservice status
 
Hi, I read somewhere that netcat is like a "swiss army knife". Therefore, I want to check the status of a web service (I have the url), how can I do that using netcat? I know how it can be done through curl though, but I would really prefer to use netcat for the task.

Thanks in advance :)

acid_kewpie 02-25-2013 03:34 AM

check item 6 here http://www.howtoforge.com/useful-uses-of-netcat

system1 02-25-2013 03:59 AM

Thanks, but how do i use it with a url like http://192.168.0.1:8080/someService?wsdl with a status message(s) being returned and not an interactive prompt?

acid_kewpie 02-25-2013 04:27 AM

interactive what now? An HTTP request is an HTTP request no matter what the server app is. There's no different. It's just a POST or a GET

unSpawn 02-25-2013 07:55 AM

Quote:

Originally Posted by system1 (Post 4899120)
Thanks, but how do i use it with a url like http://192.168.0.1:8080/someService?wsdl with a status message(s) being returned and not an interactive prompt?

You should probably quote the URI "http://192.168.0.1:8080/someService?wsdl" to keep the question mark from being interpreted by the shell if that's what you mean?
*BTW since this seems to be about WSDL why not use something like http://sourceforge.net/projects/wsdlpull/ instead? Then you can also check the actual content for errors and not just it being alive or not.

system1 03-04-2013 08:08 AM

@unPawn, I have tried various combinations using qoutes as suggested, but the OS keeps displaying the nc syntax indicating that the syntax is not correct. Also, I am not allowed to install or copy other files like the wsdlpull you suggested. Further help is still needed and will be appreciated.

unSpawn 03-05-2013 01:34 AM

Quote:

Originally Posted by system1 (Post 4904344)
@unPawn,

Please write my handle correctly, TIA.


Quote:

Originally Posted by system1 (Post 4904344)
I have tried various combinations using qoutes as suggested, but the OS keeps displaying the nc syntax indicating that the syntax is not correct.

'man nc' says it's 'nc address [space] port' plus you'll prolly have to do something like 'echo -en 'GET HTTP/1.1 /someService?wsdl\n\n|nc address port'.


All times are GMT -5. The time now is 03:54 PM.