Reputation: 51
I am a SOAP rookie, building my first Axis2 (v 1.6.2) web service. I copied a tiny test service from a co-worker, and it runs if I use http, but not https. My co-worker does not have this problem.
The error I receive is "javax.servlet.ServletException: https is forbidden". My Axis2.xml file DOES contain the following:
<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>
I am testing localhost, JRE 6.1, and Tomcat 7.0.25. My co-worker (who is able to use https) is using Websphere 6 and Axis2 v.1.6.0, so it's possible this is an appserver or Axis2 version issue. We do not use Maven.
My Tomcat ports are http:8080, https:8443, and AJP:8009.
Any help resolving this https error would be appreciated.
Update: No resolution yet, but seems to be similar to or same as: https://stackoverflow.com/questions/13808029/http-is-forbidden-exception-while-accessing-the-axis-2-webservice
Upvotes: 4
Views: 13722
Reputation: 51
I discovered the cause. I have the following entry in my web.xml file, for the AxisServlet servlet. My co-worker also had the entry, but hers was commented out. This entry caused a "file not found" error on server startup. Commenting this out resolved the issue.
<init-param>
<param-name>axis2.xml.path</param-name>
<param-value>/WEB-INF/conf/axis2.xml</param-value>
</init-param>
linuxlewis, thank you for your response!
Upvotes: 1
Reputation: 3859
I can think of two possible issues off hand.
Maybe the IIS/Apache server sitting in front of the web service is using some sort of domain restriction. With mod_authz_host you can restrict access to particular http patterns based on their domain
If your are accessing the web service from a server using Java then you may need to install the certificate associated with the web service in the JDK security cacerts file. If your colleague is working in websphere they may have already installed the certificate
Upvotes: 0