忘了说,服务器端 Tomcat . 啥配置也没动。就是添加了个 WSDL 文件(书上的例子)
内容如下:(是它的问题吗?) 没这个文件好像也有问题
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by RoverOnline (Dune.com) -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:serviceNS="http://localhost:8088/axis/HelloService.jws" targetNamespace="http://localhost:8088/axis/HelloService.jws">
<message name="Request">
<part name="inputName" type="xsd:string"/>
</message>
<message name="Response">
<part name="Result" type="xsd:string"/>
</message>
<portType name="HelloServicePortType">
<operation name="echoName">
<input message="serviceNS:Request"/>
<output message="serviceNS:Response"/>
</operation>
</portType>
<binding name="HelloServiceSoapBinding" type="serviceNS:HelloServicePortType">
<operation name="echoName">
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloServicePort" binding="serviceNS:HelloServiceSoapBinding">
<soap:address location="http://localhost:8088/axis/HelloService.jws"/>
</port>
</service>
</definitions>