Boost logo

Boost Users :

Subject: [Boost-users] [asio] communication with a remote apache tomcat service
From: jmpulido (peito.vive_at_[hidden])
Date: 2009-03-09 07:26:54

Hello all:

I'm working on a client program which needs to communicate with a
remote server using an http based protocol ,which running a service
(java servlet under apache tomcat). I developed it using the example
as reference.

When testing on a local server with apache tomcat deploying the
service, (http://localhost:8084) it worked fine, since I established
the communication with the server with these statements:
    tcp::resolver resolver(io_service);
    tcp::resolver::query query("", 8084);
    tcp::resolver::iterator endpoint_iterator = resolver.resolve

It worked all right with that connection string, but when we deployed
the service in a commercial remote server with apache tomcat
preinstalled, the connection string has becomed something like this:

The problem here seems to be that I only can use tcp::resolver::query
when I have an specific ip or url, and a connection port both
separated but, apparently, now I need to specify the port within in
the connection string.

I couldn't make this work, and tcp::resolver::iterator
endpoint_iterator = resolver.resolve(query) always either can't
resolve the query or it gets timeout.

Is there anyway I could use a connection string with the port
specified within, like "http://urltomyserver:8080/ServiceName" and
make it work with tcp::resolver::query? Do I need to find an
alternative? The second option would be very expensive in developing
time terms, so I'm hoping you could help me to make this work.

Thanks a lot :)

José Manuel Pulido

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at