Remote Stream Server from IceCast - icecast

I an trying to reproduce a video streaming in an IceCast server so I would like to configure it in icecast.xml server. I have the following questions:
In the mount section how can I configure the video stream for reading the input.I would like to read a stream of the following type:
rtsp://*******************/Streaming/Channels/101?transportmode=unicast
In fact, I have just configured the following iceCast.xml file:
<icecast>
<limits>
<clients>1000</clients>
<sources>42</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>hackme</admin-password>
</authentication>
<hostname>localhost</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<relay>
<server>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</server>
<port>8000</port>
<mount>/test.ogg</mount>
<on-demand>0</on-demand>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
<mount type="normal">
<mount-name>/test.ogg</mount-name>
<username>othersource</username>
<password>hackmemore</password>
<max-listeners>1</max-listeners>
<dump-file>/test.mp4</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/etc/icecast2/test.mp4</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/etc/icecast2/videoDAT.mp4</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<stream-url>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</stream-url>
<on-connect>sh /home/stream-start.sh</on-connect>
</mount>
<fileserve>1</fileserve>
<paths>
<basedir>/usr/share/icecast2</basedir>
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
</logging>
<security>
<chroot>0</chroot>
</security>
</icecast>
How could I configure it for reading a mp4 file ?

Icecast can't relay RTSP streams. You can only relay compatible HTTP Progressive streams (which are the streams servers like Icecast and SHOUTcast serve.)
Icecast also will not decode your MP4.
You need to use a tool like FFmpeg to relay to Icecast. Something like...
ffmpeg -i <your RTSP URL> icecast://example.com/stream

Related

Running Django on Windows Using an IIS Server

