Menu

Bind server to specific hostname or IP?

David Luu
2011-03-26
2013-04-25
  • David Luu

    David Luu - 2011-03-26

    I notice that the Java XML-RPC libraries, this one and Apache one, at least in the code examples, only show binding to specific port but none for hostname or IP address, so always bound to localhost's name/IP.

    Libraries for other platforms like .NET, Perl, Python allow binding for host/IP.

    So I was wondering if there was a design choice for this behavior in Java or is it a limitation to the Java networking stack used by the XML-RPC libraries?

     
  • Greger Olsson

    Greger Olsson - 2011-03-26

    Hi,

    The recommended way for using the Redstone XML-RPC Library is to publish services using the XmlRpcServlet in your favourite servlet container like Jetty, Tomcat, or any application server, along with the rest of your application if there is one.

    For scenarios where you just want to quickly get something up and running there is a bundling with the Simple HTTP server but that's just to get something running quickly and is not what you'd normally run production services with.

    So how you expose your services - which IP, port, context - and so on is dependent on how you configure your server which is outside the scope of the RS XML-RPC Lib. So it's quite possible to have your server bind to any interface of your choosing.

    BR,
    Greger.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.