2016-11-04 17 views
0

のWebLogic 12cにJAX-WSのWebサービスを展開する場合、私が問題にのWebLogic 12cの(12.2.1)JAX WS及びサーブレットの問題

を取得しています「weblogic.management.DeploymentException:[HTTP:101401] Webアプリケーションの例でのurl-pattern は/ PlatforrmTestServiceが複数にマッピングされている サーブレット」

クラス:

@WebService(serviceName ="PlatforrmTestService", 
    wsdlLocation="WEB-INF/wsdl/pricing_V10/PlatforrmTestService.wsdl", 
    ) 
@WebServlet(urlPatterns = {"/PlatforrmTestService"}) 
public class TestService extends HttpServlet{ 
... 
} 

同じことを解決するのを助けてください。

答えて

0

@WebServiceで "serviceName"パラメータを指定する場合は、@ WebServletアノテーションを使用しないでください。

WL12.2は、以前のバージョン

レムよりも厳しいようです:私はあなたのweb.xmlにサーブレットとサーブレット・マッピングを持っていないと仮定します。

実際には、WL12.2の@WebServiceアノテーションで@WebServletを使用しないでください。ここでは、クラス名は「serviceNameを」のために使用され、すべてのパブリックメソッドは、WebMethod属性ですデフォルトでは、空のweb.xmlでWL12.2

import javax.jws.WebService; 

@WebService 
public class EchoTestWebService{ 
    public String echoTestWebMethod(String word) { 
     return word; 
    } 
} 

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
     http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 
     version="3.1"> 
</web-app> 

を展開することができ、最も簡単なWSは、 。