我正在尝试从本教程创建一个示例项目,并在tomcat-6.0.14上运行服务器端项目,但是当我尝试使用以下xml的SoapUI调用webservice时:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://mycompany.com/hr/schemas">
<soapenv:Header/>
<soapenv:Body>
<sch:HolidayRequest>
<!--You may enter the following 2 items in any order-->
<sch:Holiday>
<sch:StartDate>2006-07-03</sch:StartDate>
<sch:EndDate>2006-07-03</sch:EndDate>
</sch:Holiday>
<sch:Employee>
<sch:Number>42</sch:Number>
<sch:FirstName>Kevin</sch:FirstName>
<sch:LastName>Garnett</sch:LastName>
</sch:Employee>
</sch:HolidayRequest>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
返回xml是:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xml:lang="en">No adapter for endpoint [public void com.mycompany.hr.ws.HolidayEndpoint.handleHolidayRequest(org.jdom.Element) throws java.lang.Exception]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)
为什么没有端点适配器发生?我用Google搜索,但没有找到根本原因.有人可以提供一些帮助吗?
这是我的代码和配置:
的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 …Run Code Online (Sandbox Code Playgroud)