我的开发环境是eclipse3.2+tomcat5
出现的错误是The AXIS engine could not find a target service to invoke! targetService is ITest
我的web Service是选的start service级,勾了Publish the Web Service
发布的是类ITest的hello(string name)方法
package com.tomato;
public class ITest {
public String hello(String name){
return name+ " : Hello World ";
}
}
----------------------------------
生成wsdl时没发生错误
ITest.wsdl
<?xml version= "1.0 " encoding= "UTF-8 "?>
<wsdl:definitions targetNamespace= "http://tomato.com " xmlns:apachesoap= "http://xml.apache.org/xml-soap " xmlns:impl= "http://tomato.com " xmlns:intf= "http://tomato.com " xmlns:wsdl= "http://schemas.xmlsoap.org/wsdl/ " xmlns:wsdlsoap= "http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:xsd= "http://www.w3.org/2001/XMLSchema ">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema elementFormDefault= "qualified " targetNamespace= "http://tomato.com " xmlns= "http://www.w3.org/2001/XMLSchema ">
<element name= "hello ">
<complexType>
<sequence>
<element name= "in0 " type= "xsd:string "/>
</sequence>
</complexType>
</element>
<element name= "helloResponse ">
<complexType>
<sequence>
<element name= "helloReturn " type= "xsd:string "/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name= "helloResponse ">
<wsdl:part element= "impl:helloResponse " name= "parameters "/>
</wsdl:message>
<wsdl:message name= "helloRequest ">
<wsdl:part element= "impl:hello " name= "parameters "/>
</wsdl:message>
<wsdl:portType name= "ITest ">
<wsdl:operation name= "hello ">
<wsdl:input message= "impl:helloRequest " name= "helloRequest "/>
<wsdl:output message= "impl:helloResponse " name= "helloResponse "/>