How can i allow people in my local network to access the web service in my machine? - web-services

I have coded a web service using the Axis 2 framework and I can successfully invoke it using a test client (SoapUI) on the local machine after publishing the application in JBoss 5. I can post to the WS endpoint from the local machine and get the expected response.
Now i want to allow other machines to access the web service.
i changed the "localhost" to "my own fixed IP" adress at the end point location, and turned firewall off, but impossible to access the WS.
Note : windows Xp SP3.
Any idea ?
Thanks in advance !!

Please ensure you follow below steps
For example, if your ip is 10.132.243.54
List item
Checking if your IP is pingable by other systems
Instead of running with eclipse, run your jboss from your
command-prompt
start jboss-server suffixing -b in run.bat. The command is run.bat
-b 10.132.243.54
Access the WS from SOAP-UI using IP and not using localhost
If your IP is still not pingable, turn off the firewall, after
following above steps
Sorry for the late reply, However this would solve the problem i guess

Related

Installing Qlik Sense on Windows 2012 r2

I'm trying to install Qlik Sense Desktop on Windows Server 2012 R2. The problem I believe is with the name entered as hostname during installation.
I tried using the hostname during installation process as the name of the server machine as well as the the ip address of the windows server but I get below error message whenever I try loading the Qlik sense hub app after installation
This site can’t be reached
If you're logged into the server, try https://localhost/qmc rather than the hostname. That should always work unless the services have failed to start up or something.
If you can get in there, then you can amend the accepted hostnames in the Virtual Proxy settings in the "Host Allow List" section.
If you can't get in there, it's possible it's trying to use the hostname you entered to connect between services - your best bet is to do a full uninstall and re-install - and probably keep the default hostname it proposes as this should always work and you can add additional hostnames at a later date.
Are the services up and running ? Have you see if one of the ports used by QlikSense are available or were used by other application ?

REST calls not working on AWS with localhost?

I'm running a Spring application on an AWS box. The app is being hosted with Tomcat 8 and the build is running great. However, the calls we are making to the back don't work using localhost but do work when we use the ip instead.
Shouldn't we be able to use localhost instead of the ip? Is this a configuration issue with Tomcat 8 on our box and if so, what do we need to fix?
One reason can be a configuration issue in Tomcat, however, i think there is a higher probability of a missing configuration on the machine itself. I guess this is a Linux box, maybe a line missing in /etc/hosts (like the one below)?
127.0.0.1 localhost

Consume web services via LAN

I have web services running on my machine on a local network. Instead of connecting to them via localhost, I'd like to be able to connect to them via local IP - in this case 192.168.1.5. Once I can do this, I'll know other devices on the network can consume these web services too (in particular, my android phone).
In my project setup in Visual Studio 2013 (I am using IIS Express), if I set the project url to be http://testdomain.com:52252 and set the line in my hosts file for 192.168.1.5 testdomain.com, then connecting to testdomain.com:52252/testservices.asmx works just fine. However when I change the project url to http://192.168.1.5:52252/ and connect straight to 192.168.1.5:52252/testservices.asmx it returns Bad Request - Invalid Hostname. HTTP Error 400. The request hostname is invalid.
What is an effective way of testing web services on a local network? I need to develop and test web services and test them from an android device, but I am disallowed from developing/testing them on a live server at the moment. Are there any solutions to this?
I have looked for solutions online but have been unable to find any. I find it hard to believe there is not a common solution to this issue - surely people must have a way to test web services without hosting a server or connecting via localhost?.
I really see there being two routes to take
1) Route each domain to a vlan with it's own ip
Virtual LAN - https://en.wikipedia.org/wiki/Virtual_LAN
Configure VLANs in a Microsoft Windows Environment - http://docs.oracle.com/cd/E19407-01/820-7898-11/z40001c91004554.html
2) Create x number of virtual machines and simulate traffic
I've got it - I had heard others needing to turn off their firewall in order to get this to work. Personally I was using McAfee to manage my windows firewall - so I'd turned McAfee firewall off assuming that was enough - but I was wrong. Despite turning the firewall off, I still had to go into the advanced windows firewall settings and add an inbound rule to allow all incoming connections over the specified port. It then worked - I could call web services from other devices on the network!
The key is to edit the IIS Express file called applicationhost.config. Add a binding just like localhost, but with your IP address. Note that you have a binding configuration for each VS2012 project so put it in the one you are using.
Then right click IIS Express in the sytem tray and exit. Exit VS, then open it using Run As Administrator. That should do it.
<bindings>
<binding protocol="http" bindingInformation="*:24486:localhost" />
<binding protocol="http" bindingInformation="*:24486:192.168.4.104" />
</bindings>

