LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2013, 03:22 AM   #1
system1
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Lightbulb 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
 
Old 02-25-2013, 03:34 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
check item 6 here http://www.howtoforge.com/useful-uses-of-netcat
 
Old 02-25-2013, 03:59 AM   #3
system1
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-25-2013, 04:27 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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
 
Old 02-25-2013, 07:55 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by system1 View Post
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.
 
Old 03-04-2013, 08:08 AM   #6
system1
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
@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.
 
Old 03-05-2013, 01:34 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by system1 View Post
@unPawn,
Please write my handle correctly, TIA.


Quote:
Originally Posted by system1 View Post
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'.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] List webservice methods marcos egatz Linux - Software 1 05-12-2012 01:01 PM
How to change application into webservice jeyakumaraj Programming 1 03-21-2012 08:40 PM
C# Webservice on Linux without Mono ? Shecuna Programming 2 03-08-2011 02:26 PM
Freebsd Webservice problems fatum112 *BSD 6 08-14-2006 12:24 PM
Sending Objects to a Webservice (Java) megabot Programming 4 07-03-2006 07:38 AM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration