I have created a web service using [Spring, Apache Cxf, Tomcat, intellij Idea]
After I config tomcat and run it. I get this
My web service:
web.xml:
Spring appContext:
You appear to be missing the proper configuration for the xsd for the CXF tags. You should have the following pair in your config file:
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
So, in combination, you'll have
<xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
Also, ensure you have the necessary dependencies for the CXF frontend tags, specifically: cxf-rt-frontend-jaxws.jar
Related
FAST CGI IS NOT WORKING PROPERLY IN DJANGO DEPLOYMENT ON IIS WINDOW SERVER
HTTP Error 500.0 - Internal Server Error
C:\Users\satish.pal\AppData\Local\Programs\Python\Python310\python.exe - The FastCGI process exited unexpectedly
Most likely causes:
•IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
•IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
•IIS was not able to process configuration for the Web site or application.
•The authenticated user does not have permission to use this DLL.
•The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Things you can try:
•Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
•Check the event logs to see if any additional information was logged.
•Verify the permissions for the DLL.
•Install the .NET Extensibility feature if the request is mapped to a managed handler.
•Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module
FastCgiModule
Notification
ExecuteRequestHandler
Handler
fastcgiModule
Error Code
0x00000001
Requested URL
http://10.0.0.5:8097/
Physical Path
C:\inetpub\wwwroot\hcm.ariespro.com
Logon Method
Anonymous
Logon User
Anonymous
More Information:
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
View more information »
Microsoft Knowledge Base Articles:
•294807
i HAVE TRIED EVERY THIN FROM GIVING APPpOOL PERMITTIONS TO CHANGING VERSIONS OF PYTHON AND WFASTCGI
BUT NOTHING IS WORKING FOR ME
PROJECT IS WORKING JUST FINE ON DJANGO SERVER
I HAVE ALSO DEPLOYED IT USING NGINX AND WAITRESS FROM WINDOYS SERVER BUT I NEED IT TO WORK WITH IIS
PLEASE hELP ME OUT-- AT ANY COST
IIS provides many features for hosting Web applications. Python web applications can be hosted by the Httpplatformhandler and FastCGI features. For Python developers, learning HttpPlatformHandler becomes very important, Microsoft no longer recommends FastCGI, so this is no longer the right way to host Python web applications on IIS, you can switch to HttpPlatformHandler.
Download and Install Httpplatformhandler on IIS using Windows Platform Installer. Or download from this link.
You can use the following steps to host a Django web application using Httpplatformhandler:
For Django physical path is a path to manage.py of your application.
Django APP with Httpplatformhandler Add web.config where your Django app is defined.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"
requireAccess="Script" />
</handlers>
<httpPlatform startupTimeLimit="10" startupRetryCount="10" stdoutLogEnabled="true"
processPath="C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe"
arguments="manage.py runserver">
<environmentVariables>
<environmentVariable name="foo" value="bar"/>
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
HttpPlaform is handling the Python process. ProcessPath is a physical
path to python executable. Just like you provide python path in a
windows environment variable. To access the python executable. Here
you have to provide python.exe in processPath.
Arguments are the same argument you pass running any python web
application. For eg. python manage.py runserver where app.py to port
number all are arguments. In the above application, manage.py
runserver is passed to run Django application.
Add Permission to Django Application and Python folder where your executable is present.
1.Open folder properties.
2.In Security click on Edit then click on Add
3.Enter object name as IIS AppPool
4.Click on the check name if its present click ok and allow permissions you wanted to give then apply it.
For more information, please refer to this article.
check the directory in which python is installed and move all the packages into the same folder I resolved the issue by storing all the packages in a single folder in c drive outside the users' folder so that wwwroot can easily access the directory and you do need to give permissions to iis pool to access the python and w FastCGI module.
I've installed a Platform Indepednant Binary version Geoserver (http://geoserver.org/release/2.16.2/) successfully. It's been a while using it an no real problems. I now want to use this version of Geoserver for an OpenLayers website (that uses GeoLocation) but that requires all the component parts that use HTTP to use HTTPS...Geoserver is the last server I have that needs to be migrated.
I've looked online and there seems to be a lot of info on moving Geoserver to HTTPS but it doesn't all tie up with my installation. Some examples talk about server.xml files (which my installation doesn't have) and updating an apache conf file (/etc/apache2/sites-avaiable/smallmelo-le-ssl.conf) which I don't have either so I'm struggling to get instructions on my particular version of Geoserver. The docs state that it's running on a Jetty servlet. Does anyone have any documentation or links on how to configure https?
Progress!! So my installation is using Jetty. I've setup the keystore correctly with a valid certificate. I've updated the start.ini file to reflect the location of the keystore and password but...when I try to run geoserver I get:
ERROR : No module found to provide ssl for https{enabled}
I do not have an SSL.MOD module in the modules folder of my jetty installation. I did dig out a module (ssl) from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.13.v20150730/ but I now get:
java.lang.IllegalStateException: No constructor class org.eclipse.jetty.server.ServerConnector([],{}) in file:/C:/Program%20Files/Geoserver/geoserver-2.16.2/etc/jetty-https.xml
I've struggled to find out how to update this file and add what is needed. Problem is I'm not a java expert so I don't want to just randomly copy someone elses config settings.
This is a simple case of finding a Jetty tutorial and following it, GeoServer doesn't care about https.
However, I should warn you that the reason you can't find much help in the GeoServer documentation is because you shouldn't run the platform independent binary in a production environment. This is the reason that the documentation expects a server.xml (part of tomcat) and assumes that you are behind an Apache2 or Nginx web server that is designed to handle ssl.
Both of the warning messages you mention come from bit rot in the Jetty configuration files on the GeoServer repository. You figured out that the ssl.mod file is missing, and adding it manually solves that issue.
The second error java.lang.IllegalStateException: No constructor class comes from a mix of Jetty version config files. The jetty-https.xml file that is in the GeoServer 2.16 repo is from Jetty 9.4, and the jetty-ssl.xml is from Jetty 9.2. At some point between those version, the location of the constructor <Configure id="Server" class="org.eclipse.jetty.server.Server"> was moved from jetty-https to jetty-ssl. It was not updated correctly in the GeoServer repo so there is a set of mismatched xml files.
I solved this by copying the jetty-https.xml file from 9.2 to match the 9.2 version of jetty-ssl.xml included with Geoserver. You could use the more current jetty files that match what Geoserver is running on, but make sure you copy all of them, ssl.mod, jetty-https.xml, jetty-ssl.xml, and jetty-ssl-context.xml.
Ok, just wanted to share this in case it was helpful. It is a bit brief but hopefully will be of use. Please note: My setup used a legitimate GoDaddy DNS/SSL Certificate so that may be a limiter for some and force you to use a self-signed certificate.
Thank you to Ian Turton who created the 'aha' moment :)
I used the following youtube video to get Tomcat and Geoserver installed: https://www.youtube.com/watch?v=RyCFKGm4NSw
Firstly, once I had Tomcat running (I used port 8081 as 8080 was already in use). Please be aware when I installed to port 8081 it didn't update the server.xml file, so I had to manually open it up and change
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
to
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
and then restart Tomcat.
I used a legitimate PFX file I downloaded from GoDaddy. I already have an SSL certificate/DNS setup with them so it was just a question of requesting a PFX file.
Secondly, I imported my PFX using JAVA installed from AdoptOpenJDK. I went to the commandline, navigated to the AdoptOpenJDK bin folder (which has a keytool.exe application). I then ran this command:
keytool -importkeystore -srckeystore c:/temp/mygodaddycert.pfx -srcstoretype pkcs12 -destkeystore c:/temp/mycert.jks -deststoretype JKS
When prompted for the password for the enter source password I got that from GoDaddy and then I used my own, completely different, password for the JKS file. I then copied my JKS file to ./conf/certs folder (I created the certs folder)
Thirdly, I added this to my /conf/server.xml file:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
SSLEnabled="true" scheme="https" secure="true" sslProtocol="TLS"
keystoreFile="conf/certs/mycert.jks"
keystorePass="<your_jks_password_when_registering_with_keytool>"
/>
I restart Tomcat...
Then I used my DNS from GoDaddy to connect to the instance: https://myXYZ.de:8443/ and voila Tomcat running on SSL with no certificate errors. Since Geoserver was installed. I can just add geoserver to the end: https://myXYZ.de:8443/geoserver and voila number 2.
How to deploy "war" file built with spring boot to jetty? I am unable to access restful services of my spring boot application when I deploy the war file to jetty.
Steps I followed:
Referring to Spring boot war documentation I created a war file. I could see the files are available in the war file.
Copied the war to ${jetty home}/webapps. (/usr/share/jetty/webapps)
Added a contexts.xml file with my war name (excluding .war suffix)
Restarted Jetty service
When I browse localhost:8080 I see folder structure of my web app. (i.e WEB-INF resources)
None of spring resource paths are available from localhost. My spring application has JAX-RS resource. Below is my ApplicationInitializer class (Groovy).
class ApplicationInitializer extends SpringBootServletInitializer {
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
Properties props = getPropertiesFromArgs()
return new SpringApplicationBuilder([Application, "classpath:/META-INF/com/foo/testapp/bootstrap.xml"] as Object[])
.properties(props)
}
Its as-if jetty start did not start spring context. What am I missing? Application works fine if I run the spring boot built uber jar. I can access all restful resources of the app.
Figured out. I was not using Servlet 3.0 compliant jetty version. sudo apt-get install jetty pulled 2.5 compliant version. Once I updated to Jetty 9.x, it worked fine.
I have a WAR (extendedname1.01.war) and I have set up a sun-web.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application
Server 7.0 Servlet 2.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun- web-app_2_3-0.dtd">
<sun-web-app>
<context-root>/app</context-root>
</sun-web-app>
When I deploy the war it ignores the context in my sun-web.xml and leaves the context root as /extendedname1.01.
The sun-web.xml is in the WEB-INF/ folder of my war.
Can anyone shed any light on this please?
Many Thanks
There is a problem with the admin GUI tool.
You should deploy your application through the command line asadmin tool:
for example:
./asadmin deploy extendedname1.01
Hello I want to test automatic my SOA WebService, I found soapUI and it looks also really nice.
But how I can start my SOA Service in an Tomcat (EmbeddedTomcat?) or AXIS Servlet Container?
Because we don't want to install on our Hutson Build Server an Tomcat Server.
So the question which are the ways to go when we will Test our SOA Service from outside in an automatic unit test environment?
Thanks for answers
If you don't want to install a Tomcat server on your buildserver, you could have another server running tomcat, which you can remote deploy to from your build server on every successful build. Then run your soapUI tests against the remote server. There are both Ant and Maven plugins for Tomcat, which can do remote deployment. http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant, http://mojo.codehaus.org/tomcat-maven-plugin/introduction.html