I have a web service deployed behind firewall.
Connection between firewall and WS is on 8080 port, but firewall accept requests from outside only on 443 port.
The problem is that when I open wsdl from outside, schemaLocation attribute has wrong value - begins with http://host:8080, but not with https://host:443
I can change port as described here:
http://metro.java.net/2.0/guide/HTTP_address_in_soap_address_and_import_locations.html
but it lead to wrong: http://host:443
Does anyone know how to fix protocol of schemaLocation attribute from http to https?
it is here: new location of metro user guide
Related
I am testing Wso2 Api Manager on Ubuntu 18.04. When I created the demo phone verify soap to rest api, the production end point port shows 8281.
Currently on ubuntu I am serving a dart server which uses same port. And all the configuration port from 8080 to 8484 allocated to for my existing server.
My question is how to change production end point port to something different like 9090?
Example:
Default Settings show:
http://localhost:8281/phoneverify/1.0.0
And I need to change to:
http://localhost:9090/phoneverify/1.0.0
Every time I need to run the server I need to publish my endpoint to use port 9090. How do I do that? Thanks
You can set the port offset to 810 in AM_HOME/repository/conf/carbon.xml. Then all the ports will get offset from 810.
Setting offsets in carbon. xml would work, but it will move all other ports as well. I'd sugest using two other ways we commonly use
have an http reverse proxy
You can have a reverse proxy (httpd, ngix,..) to listen to any port defined and forward requests to the target endpoint
you can set the nio port in the file repository/conf/tomcat/catalina-server. xml
I have an web service (.asmx) in in IIS. If click invoke button for the web service via machine name and port it is fine.
http:// example:1111/mymethod
However, if I access it via url http:// example.com/mymethod and click invoke button again,
I see the URL changes to http:// example.com:1111/mymethod. So port number is added in automatically.
It is on iis 7, can anyone help?
worked out this now.
IT setup the site on our load balancer, which redirects to the server on port 1111. As a result, IIS will receive a request to my url on port 1111 and Microsoft code will add port number in the wsdl file.
So I asked IT to redirect to the server on port 80, and on IIS I setup the host header to be my url and port 80. This solves the issue.
I've just started studying Winsocks and I've a simple question for you: how can I determine if the connection to a server must take place over a HTTP or HTTPS connection?
Let's say I want to connect to randomsite.random, how can I know what kind of connection I need? I know that for HTTP I must connect to port 80, while for HTTPS is needed 443, but how can I determine WHEN is needed a HTTPS connection?
Thank you for the attention!
The same way a web browser decides: Based on the URL you are trying to load. In a web browser, the URL begins with http or https, which is used to determine whether an SSL connection should be used. This is also used to determine the port if no port number is specified in the URL.
Many sites offer both a secure and a non-secure version. Some offer only a secure version, but still run a non-secure server which issues a redirect to the URL of the secure version. If you implement following of redirects, you don't need to worry about which version to use: it will happen automatically.
This is usually a function of the site you are connecting to.
If the site requires a HTTPS connection, then if you connect over HTTP you will get a redirect response code with a HTTPS URL.
Firstly, it's not always port 80 and port 443. Secondly, you won't establish successful communication if you use the wrong communication protocol. As said in another answer, if you try to connect via HTTP to an HTTPS server, it will give you a redirect response code with an HTTPS URL.
Most of the time, you have this information before-hand!
I've a simple jax-ws web service that on localhost works fine with the clients, but now I want to publish the web service on a public ip, so the clients can interact with it through wan network instead lan network.
I signed to no-ip dns service provider and defined my host like "myname.no-ip.info".
In my code i start the service in this way:
Endpoint.publish("http://localhost:8080/baseStationProvider", new BaseStationProvider());
and the browser at http://myname.no-ip.info:8080/baseStationProvider#wsdl doesn't show the wsdl.
If i start the service in this way:
Endpoint.publish("http://myname.no-ip.info/baseStationProvider", new BaseStationProvider());
compiling the code, it raise this exception:
Server Runtime Error: java.net.SocketException: Unresolved address
Any idea to problem and/or how to do what i need?
thanks in advance
This seems likely to do with routing and firewalls as opposed to web service publication etc. Ignoring the web-service aspect, can you even reach your server when you use this in your browser:
http://myname.no-ip.info:8080/
?
Which should look the same as
http://localhost:8080/
If not, then it is probably DNS/Routing/Firewalls that you need to check. Diagnostics that will help there are:
1) can the machine you are testing on resolve the DNS name mynam.no-ip.info? nslookup, ping, traceroute/tracert
2) is there a firewall blocking port 8080 from reaching local host? If the route from the internet to your host hits a firewall (which it will) that firewall will have to forward the request.
Good luck.
I am working on a web service project using gsoap. I am new to web services and have some basic questions.
What should be the port no. of my web service? Currently this web service is a stand alone service listening to a hard-coded port no. of 22050. Client connects to this port and everything works fine. Is this approach OK? What are the pros/cons of this approach?
Or Should my web service be a plug-in of the apache web server? In that case how does it work? Apache httpd listens on port 80, so client sends request to this port. Then how does the request get routed to my web service?
I didn't find any proper online resources on these. Any pointers would be great.
You will have to configure apache such that it knows it will be your web service. In this case you will probably give it a location. So you can configure a directive that will make sure your service is called by apache.
I.e. you will use urls that identify your service (http://.
You will then use a location directive in which you make the proper configurations. You can find more information at http://httpd.apache.org/docs/2.0/sections.html
Hope this helps.