我也觉得奇怪,在另外一个生成的wsdl中有portType的:
xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://
spring.demo/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
name="HelloWorldImplService" targetNamespace="
http://spring.demo/">
- <wsdl:types>
- <xsd:schema xmlns:tns="
http://model.spring.demo"
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="
http://model.spring.demo" xmlns:xsd="http://
www.w3.org/2001/XMLSchema">
- <xsd:complexType name="Users">
- <xsd:sequence>
<xsd:element minOccurs="0" name="sex" nillable="true"
type="xsd:string" />
<xsd:element minOccurs="0" name="userId" nillable="true"
type="xsd:string" />
<xsd:element minOccurs="0" name="userName" nillable="true"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
- <xsd:complexType name="ArrayOfUsers">
- <xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Users"
nillable="true" type="tns:Users" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
- <xsd:schema xmlns:ns0="
http://model.spring.demo"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="
http://spring.demo/" xmlns:tns="
http://spring.demo/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<xsd:element name="finds" type="tns:finds" />
- <xsd:complexType name="finds">
<xsd:sequence />
</xsd:complexType>
<xsd:element name="findsResponse" type="tns:findsResponse" />
- <xsd:complexType name="findsResponse">
- <xsd:sequence>
<xsd:element name="return" type="ns0:ArrayOfUsers" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="sayHi" type="tns:sayHi" />
- <xsd:complexType name="sayHi">
- <xsd:sequence>
<xsd:element minOccurs="0" name="arg0" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="sayHiResponse" type="tns:sayHiResponse" />
- <xsd:complexType name="sayHiResponse">
- <xsd:sequence>
<xsd:element minOccurs="0" name="return" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="finds">
<wsdl:part element="tns:finds" name="parameters" />
</wsdl:message>
- <wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters" />
</wsdl:message>
- <wsdl:message name="findsResponse">
<wsdl:part element="tns:findsResponse" name="parameters" />
</wsdl:message>
- <wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters" />
</wsdl:message>
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="finds">
<wsdl:input message="tns:finds" name="finds" />
<wsdl:output message="tns:findsResponse" name="findsResponse" />
</wsdl:operation>
- <wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi" />
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HelloWorldImplServiceSoapBinding"
type="tns:HelloWorld">
- <wsdl:operation name="finds">
<soap:operation soapAction="" style="document" />
- <wsdl:input name="finds">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="findsResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document" />
- <wsdl:input name="sayHi">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="sayHiResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HelloWorldImplService">
- <wsdl:port binding="tns:HelloWorldImplServiceSoapBinding"
name="HelloWorldImplPort">
<soap:address location="
http://127.0.0.1:81/cxfspring/ws/
HelloWorld" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
我在接口实现类中是进行了这样的描述
@WebService(portName = "PersonQueryPort", serviceName =
"PersonQueryService", targetNamespace = "
http://proxy.org/
personquery", endpointInterface =
"org.proxyplatform.webservices.PersonQuery")
而上面这个实现类只进行了这样的描述:
@WebService(endpointInterface="demo.spring.HelloWorld")
不知是不是与这有关,我在接口包中使用了PersonQuery.aegis.xml文件进行描述
<?xml version="1.0" encoding="UTF-8"?>
<mappings>
<mapping>
<method name="findsAllResidentPopulation">
<return-type
componentType="org.proxyplatform.common.model.ResidentPopulation" /
>
</method>
</mapping>
<mapping>
<method name="findAllTempPopulations">
<return-type
componentType="org.proxyplatform.common.model.TempPopulation" />
</method>
</mapping>
</mappings>
不知是不是这样进行类型配置否?
public List<ResidentPopulation>
findsAllResidentPopulation(Stringsql);
这方法是这样进行的,由客户端调用并传一个String的参数过来,再由findsAllResidentPopulation调用本地的其他类的方法
来进行查询;