updating WSDL for http to https change - java

We have developed a web service in Java and have published the wsdl. This is done over http. Now we have to provide it over a secure connection i.e. https. The web service application is hosted on webspehere and we have the certificate used in websphere for https.
I am looking for the steps to update the java code and wsdl so that we can publish web service over https.

You should not need to update any Java code or WSDLs. This is all a function of the server configuration. The server is already listening on regular HTTP, presumably on port 80. A listener needs to be added for HTTPS, presumably on port 443 - and mapped to the same web context as your existing application.
Alternatively, this can be done outside of the web server (WebSphere, in your case) by fronting it with something like Apache HTTP Server or a dedicated load balancer that supports SSL/TLS offloading - which can be more efficient.
Since this really isn't a programming question, I'd recommend opening a new question at http://serverfault.com for details on how to configure WebSphere or something related to the configuration I proposed above.

Related

Tomcat AJP request to normal HTTP

I have a company application deployed on Tomcat 8 and another application making request to an Apache server that uses AJP ` protocol to access the application. I am new to AJP. I have created an AWS infrastructure using containers with the mentioned application (as an alternative to the described above). The problem is I want to avoid using Apache and use Amazon's ALB (application load balancer) and so far it's working, except the AJP request. The problem I am having is that when not using Apache, I do not need to use AJP anymore and I want to replace it with HTTPS. Will enabling the HTTPS connector in Tomcat do the trick? The lines in Apache configuration are:
ProxyPass /pmaddon-a ajp://*.*.*.*:8009/pmaddon-a
ProxyPassReverse /pmaddon-a ajp://*.*.*.*:8009/pmaddon-a
To sum up, if I skip the Apache server and call Tomcat directly with HTTPS (with enabled HTTPS connector of course) will it have the same result as using the AJP connector as I am now?
I understand what you want to do is:
Access you application directly using the TOMCAT connector
Remove the APACHE in front and its AJP communication with TOMCAT
This is possible to do, perhaps you need to adapt that other application (the one that calls apache) to point to the URL that arrives to the TOMCAT connector.
If the question is if you will have the same result:
I understand yes. AJP and HTTP both serve the same content, it's just a different protocol.
You didnt explain if you have HA therefore I did not enter that topic.
AJP is very similar to http/https except it is a binary protocol from Apache (Apache Jserv Protocol) but it is better performant since it size is almost 1/5 of the http/https.
It is widely being used with reverse proxy web server where webserver talk to application server using AJB.
You don't need to stick with AJP if you are directly connecting to Tomcat connector

Java (TomCat) Servlet login security. HTTP vs HTTPS (development and production)

I work with proof of concept web application, and have to create login/password authentication. For now security is not a matter, but further in production it will be important. My first question: Should I already configure TomCAT with SSL certificate to work via HTTPS? Is this somehow affects servlet implementation? Can I just develop everything using http, and just switch to https on production?
I think web application should work with any HTTP or HTTPs and this depends only on servlet container (TomCAT) setup, but I am not sure. Now I work with Oracle manual with some changes, especially in sense of TomCAT 8 and annotations use.
Also, please note some parts of my application will use websocket protocol.
Thanks.

How to handle multiple domain request on a single server?

I am using dedicated server. I have hosted different HTML, PHP and wordpress websites on this server those are working perfectly.
Now I want to deploy java web application on this server. So I have installed Apache tomcat server on another port. So now I want to know how I can handle request directly from domain name to tomcat apache server.
Along with this I want to know how I can deploy multiple web applications on single tomcat. I want to know configuration to call different WAR files from tomcat.
Thank you in advance for your support.
You can use Apache as reverse proxy with the mod_proxy plugin: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Therefore, you can handle all HTTP requests with Apache, specifying which requests shall be redirected to the Java web app in Apache Tomcat - port 8080.
Easiest way is to set up a HTTP server (apache, nginx, etc.) as a reverse proxy. Then you can map different domains to different contexts, for example:
www.domain.com -> localhost:8080/main/
www.otherdomain.com -> localhost:8080/othermain/
subdomain.domain.com -> localhost:8080/anotherwar/
For example with Nginx it would be done with a ProxyPass directive. Other HTTP servers have their own respective mechanisms.

Web Services and IIS pass through/redirect

We have a java application deployed in JBoss on one of our client's servers. The application has to issue a web service call to a server completely outside of the network.
Unfortunately, our client's server is not exposed to the outside world and is not able to issue a web service request. The client has IIS running on another server and we thought to route our web service calls through IIS.
We are not a Microsoft shop so know very little about how to do this. We set up a Redirect but unfortunately, as soon as our web service hits IIS it automatically issues a 302 response. That is not what we want, we just want the web service call to pass through the IIS and be forwarded to the server hosting the web services. We then want the response coming back from the server be forwarded through the IIS to the client's application server. Essentially, we want IIS to serve as a pass through proxy.
Is there any way to set something like this up?
Any help will be greatly appreciated.
I think you want to set up IIS as a reverse proxy for your internal server. I had the same question and had better luck looking under reverse proxy information.
We are using IIS 8.5 and required IIS extensions for "Application Request Routing" and "URL Rewriting". Not as scary as it sounds, these are not unusual IIS features to install. The documentation rarely mentions web services specifically, but it seems to work for web services as it does for other web sites.
Good luck!
Application Request Routing would definitely be the way to go provided your running IIS 7 or later. We use it to implement proxies and reverse proxies extensively in our systems, handling both normal http and web service requests (caching of web services is a bit tricky).
A good starting point would be the following article by Ruslan Yakushev: http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

integrating websockets using Netty with Spring web app running in tomcat

I have a web socket server implementation using Netty (say listening on port 8081) and a separate Spring web application running in Tomcat (running in port 80).
I would like to somehow forward all request coming to localhost:80/Websocket to my Netty server on port 8081. Is this possible at all. since Tomcat and spring is build on top of http protocol, idk how this would be possible.
All I wanted to do is enable server push using websocket from my existing spring web app. Any suggestions?
The easiest way would probably be to put an nginx server up front and have it forward requests to /Websockets, however because Websockets is not Http 1.0 you can't use normal ProxyPass directives but according to http://www.letseehere.com/reverse-proxy-web-sockets it's possible via a special plugin
Take a look at the following 2 links which show how to have netty configured using spring. I have done it in grails wherin a netty socket server is running within tomcat, listening on a particular port for binary packets(not http)
link1
link2
Why not just use the WebSocket support in the latest Tomcat (7.0.27)?
Netty can handle HTTP. E.g. http://static.netty.io/3.5/xref/org/jboss/netty/example/http/snoop/package-summary.html

Categories