私は、jax-ws warとspringと他のライブラリをうまく展開するためにmaven jettyプラグインを設定することができました。しかし、成功した展開にもかかわらず私は常にHTTP ERROR 404 Problem accessing /tstsrv Reason: not found
を取得しています。jax-ws webservices用のmaven jetty(バージョン8.1)プラグインの設定
私のPOMファイルの関連セクションは以下のとおりです。私は多くの設定で、成功なしに試してみたところ、多くの設定についてコメントしました。つまり、どうやって設定するかわからないjetty-jaxws2spi spiです。
<build>
<finalName>tstsrv</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jaxws2spi</artifactId>
<version>7.0.1.v20091125</version>
</dependency -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.6</version>
</dependency>
</dependencies>
<configuration>
<war>${basedir}/target/tstsrv.war<!-- ${basedir}/target/${project.artifactId}-${project.version}.${project.packaging}--></war>
<webApp>
<extraClasspath>${basedir}/src/main/custom/.</extraClasspath>
<contextPath>/tstsrv</contextPath>
<jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
</webApp>
<!-- systemProperties>
<systemProperty>
<name>com.sun.net.httpserver.HttpServerProvider</name>
<value>org.eclipse.jetty.jaxws2spi.JettyHttpServerProvider</value>
</systemProperty>
</systemProperties -->
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9090</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<loginServices>
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
<name>myrealm</name>
<config>${basedir}/src/test/resources/jetty-realm.properties</config>
</loginService>
</loginServices>
<requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
<filename>target/tmp/yyyy_mm_dd.request.log</filename>
<retainDays>90</retainDays>
<append>true</append>
<extended>false</extended>
<logTimeZone>GMT</logTimeZone>
</requestLog>
</configuration>
</plugin>
</plugins>
マイSpring構成は、com.sun.xml.ws.transport.http.servlet.WSSpringServlet
を使用していません。私はSpringBeanAutowiringSupport
を延長しています。私はこの仕事をすることができたが、WSSpringServlet
としか関係がなかったので、これは意味があると思う。私はthis blogの例を使用しました。 しかし、私は本番環境でweblogicを使用しているので、この解決策は選択肢ではありません。これはコードの変更を意味します。
Thnks助けてください。
コンテキストパスが '/ tstsrv'の場合、なぜ'/ws/tstsrv'をリクエストしますか? –
私の悪い。私はプライバシーのための実際のアプリケーションの名前を変更し、置換に失敗しました。追加の詳細を追加しました。 –
あなたが 'web.xml'を公開する必要があると思います。 'SpringBeanAutowiringSupport'の使用方法も明確ではありません.WSSpringServlet'はweblogic(およびその他のWebコンテナ)の下で動作するはずです。 –