请教,用java axis2生成的 web service 用delphi 2007应该

B

bfox

Unregistered / Unconfirmed
GUEST, unregistred user!
用java 写了个简单的web service 包括一个weather 类,和 getweather ,setweather 两个方法。生成的wsdl文件如下

- <wsdl:definitions xmlns:axis2="http://service.pojo.sample" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://data.pojo.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://service.pojo.sample/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://service.pojo.sample">
<wsdl:documentation> Weather POJO Service </wsdl:documentation>
- <wsdl:types>
- <xs:schema xmlns:ax21="http://data.pojo.sample/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://data.pojo.sample/xsd">
<xs:element name="Weather" type="ax21:Weather" />
- <xs:complexType name="Weather">
- <xs:sequence>
<xs:element name="forecast" nillable="true" type="xs:string" />
<xs:element name="howMuchRain" type="xs:float" />
<xs:element name="rain" type="xs:boolean" />
<xs:element name="temperature" type="xs:float" />
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ns="http://service.pojo.sample/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.pojo.sample/xsd">
- <xs:element name="getWeatherResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element name="return" nillable="true" type="ns0:Weather" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="setWeather">
- <xs:complexType>
- <xs:sequence>
<xs:element name="weather" nillable="true" type="ns0:Weather" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getWeatherMessage" />
- <wsdl:message name="getWeatherResponse">
<wsdl:part name="part1" element="ns1:getWeatherResponse" />
</wsdl:message>
- <wsdl:message name="setWeatherMessage">
<wsdl:part name="part1" element="ns1:setWeather" />
</wsdl:message>
- <wsdl:portType name="WeatherServicePortType">
- <wsdl:eek:peration name="getWeather">
<wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getWeatherMessage" wsaw:Action="urn:getWeather" />
<wsdl:eek:utput message="axis2:getWeatherResponse" />
</wsdl:eek:peration>
- <wsdl:eek:peration name="setWeather">
<wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:setWeatherMessage" wsaw:Action="urn:setWeather" />
</wsdl:eek:peration>
</wsdl:portType>
- <wsdl:binding name="WeatherServiceSOAP11Binding" type="axis2:WeatherServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:eek:peration name="getWeather">
<soap:eek:peration soapAction="urn:getWeather" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:eek:utput>
<soap:body use="literal" />
</wsdl:eek:utput>
</wsdl:eek:peration>
- <wsdl:eek:peration name="setWeather">
<soap:eek:peration soapAction="urn:setWeather" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:eek:peration>
</wsdl:binding>
- <wsdl:binding name="WeatherServiceSOAP12Binding" type="axis2:WeatherServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:eek:peration name="getWeather">
<soap12:eek:peration soapAction="urn:getWeather" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:eek:utput>
<soap12:body use="literal" />
</wsdl:eek:utput>
</wsdl:eek:peration>
- <wsdl:eek:peration name="setWeather">
<soap12:eek:peration soapAction="urn:setWeather" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
</wsdl:eek:peration>
</wsdl:binding>
- <wsdl:binding name="WeatherServiceHttpBinding" type="axis2:WeatherServicePortType">
<http:binding verb="POST" />
- <wsdl:eek:peration name="getWeather">
<http:eek:peration location="getWeather" />
- <wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
- <wsdl:eek:utput>
<mime:content type="text/xml" />
</wsdl:eek:utput>
</wsdl:eek:peration>
- <wsdl:eek:peration name="setWeather">
<http:eek:peration location="setWeather" />
- <wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
</wsdl:eek:peration>
</wsdl:binding>
- <wsdl:service name="WeatherService">
- <wsdl:port name="WeatherServiceSOAP11port_http" binding="axis2:WeatherServiceSOAP11Binding">
<soap:address location="http://61.144.225.35:80/axis2/services/WeatherService" />
</wsdl:port>
- <wsdl:port name="WeatherServiceSOAP12port_http" binding="axis2:WeatherServiceSOAP12Binding">
<soap12:address location="http://61.144.225.35:80/axis2/services/WeatherService" />
</wsdl:port>
- <wsdl:port name="WeatherServiceHttpport1" binding="axis2:WeatherServiceHttpBinding">
<http:address location="http://61.144.225.35:80/axis2/rest/WeatherService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
-------------------------------------------------------------------------------------------------------------------------------
我看过网上的一些delphi调用web service 的例子,在那些例子里,根据wsdl自动生成的接口里面都会有一个 ××××soap类,然后通过调用那些类来调用web service的方法。
可是我在 delphi 2007里面根据这个wsdl生成的接口里面没有那个类, 用delphi 7.0 生成的接口里面什么都没有。 我估计delphi7 生成不了接口应该是wsdl的版本问题。 axis2 生成的wsdl应该是2.0版本的。 

我的问题是   delphi 2007生成的接口应该如何调用呢? 哪位朋友做过类似的项目?指点一下?
 
郁闷,连看的人都没有
 
顶部