We are developing a JAXWS client for a 3rd party WCF web service. The JAXWS client is going to be part of large web based application that would be deployed on tomcat.
Not all servers in our env are allowed to communicate over the internet so out network team had configured a SOCKS proxy with authentication.
I know that I can pass -DsocksProxyHost as a command line parameter but I cannot do that since that applies for the entire web app. I've gone through this javadoc-link
on how to setup connection based proxy settings.But the problem is , since I'm using the wsimport generated Service which abstracts the URL connection functionality, I'm not able to use the URConnection conn = url.openConnection(proxy); approach.
Any ideas/thoughts?
Related
I have a java app/client which calls a soap web service using Java Sockets. Now I need to add a load balancer in between the client and server which redirects the request to multiple Tomcat instances where the API is running. How can you establish socket connection from the client without specifying the server port address since the routing happens through the load balancer(F5)? Can this be accomplished through F5 configuration somehow?
For instance the soap url looks like this:
http://abc:1234/myapp/mysoap?wsdl
It needs to be converted to
http://abc/myapp/mysoap?wsdl
So i have my site on hosting company, and this company support let encrypt certificate, so i generated it and now the site is running with https protocol.My server side(spring boot application web service oriented started on VPS) for this site is on another company. My questions are:
How can i use this generated certificate on my server side part,
is it possible, what should i do?
What i need to provide to the server, and all things that are needed the server to work?
When i was without the certificate everything worked perfect, but right now on the server side i get
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
and in the browser i get
net::ERR_SSL_PROTOCOL_ERROR,
when I`m trying the get resources from server.
From the hosting company i can get everything connected to the certificate
It seems that you are passing HTTPs traffic to web server which "talks" in plain HTTP.
Normally SSL termination is done on software like Apache HTTPD or Nginx.
Then you configure it to act as reverse proxy to your actual Spring boot application running in JVM.
You can also configure your JVM webserver (Jetty,Tomcat .. whatever you have) to use your Let's encrypt certificate, but I have doubt that certbot will be able to easily renew them.
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 have implemented apache websocket API in my project, which is working all fine on my local. Over http and https, but when i moved the project to upper environment where we don't use ip address of machines directly instead refer them using URL.
So earlier i used to open websocket connection as follows
webSocket = new WebSocket("ws://myApp(ip)/endpointName"); OR
webSocket = new WebSocket("wss://myApp(ip)/endpointName");
But after moving on other evironments it's not working anymore as there might be part of reverse proxy (I dont know much about Apache server sertup). We have included WS_TUNNELING module for web socket reverse proxy to work.
But still not able to find the proper solution.
What I want is, I should be able to open web socket using
webSocket = new WebSocket("wss://myApp.com/endpointName");
have tried following links
ws_tunneling
and
ws_tunneling
Please let me know
I've just successfully installed Apache Tomcat 7.0.39 on my openshift account (tomcat-ngoanhtuanthesis.rhcloud.com/). I know that tomcat 7.0.39 has supported Websocket. In my local computer, I can run my web socket aplication properly, but I cannot run it in the openshift server. However, my web service application can run very well. I've searched over the Internet for the whole week but I couldn't find any solution. Can anyone help me? Thank you in advance!
Note: here is my Web service:
tomcat-ngoanhtuanthesis.rhcloud.com/TrueTrafficServerAlpha2/
And here are some websocket examples integrated in Tomcat 7.0.39. These examples cannot run even though they are very simple.
http://tomcat-ngoanhtuanthesis.rhcloud.com/examples/websocket/
Did you read this? https://www.openshift.com/blogs/paas-websockets
WebSockects are currently under staging on openshift, and are available on alternative ports.
How to access Preview WebSockets Support?
You will need to connect to
specific ports, as the main routing layer is still Apache based and
does not support WebSockets.
So, for plain WebSockets ws:// you will use port 8000 and for secured
connections wss:// port 8443. Here's an example:
http://app-lovingwebsockets.rhcloud.com/ <= your current HTTP URL
http://app-lovingwebsockets.rhcloud.com:8000/ <= WebSockets enables HTTP URL
https://app-lovingwebsockets.rhcloud.com/ <= your current HTTPs URL
https://app-lovingwebsockets.rhcloud.com:8443/ <= WebSockets enables HTTPs URL
So, just open your samples here, and they will just work (hopefully):
https://tomcat-ngoanhtuanthesis.rhcloud.com:8443/examples/websocket/