Windows Integrated Authentication fails ONLY if web svcs client is on same machine as IIS server

I have a web service running under IIS7 on a server with a host header set so that it receives requests made to http://myserver1.mydomain.com.
I've set Windows INtegrated Authentication to Enabled and everything else (basic, anonymous, etc) to Disabled.
I'm testing the web service using a powershell script, and it works fine when I run it from my workstation against http://myserver1.mydomain.com
However, when I run the same exact script on the IIS server itself, I get a 401-Unauthorized message.
In addition, I've tried installing the web service on a second server, myserver2.mydomain.com. Again I can call my test script fine from BOTH my workstation and from myserver1.
So it seems the only issue is when the client is on the same box as the web server itself - somehow the windows credentials are not being passed or recognized.
I tried playing with IE settings on myserver1 (checked and unchecked 'Enable Windows Integrated Authentication', and added the URL to Local Sites). That did not seem to have an effect.
When I look at the IIS logs, I see the 401 unauthorized line but very little other information.
I see basically the same behavior when testing with IE (v9) - works from my workstation but not when IE is running on the IIS server.
I found the answer after several hours:
By default, there is something called a LoopbackCheck which will reject windows authentication if the host header used for the site does not match the local host's name. This behavior will only be seen when the client is on the local host. The check is there to defeat possible reflection attacks.
More details here:
http://support.microsoft.com/kb/896861
The kb item discusses ways to disable the Loopback check, but I ended up just switching from using host headers to ports to distinguish the different sites on the IIS server.
Thanks to those who gave assistance.
Try checking the actual credential that is being passed when you are running on the server itself. Often times you will be running on some system account that doesn't have access to the resource in question.
For example, on your box your credentials are running as...
MYDOMAIN\MYNAME
and the server will be something like...
SYSTEM\SYSTEM_ACCOUNT
and so this will fail because 'SYSTEM\SYSTEM_ACCOUNT' doesn't have credentials.
If this is the case, you can fix the problem in one of two ways.
Give 'SYSTEM\SYSTEM_ACCOUNT' access to the resource in question. Most people would avoid this strategy due to security concerns (which is why the account has no access in the first place).
Impersonate, or change the credentials of the client manually to something that does have access to the resource, 'MYDOMAIN\MYNAME' for example. This is what most people would probably go with, including myself.

Testing a remote web service with soapUI

I have a Javax web service deployed in a remote Linux machine within a JBoss ESB container. I am able to test the web service using soapUI on the same machine as where the service is deployed. The WDSL URI I used was something like http://127.0.0.1:8080/abcd/abcd?wsdl.
What I would like to do is to be able to test the same service from another machine using soapUI. I tried replacing 127.0.0.1 with the IP address of the machine where the service is deployed. This does not seem to work. Can someone tell me what I am missing here?
Thanks.
a sum of things could go wrong there - as already mentioned by the others the firewall is blocking access for the given (address, port) pair. Another thing that happened to me was that the WSDL was generated using the name of the machine it was deployed on and whenever I was trying to call the service from a different machine it was complaining that I cannot find the given machine.
You need to test network connectively. One tool you can use is plain old telnet. If you telnet to the ip/port combo of the web server, you will get a response (an HTTP error). For example:
$ telnet 192.168.0.10 8080
If you get nothing then there is almost certainly a firewall blocking access.
If you are convinced that no firewall is blocking you, the other possibility is that the web server is only bound to the local network adapter (127.0.0.1) and not the other network adapters (ethernet/wifi). This is very unlikely however.