I have a web service which I want to call from GPS device. I have hosted this web service on hosted server and this web service has a method called upload. This method accept a string parameter.
Currently I am calling this web service from a mobile phone with this url http://www.abc.com/Default.asmx/Upload?str=1,73.0667,33.6
Now I want to call this web method from GPS device, the problem is that GPS device accept only IP address and port no. It does not accept URL and web method.
Create a proxy service which is callable by the GPS device ("IP address and port no."), which in turn makes the desired webservice call, does whatever formatting to the data is needed, and returns it to the GPS device in whatever format you want it for the GPS device.
Related
I'm looking for a communication model that is constructed the following way:
One or more clients can connect to a server
One (chess-)engine connects to the server
The information flow is only one way, e.g if any client sends a message to the server, the server will forward the message to the engine. But if the engine responds, it should first send the respond to the server which forwards the response to the specific client.
Additionally, do you have any ideas or code examples on how to program that using c++ with boost/beast?
I have android clients that make request to my webservice in C#. If would like to keep track of the IPs used by the clients. I read about several way of getting the IP address from the Android device and then send it to the Server, or even get the IP address of a client from the server side. But I also read that both have problems, because malicious clients could fake their own IPs and so on.
So, having myself as the developer for the Android client side and also for the Windows server side, which is the best and more trusty way to get the IP if the client who is requesting a method in the server?
Permission like Read_Phone_State in the Android device will be difficult to get.
Also I heard about NAT address, so, getting the IP and the Port number would be perfect.
I found this:
String sIP = HttpContext.Current.Request.UserHostAddress;
I Don't know if there is a better solution or my reliable.
As I mentioned in the title: I would like to know the difference between the web-service and the web-socket? when we used each one?
Thanks!
A web service is an HTTP server that responds to client SOAP/REST/JSON requests.
A web socket is a client-side API that allows a web browser to create a bidirectional communication link with a server without having to change/reload the current page. This is typically used for AJAX requests to dynamically update live content on the current page, or create chat sessions between clients, or implement custom protocols that run in the web browser.
Web services are based on HTTP protocol and use HTTP methods to relay data in a request and response paradigm. Thus the client will always be the one responsible for communicating with the server, requesting data and submitting data to the server i.e getting list of customers or products, adding products or customers to server.
In contrast, Web sockets allow bidirectional communication, meaning server can initiate communication as much as client can do the same. Typically you supply a host IP Address and port to the socket. Web sockets can be used to implement a chat application.
The key difference between Web sockets and Web services is that with web sockets you get bi-directional connection in which the server and client can continuously send messages back and forth while Web services are uni-directional connection concerned with supplying clients with resources
I will be having a software which will give me information about the moving vehicles on the server side and I need to pass this information to the client computer on demand.
There will be a website which will act like a server and another website will act like a client. The client
website will ask for a data from the server website.
From here: https://stackoverflow.com/a/2849683/462608
As the protocol may not be HTTP, you may provide WebServices over mail or other protocols, and you do not need a web server for that.
I request an explanation on the above quote. In my case will I be needing a webserver?
There is a bunch of webservice protocols, some of them may use and some may not use http as transport layer. When http is used - you need a webserver on server-side of your service and a webbrowser as a client. If the transport is other than http, you need server of other type, and other client, for example, mail server and mail client in case of running service over smtp.
I need a system in which I can send SOAP request to 1 server from a few and then if server has this service it calls and returns value to client.
If not it passes the request to next server on his "list of neighbors". Request is passed until some server has needed service (or not, so we return error result).
My question is. What will be the best way to communicate between those servers. SOAP? Message Driven?
It will be great If it could work without central server. If I will use MD, should not all servers use common JMS on some central server?
Is it possible to send MD to specific server on given address?
Take a look at Apache ActiveMQ or Apache Camel or Spring Remoting