在Spring ws-SOAP web服务中找不到终结点
我正在尝试使用SpringWS创建web服务。它部署在Tomcat7上。当我通过SOAP UI请求web服务时,我在响应帧中没有收到任何内容(原始:HTTP/1.1 404未找到服务器:Apache Coyote/1.1日期:2015年5月14日星期四09:00:29 GMT内容长度:0) TomCat日志文件中有下一个信息: 14.05.2015 11:44:02.719 ws.server.EndpointNotFound[WARN]未找到[SaajSoapMessage{}internalHistRequest]的端点映射 我的端点类看起来像:在Spring ws-SOAP web服务中找不到终结点,soap,wsdl,spring-ws,endpoint,Soap,Wsdl,Spring Ws,Endpoint,我正在尝试使用SpringWS创建web服务。它部署在Tomcat7上。当我通过SOAP UI请求web服务时,我在响应帧中没有收到任何内容(原始:HTTP/1.1 404未找到服务器:Apache Coyote/1.1日期:2015年5月14日星期四09:00:29 GMT内容长度:0) TomCat日志文件中有下一个信息: 14.05.2015 11:44:02.719 ws.server.EndpointNotFound[WARN]未找到[SaajSoapMessage{}internal
package com.mayacomp.endpoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;
import com.mayacomp.mayaserv.InternalHistRequest;
import com.mayacomp.mayaserv.InternalHistResponse;
import com.mayacomp.services.PAppService;
@Endpoint
public class WsEndpoint {
private static final String TARGET_NAMESPACE = "http://abc.mayacomp.com/power-appl";
@Autowired
public PAppService PAppService_i;
@PayloadRoot(localPart = "interHistRequest", namespace = TARGET_NAMESPACE)
public @ResponsePayload interHistResponse getinterHist(@RequestPayload interHistRequest request) {
interHistResponse _return = new interHistResponse();
_return.setClientID(new java.math.BigInteger("428239 22945935239155481381"));
try
{
/*stubs for return obeject */
return _return;
}
catch (java.lang.Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
public void setPAppService(PAppService PAppService_p)
{
this.PAppService_i = PAppService_p;
}
}
Spring-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.mayacomp.services"/>
<!--<context:component-scan base-package="com.mayacomp.endpoint"/>-->
<sws:annotation-driven />
<bean id="interCreditService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" lazy-init="true">
<property name="schemaCollection">
<bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true" />
<property name="xsds">
<list>
<value>schemas/power-appl.xsd</value>
</list>
</property>
</bean>
</property>
<property name="portTypeName" value="interCreditService"/>
<property name="serviceName" value="PowerApplServices" />
<property name="locationUri" value="/endpoints"/>
</bean>
</beans>
schemas/power-appl.xsd
SOAP请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pow="http://abc.mayacomp.com/power-appl" xmlns:end="http://localhost:8080/abc-power-appl-ws/endpoints" xmlns:abc="http://localhost:8080/abc-power-appl-ws">
<soapenv:Header/>
<soapenv:Body>
<pow:interHistRequest>
<pow:requestHeader>
<pow:requestUID>?</pow:requestUID>
<pow:requestTimestamp>?</pow:requestTimestamp>
<pow:systemID>?</pow:systemID>
</pow:requestHeader>
<pow:clientID>?</pow:clientID>
</pow:interHistRequest>
</soapenv:Body>
</soapenv:Envelope>
?
?
?
?
如何设置服务以返回响应并避免没有端点映射错误?看起来应该是这样,乍一看,您并不是在“扫描”端点包