0
我们开发了基于Apache CXF
的web服务。Apache CXF Web服务在AJAX调用上失败
当正常访问使用APIGEE
或使用JaxWsProxyFactoryBean
(Apache 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。
请分享您的输入。 谢谢。