2012-03-11 7 views
0

私は、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助けてください。

+0

コンテキストパスが '/ tstsrv'の場合、なぜ'/ws/tstsrv'をリクエストしますか? –

+0

私の悪い。私はプライバシーのための実際のアプリケーションの名前を変更し、置換に失敗しました。追加の詳細を追加しました。 –

+0

あなたが 'web.xml'を公開する必要があると思います。 'SpringBeanAutowiringSupport'の使用方法も明確ではありません.WSSpringServlet'はweblogic(およびその他のWebコンテナ)の下で動作するはずです。 –

答えて

0

私はこの問題を、Mavenプロファイルによって制御される別の構成にすることで解決できました。 1つはテスト用のWSSpringServletとそれを持たないオリジナルのWSSpringServletです。

この問題に対応するのに時間がかかりました。

+0

こんにちは、あなたの最新の解決策の詳細が分かりますか?:) – hejiaming007

関連する問題