I'm trying to run Django on Windows Using an IIS Server, I'm following a nice tutorial:
https://www.youtube.com/watch?v=CpFU16KrJcQ&fbclid=IwAR37FtYd2ZveEIxBy1FAiqOkp3jpwwjyMQwuGnnaUW_renNHogfrMEbXNUs
I get stuck at the point where I
wfastcgi-enable
Here is the output of the error ..
ERROR ( message:Configuration error
Filename: redirection.config
Line Number: 0
Description: Cannot read configuration file due to insufficient permissions
. )
An error occurred running the command:
['C:\\Windows\\system32\\inetsrv\\appcmd.exe', 'set', 'config', '/section:system.webServer/fastCGI', '/+[fullPath=\'"C:\\Users\\\\pyt
hon.exe"\', arguments=\'"C:\\lib\\site-packages\\wfastcgi.py"\', signalBeforeTerminateSeconds=\'30\']']
Ensure your user has sufficient privileges and try again.
I don't know how to set privileges to accept the command ..
can anybody help?
On server 2012 this error can be caused by UAC which needs to be disabled via the registry.
This article explains why... https://social.technet.microsoft.com/wiki/contents/articles/13953.windows-server-2012-deactivating-uac.aspx
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
change DWORD "EnableLUA" from 1 to 0
How to Deploy Django Web Application on Windows using Microsoft IIS Server
Deploy Django on Windows using Microsoft IIS
Step 1 : Paste the Project File to C:\inetpub\wwwroot or C:\ Directory or Any other Directory
Step 2 : Install Python in C:\Python because path limit user friendly – Appropriate Version and set path environment variable
Step 3 : Install Microsoft C++ Build Tools https://visualstudio.microsoft.com/visual-cpp-build-tools/
enter image description here
Step 4 : If Microsoft IIS is not Installed, follow these steps : Go to Control Panel -> Program and Features -> Turn Windows Features On or Off -> Select Internet Information Services ( IIS ) -> Select All services as per your project, Check Application Development features all enabled !!! -> Confirm and Continue
enter image description here
Step 5 : Open Microsoft IIS Application – Right Click -> Add Website… -> Enter the Site Name , Select the Physical project path location i.e select manage.py designation folder and enter the binding information
Step 6 : Yes, you successfully created IIS Application Site
Step 7 : Now, you should give access for your project folder and python folder
Step 8 : Select your project folder and right click -> Select Properties -> Security -> Edit Group or user names -> Add -> Select All Object Types, Select the Machine, and last, Enter the object names -> IIS AppPool\your IIS Site name
e.g. IIS AppPool\DjangoWebApplication and check the names in objects if its correct information it get the Application Object Name e.g. DjangoWebApplication then, then select the object name and select full control to the application.. and use the same procedure on python folder also
Step 9 : Now, Is ready for install python libraries., Install all project requirement libraries with also install, pip install openpyxl, wfastcgi.
Step 10 : Open a CMD as Administrator and enter the command wfastcgi-enable
enter image description here
Step 11 : Then, Check on Microsoft IIS -> IIS -> Click FastCGI Settings -> If it is Successfully Configured the Details is found else not found we enter by manually Click Add Application In Name, paste the python executable path location
e.g. c:\python\python.exe , In Argument paste the wfastcgi.py location.. if you don’t know copy from cmd e.g. c:\python\lib\site-packages\wfastcgi.py and remaining all same okay and continue
enter image description here
Step 12: Create a file web.config nearby manage.py file and enter the details,
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="C:\Python\python.exe|C:\Python\Lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<!-- Required settings -->
<add key="WSGI_HANDLER" value="my_app.wsgi_app()" />
<add key="PYTHONPATH" value="C:\MyApp" />
<add key="DJANGO_SETTINGS_MODULE" value="my_app.settings" />
<!-- Optional settings -->
<add key="WSGI_LOG" value="C:\Logs\my_app.log" />
<add key="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" />
<add key="APPINSIGHTS_INSTRUMENTATIONKEY" value="__instrumentation_key__" />
<add key="WSGI_PTVSD_SECRET" value="__secret_code__" />
<add key="WSGI_PTVSD_ADDRESS" value="ipaddress:port" />
</appSettings>
</configuration>
From here, you have to change according to your system perspective
First, Change scriptProcessor settings e.g. "c:\python\python.exe|c:\python\lib\site-packages\wfastcgi.py" can now be used
Second, change <add key="WSGI_HANDLER" value=" DjangoWebApplication.wsgi.application" />
Third, change <add key="PYTHONPATH" value="C:\DjangoWebApplication folder" />
Fourth, change <add key="DJANGO_SETTINGS_MODULE" value=" DjangoWebApplication.settings" />
Then, remaining optional !
Step 12: Then, Create another file web.config from static folder and enter the details,
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<clear />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
</handlers>
</system.webServer>
</configuration>
Step 13 : Then, Create another file web.config from media folder and enter the details
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<clear />
<add name="StaticFile" path="*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Script" allowPathInfo="true" preCondition="" responseBufferLimit="4194304" />
</handlers>
<directoryBrowse showFlags="Date, Time, Size, Extension, LongDate" />
</system.webServer>
</configuration>
Step 14 : Open Internet Information Services (IIS) Manager. Under connections select the server, then in the center pane under Management select Configuration Editor. Under Section select system.webServer/handlers. Under Section select Unlock Section. This is required because the C:/inetpub/wwwroot/web.config creates a route handler for our project.
Step 15 : Add Virtual Directory. In order to enable serving static files map a static alias to the static directory, C:/inetpub/wwwroot/webproject/static/
Step 16 : Add Virtual Directory. In order to enable serving static files map a static alias to the static directory, C:/inetpub/wwwroot/webproject/static/
Step 17 : Yes, Now is ready for hosting the site before check the settings.py edit the Allowed Host and add the IP Address and port number
Step 18 : Then, generate the staticfiles by Django run the command python manage.py collectstatic
Step 19 : Now, Is All Set… Start the Server and check all is working correct
Thanks, Johnny https://github.com/Johnnyboycurtis/webproject for your clear explanation...
Try These, Deploy your Website... Cool... !
Reference :
https://pypi.org/project/wfastcgi/
https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019

aws web service not available on the internet

In unix using putty I am able to get a result:
curl http://localhost:8080/products-ut-wo-db/rest/products
In security group I have inbound: 8080
In /home/ec2-user/java/tomcat9/webapps/manager/META-INF/context.xml I comment out the valve following:
I tried these url nothing come:
http://ec2-18-236-111-143.us-west-2.compute.amazonaws.com:8080/products-ut-wo-db/rest/products
http://ec2-18-236-111-143.us-west-2.compute.amazonaws.com:8080
Here is my netstat -nat:
Here is the /home/ec2-user/java/tomcat9/conf/server.xml:
Here is my /home/ec2-user/java/tomcat9/conf/server.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
Any help or hint will be greatly appreciated it.
It seems that tomcat is not binding to a IPv4 address (according to netstat output, it is only bound to IPv6 - check first column).
In order to configure tomcat to bind to IPv4, refer to this answer. It describes the proper way to configure your tomcat JVM to preferIPv4Stack and preferIPv4Addresses.

There was and error downloading 'https://$metadata'. The request failed with http status 403: Forbidden - XAMARIN WEB REFERENCE WITH HTTPS

I managed to create a web service with self signed SSL through IIS. It's settings at first are set to Client Certificate to none and none required SSL. It is accessible by that time threw web browser and mobile web reference.
Web Browser
Xamarin Web Reference
But when I set the SSL settings to required, it is now forbidden in both. What am I missing in settings for SSL Configuration?
SSL Settings Thru IIS
Web Browser Forbidden Access
Xamarin Web Reference Forbidden Access
WebConfig
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="constring" providerName="System.Data.SqlClient" connectionString="Data Source = source;Initial Catalog = dbname; User ID = user; Password = pw" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.5" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding maxReceivedMessageSize="10485760" name="SecureHttpBinding">
<readerQuotas maxStringContentLength="10485760"></readerQuotas>
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
To access web service via HTTPS in web browser, I followed this link for creating temporary client certificate but I changed the step #5 to this command
makecert -sk MyKeyName -iv RootCaClientTest.pvk -n "CN=tempClientcert" -ic RootCaClientTest.cer -sr localmachine -ss my -sky exchange -pe
I changed the currentuser to localmachine and signature to exchange so that it will be in personal certificate store. When you access the site again, it will ask for client certificate and you can choose it to proceed.
For the main problem to access the service in visual studio xamarin via web reference (which is forbidden somehow).
I found this link to solve the forbidden problem. You can see the second post of (c)MarkoOkram for the solution.
"I am solved problem by saving web browser .wsdl and .xsd files on file system, change reference in those files to matching files. Than i succesfully add reference in visual studio to that file system .wsdl file." -(c) MarkoOkram
I downloaded the file WSDL and XSDs written in WSDL then retarget the filepath to their respective directories and it's done.
update: I also tried to import singleWSDL and it works without editing for xsd's

How to change the path to open a different page initially on icecast2 sever

I have configured my Icecast.xml file as below:
<icecast>
<limits>
<sources>2</sources>
</limits>
<authentication>
<source-password>password</source-password>
<relay-password>password</relay-password>
<admin-user>password</admin-user>
<admin-password>password</admin-password>
</authentication>
<hostname>localhost</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<fileserve>1</fileserve>
<paths>
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
</logging>
</icecast>
Whenever, I enter the url http://localhost:8000 on a browser, the icecast status page (http://localhost:8000/status.xsl) gets opened initially. I want to change this initial/start up page to get opened with someother page (say, server_status.xls) on icecast server. Please let me know where/in which file I can change the path to open different page initially on icecast server
It's right there in your posted configuration:
<alias source="/" dest="/status.xsl"/>
Just point dest to a stream or different file in your web directory. Save config, restart Icecast.
The alias tag is also explained in the Icecast documentation here:
http://icecast.org/docs/icecast-2.4.1/config-file.html#path
Note that this is just meant as a status interface and not to host a website. If you need to host a website, use a real webserver.

Changing soap:address location in generated wsdl to https on tomcat 6 axis2(1.6.2)

To start, I am using eclipse, with Axis2 1.6.2 and I am deploying my created web service on tomcat 6. The web service is created from a top down approach in eclipse.
I've been requested to make the access to my web service SSL compatible.
No problems occured there, I followed the url "http://axis.apache.org/axis2/java/core/docs/servlet-transport.html" which led me to modifying the axis2.xml to include:
<transportReceiver name="http" class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8080</parameter>
</transportReceiver>
<transportReceiver name="https" class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8443</parameter>
</transportReceiver>
And removing:
<transportReceiver name="http"
class="org.apache.axis2.transport.http.SimpleHTTPServer">
<parameter name="port">8080</parameter>
<!-- Here is the complete list of supported parameters (see example settings further below):
port: the port to listen on (default 6060)
hostname: if non-null, url prefix used in reply-to endpoint references (default null)
originServer: value of http Server header in outgoing messages (default "Simple-Server/1.1")
requestTimeout: value in millis of time that requests can wait for data (default 20000)
requestTcpNoDelay: true to maximize performance and minimize latency (default true)
false to minimize bandwidth consumption by combining segments
requestCoreThreadPoolSize: number of threads available for request processing (unless queue fills up) (default 25)
requestMaxThreadPoolSize: number of threads available for request processing if queue fills up (default 150)
note that default queue never fills up: see HttpFactory
threadKeepAliveTime: time to keep threads in excess of core size alive while inactive (default 180)
note that no such threads can exist with default unbounded request queue
threadKeepAliveTimeUnit: TimeUnit of value in threadKeepAliveTime (default SECONDS) (default SECONDS)
-->
<!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
<!-- <parameter name="originServer">My-Server/1.1</parameter> -->
<!-- <parameter name="requestTimeout">10000</parameter> -->
<!-- <parameter name="requestTcpNoDelay">false</parameter> -->
<!-- <parameter name="requestCoreThreadPoolSize">50</parameter> -->
<!-- <parameter name="requestMaxThreadPoolSize">100</parameter> -->
<!-- <parameter name="threadKeepAliveTime">240000</parameter> -->
<!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter> -->
</transportReceiver>
I also have to modify the web.xml in the web config to include:
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTPSOnly</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
It's going perfectly well, I can only access the application using https:
"https://myUrl:8443/IVRCoreWebService/services/CardManager?wsdl"
The problem here goes in the description file opened in the URL:
<service name="CardManager">
<port name="CardManagerPort" binding="tns:CardManagerBinding">
<soap:address location="http://`myUrl`:8080/IVRCoreWebService/services/CardManager/"/>
</port>
</service>
How can I change the auto generated URL by Axis2 to the https location, I would like my url to be the following:
<service name="CardManager">
<port name="CardManagerPort" binding="tns:CardManagerBinding">
<soap:address location="https://`myUrl`:8443/IVRCoreWebService/services/CardManager/"/>
</port>
</service>
If I modify the port in <transportReceiver name="http"> (See above) to for example 8050, the soap:address location will in turn change 8050, so my guess is that when the wsdl is being generated, it is referencing the <transportReceiver name="http" >, any idea how I can make it reference the <transportReceiver name="https" > ?
I checked this thread https://stackoverflow.com/a/10072185/861760 which is telling me to add a <transports><transport>https</transport></transports> in service.xml (I found services.xml instead), when I added this code segment, It gave me a new error:
org.apache.axis2.AxisFault: Server does not have an epr for the wsdl epr==>http://www.example.com
org.apache.axis2.description.AxisService.getLocationURI(AxisService.java:1615)
org.apache.axis2.description.AxisService.setPortAddress(AxisService.java:1498)
org.apache.axis2.description.AxisService.printDefinitionObject(AxisService.java:1078)
org.apache.axis2.description.AxisService.printUserWSDL(AxisService.java:1112)
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1386)
org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAgent.java:327)
org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:183)
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Thank you for the help,
Regards.
I'm not sure you asked this, but I see that
address location = (domain + port) / (file name of .WAR) /services/ (name of wsdl:binding )