Do i need a localhost server to invoke a web service - web-services

I'm very fresh and beginner in the web services world, I'm trying to learn how to deploy and consume services.
My question: Using any technology (such as Java), when I want to invoke some web service that is deployed in a remote server, do i need to install and configure a localhost server in order to access the web service? or I can access it without install server
Note: I'm asking about consuming a web service not developing a one
Thanks in advance

No. Just as your web browser doesn't require a web server to access other web servers, your code doesn't require a web server to access other web servers.

Related

How can I enable API request and MongoDB access only for the app server?

We are working on an app whose Front-end has been decoupled from the back end.
We have 2 project packages. The first project package acts as the front-end for the app and interacts with the 2nd package which acts as the back-end via API.
Front-end is built with:
React
Redux
Back-end is built with:
ExpressJS
MongoDB
We have deployed the app successfully on the AWS EC2 instance but I am doubtful about the security inbound measure we have applied for the packages. Both the packages are deployed on the same ec2 instance.
The front end of the app can be accessed with https://xxx.xxx.x.xxx:8080. Under the security group, under inbound rules, I added the source as anywhere for port 8080 under the custom TCP rule.
I did the same for port 3000 reserved for the back-end API server and port 27017 reserved for MongoDB.
What I actually wanna do is only let the front-end package running on port 8080 talk to the API server and the API server in turn talks to MongoDB.
I do not want everyone to have access to the backend server and MongoDB except for the front-end app server.
Note that I have already used the JWT token to secure the API. This one is to add an extra layer of security.
How can I limit the access to only the Front-end app server?
Thanks in anticipation.
Sorry, are you accessing your MongoDB directly from the frontend? I hope no...
So you should configure firewall on your server (firewalld or iptables) to block Mongo and all other internal ports from access from web.

Calling services from Remote server in Azure

I'm developing a LMS application in VS-2012 with SQL server 2008 R2.I have a web service hosted in my local server.I don't want this to be published or moved to Azure
rather I would like to make a call of this service (remote server) from Azure.
How do I achieve them?
I'm very new to the Azure technology.Kindly explain in brief.
If the local server is public so it can be reach from internet you can just call it. However if its on your local network and you don't want to expose it you will have to connect it to an Azure Virtual network using VPN, read more here

how to call web service deployed in a VPS

I have deployed a restful web service in a godaddy vps.
this VPS can be connected via ipaddress:port(port provided to me).
i.e. 108.XX.XX.XX:43XX
Now, i have installed tomcat 7 in VPS, and i have deployed a RESTful web service in tomcat on port 8080.
i can call the web service from inside the VPS as ipaddress:8080/webServiceName but not able to call it from any other system(other than my VPS).
How can i fix this issue ??
I have checked many places for fixing this issue, but the only thing i find is how to deploy web service in tomcat.
Please Help..!!
This might be an issue with Firewall on your server. Try allowing the required port and it should be able to connect.

Can we connect an Azure mobile service to an on premise web service?

Does anyone know whether it is possible to route network traffic from an azure mobile service through a VPN to an on premise web service? None of the documentation I have read precludes that, but neither does it say we can. So far we have had no success though we can access the web service using a web browser VM in the same subscription. We can't run any new software at the site hosting the web service, so it would seem like Service Bus Relay cant be used and the web service can't have a publicly exposed ip address.
have a look at Mobile Services with an Azure Hybrid Connection. The walkthrough talks about exposing an on-premise database, but i think you can use the same steps to expose a different TCP port for your on-premise web service

Develop and deploy RESTful web service

I followed Creating a RESTful Web Service Using NetBeans IDE. I implemented all the steps from step no 1 to 6 successfully and able to test my REST web service on my machine.
But now I want to deploy my web service for stand alone Glassfish v4 server and want to access from another machine or node from the local network.
I deployed the .War file on stand alone Glassfish v4 from the front-end of Glassfish but it is not accessible from other node of the network. The View Endpoint option is not coming after deployment.
Please guide me what steps should i follow, what is missing or suggest me how to deploy .war on glassfish v4.
Look into the log messages of the stand alone GF.
Check proxy settings and other connection settings