I have deployed a webservice on my local jboss server which runs on port 9090. So my webservice url will be http://localhost:9090/app/Services/blah. I have written a mobile client code(for blackberry) which connects to this url to get the data. Initially the client code when run on a bb simulator threw HTTP 403 error. Found that addressing urls as localhost won't work on a bb simulator ( on a simualtor localhost refers to the MDS? ).
So I tried accessing the local jboss server using http://127.0.0.1:9090 , http://machinename:9090/, http://ipaddress:9090 and nothing works. All these urls throw HTTP 501(Service unavailable) which is weird. Can someone tell me what is wrong with this and what is the correct way to access the server?
http://machinename:9090/, http://ipaddress:9090 -> These urls are not even working when i try directly on a desktop browser. FYI, its a windows machine. Do I have to change any nw settings on my machine.?
chedine,
I am not good at bb. But, can you please ensure that your App Server is up & running? Can you access the JMX-Console screen of JBoss in your desktop browser - ie. http://a.b.c.d:9090/jmx-console or something similar. Only if the app server is up, we can dig further into this issue. Please let us know the result.
Related
I have a spring boot application (Spring Web) which has a tomcat server embedded into it (maven dependency). The application is a server and consists of several HTTP routes. This application is on my laptop. I would like to execute the application on my laptop, and be able to RESTful calls (e.g. GET, POST etc) to the server. How can I make requests to the server from my computer?
I've checked out several tutorials and they tend to use XAMP or another similar application so not sure on how to go about this. Thank you.
Once your war is deployed on your server, you can send any REST call to it using curl, a browser, or my personal favorite for testing is Postman as it circumvents cross-domain issues.
To make the REST call simply use the IP address of the server instead of localhost. You can get the IP address of the machine using ifconfig or whatsmyip.org
http://<IP address>/...
I am trying to learn webservice building/deployment. I have built a webservice and deployed it on a oracle weblogic server on my laptop.
i am trying to test the webservice using soapUI from another laptop. i am getting invalid URL error.
can some one point out where i am going wrong
Note the same wsdl works fine if i try to run it from SoapUI on my laptop
Laptops have to be on same network. If so, each laptop will have its local Ip address ( go to cmd promt if using windows and type ipconfig).
Using this Ip, you can access webservice from second laptop which is hosted on your laptop.
If they are not on same network, it is possible but there are lots of things to be considered. I would suggest that only for production applications, not for testing.
Follwing the steps as outlined here: Standalone web service
I created a test web service that works great on my local machine. Since this is 'stand alone' I copied the same root folder on to a 'server' that I use and published the service on the server (as if it is my local machine). When I access the wsdl using localhost as the domain name, it works fine on the server. However, when I try the url from a different macihne on the network giving the server's domain name instead of localhost, I get a 'can not be displayed' error in IE.
My question is, should this even be possible? Or is there anything specific that needs to be done. Since this is a 'stand alone' solution, we should not require 'another' container like tomcat correct?
To be honest, until your post, I had no idea there was a builtin, lightweight, HTTP Server in the JDK. I've always used glassfish for my web service needs.
I can't say for sure, but if you look closely at the example code you'll see:
Endpoint endpoint = Endpoint.publish("http://localhost:8080/calculator", calculator);
I suspect that this limits you to "localhost" as opposed to the host machine. Try changing it so that it represents the name of the server and try again from another machine (naturally making sure it can get through the firewall as well). Something like:
Endpoint endpoint = Endpoint.publish("http://myserver:8080/calculator", calculator);
Rebuild it and try again. Other than that, you'd need to create a proper war file and deploy to glassfish, tomcat, etc.
I'm running a glassfish server that handles all jsp and servlets.
Now there is a way to get it working so that you can run IIS on port 80 and glassfish on port 8080, now the problem is:
When i request http://localhost/myWebApplication it should rewrite the url and use http://localhost:8080/myWebApplication
Basically I make a request to IIS, but the response I get back must be from Glassfish.
When I request the url with port 8080 it works, because its getting it from Glassfish, but i need to go through IIS to Glassfish.
Here is a website that explains it all: http://jstoup.wordpress.com/2012/04/25/how-to-integrate-glassfish-with-iis/
but I still can't get it working.
I have got no idea how my url rewrite rules must be set up.
This is James from the blog you referenced. If you haven't gotten this working you may have to enable your server farm as a proxy. If you select your web farm there should be a proxy config in the center console. All you should have to do is turn that on and you should be good to go. Let me know if you've got any problems
So I've been doing a java webservice in Eclipse in which I have launched on a localhost tomcat from Eclipse. This has worked very good as long as I've been connecting to the tomcat started from Eclipse.
However now I want to try deploy it on my tomcat separated from Eclipse but still on localhost. So I exported my web project to a .war file and deployed it with the tomcat manager app. However now I cant reach it from my client any longer. I'm running the tomcat on port 8080, just as my Eclipse tomcat did. BUT I can go to a reasource URL from my web browser and receive proper information, so the service is running(which the manager app is saying as well).
The client is a android device connected to the same network. The service fetches information from a MySQL database on the same machine. This connection worked fine before exporting it to war on my other tomcat
What am I doing wrong here? Just ask if you need any further information!
Ok so after testing I found it strange that I got connection time-outs and not something else. It also took at least 10 seconds before any feedback occurred. Sooo it felt like a firewall problem which indeed it was.
First I needed to portforward the tomcat port in my router to the machine ip that was hosting it. Then I remembered I had Windows firewall on that very machine which was also blocking conenctions on that port. So I allowed connections on tomcat port and BAM! It worked.
Thanks for all your comments, of course I should have thought about opening my ports before coming here.