3
我使用JAX-WS,netbeans 7.0和glassfish-3.1.1編寫web服務。 我嘗試派遣SOAPHandler我的網絡服務使用@HandlerChain:jax-ws,glassfish和@HandlerChain
package ws;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.HandlerChain;
@WebService(serviceName = "ServerInfo", portName="ServerInfoPort")
@HandlerChain(file="handler-chain.xml")
public class ServerInfo {
@WebMethod(operationName="getServerName")
public String getServerName()
{
return "test server";
}
}
處理-chain.xml:
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
<handler-chain>
<handler>
<handler-name>ws.SoapMessageHandler</handler-name>
<handler-class>ws.SoapMessageHandler</handler-class>
</handler>
</handler-chain>
</handler-chains>
但在日誌中的GlassFish打印:
SEVERE: component referenced from annotation symbol cannot be found
symbol: javax.jws.HandlerChain
location: class ws.ServerInfo
幫幫我!請!
有沒有解決這個問題的方法?當我重新部署戰爭時,我總是不得不重新啓動GF。 –