This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Sample Socket Server Online or Local  RSS feed

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Socket Testing With Credentials

We want to test Socket program where

a. we need to pass credentials - user name and password
b. after success, we need to send couple of request to get the response

1. Is any Free API available which accepts credentials and can test couple of request ?

2. Is there is any free windows tool is available to act as server to configure and connect using credentials and provides responses when we connect the server. Couple of sample request and response to be tested.

Thanks.
 
Bartender
Posts: 9558
189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I strongly suggest you use an established protocol to send credentials as encrypted cipher text, because you don't want them to be intercepted in transit. Since writing your own protocol on top of TLS might be a lot of work, it's maybe easiest to send HTTPS messages.

You can then use any web server to accept the requests, and if you configure middleware to check the credentials you're done.
 
Bartender
Posts: 20114
101
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Socket" programs are out of style. It's rarely worth the effort to define and debug and secure a new protocol from the ground up and firewalls used these days tend to limit the ports that can be used without getting the network people involved.

Probably the easiest, and best supported "socket" protocol these days is to simply use a web service. And J2EE/JEE have security mechanisms built into their specs, which can be augmented by established (and debugged) add-ons like Spring Security.

Another alternative is to use a messaging service, such as JMS. It's less firewall-friendly, but it allows for store-and-forward operations.

A third option is RMI. RMI is very low overhead, but you have to supply your own security protocols, it requires compatible JVM versions on both client and server sides. and clearance through any intervening firewall(s). A variant of this is remote EJBs. Actually, RMI-IIOP may reduce some of the earlier problems I mentioned with RMI, but it has been a while since I looked. RMI isn't very popular these days and its bare-bones services put more of a documentation and support burden on your local infrastructure.

There was a fourth option - CORBA, which is similar to RMI, except that clients could be in many languages, not just Java. CORBA was a "must have" skill in the 1990s, but died rather quickly when people started raising firewalls, since CORBA didn't work with fixed ports and was thus inimical to firewalls. It was essentially replaced by SOAP, which in turn was replaced by web services. CORBA is no longer supported in Jakarta JEE and vendor support for CORBA is nearly or completely dead at this point.
 
Kathir jeyap
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your detailed explanation, Tim Holloway.

The client will be giving us just an API with credentials once POC is done and we need to connect via Socket

Assume we need to use Socket and help me with the answers
 
Ranch Hand
Posts: 210
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this guy is just asking how to make http requests with java it seems like.  
 
Ranch Hand
Posts: 112
5
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want to sound rough - so I try to ask my assumption as a question: Do you know what you need and what it should provide?

As I read the topic line I first thought sarcastic: Every socket is local to the machine it's created on - and only becomes "online" when one can establish a route to this endpoint via the systems public IP (through what ever might be in the way from pop-uplink (most likely some sort of modem or router) to the machine).

Your questions are to vague to guess what you're askin for.
 
Yup, yup, yup. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!