2011-12-14 126 views
0

我們開發了基於Apache CXF的web服務。Apache CXF Web服務在AJAX調用上失敗

當正常訪問使用APIGEE或使用JaxWsProxyFactoryBeanApache CXF的clinet)時,它工作正常。但是,當我試圖通過提供通過AJAX的SOAP地址調用它來訪問,這是給我以下異常:

INFO: Interceptor has thrown exception, unwinding now 
org.apache.cxf.interceptor.Fault: No such operation: (HTTP GET PATH_INFO: /tata-ws-1.0/TataWeb) 
     at org.apache.cxf.interceptor.URIMappingInterceptor.handleMessage(URIMappingInterceptor.java:77) 
     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) 
     at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89) 
     ... 

這是我的AJAX調用的代碼發生在一個按鈕的點擊

<a onclick="sendRequest('GET','http://localhost:8080/tata-ws-1.0/services/TataWeb')"href="#"> 

獲取數據:

function sendRequest(method, url) 
{ 
    method == 'POST'; 
    { 
     http.open(method,url,true); 
     http.onreadystatechange = handleResponse; 
     http.send(null); 
    } 
} 

的WSDL的URL是正確的,因爲當我使用 http://localhost:8080/tata-ws-1.0/services/TataWeb?wsdl它顯示的是WebService的WSDL。

請分享您的輸入。 謝謝。

回答