关于WebServices的一个神奇问题

BORLANDSUN 2009-07-03 03:35:38
我用Delphi7的WSDL Importer导入一个Wsdl的xml文档,结果生成的代码只是一个空架子。而用VS2005就能成功生成代码。
XML文件如下:

<wsdl:definitions xmlns:axis2="http://axisversion.sample" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://axisversion.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/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://axisversion.sample"><wsdl:documentation>
This service is to get the running Axis version
</wsdl:documentation><wsdl:types><xs:schema xmlns:ns="http://axisversion.sample/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axisversion.sample/xsd">
<xs:element name="getVersionFault">
<xs:complexType>
<xs:sequence>
<xs:element name="getVersionFault" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getVersionResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></wsdl:types><wsdl:message name="getVersionMessage" /><wsdl:message name="getVersionResponse"><wsdl:part name="part1" element="ns0:getVersionResponse" /></wsdl:message><wsdl:message name="getVersionFault"><wsdl:part name="part1" element="ns0:getVersionFault" /></wsdl:message><wsdl:portType name="VersionPortType"><wsdl:operation name="getVersion"><wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getVersionMessage" wsaw:Action="urn:getVersion" /><wsdl:output message="axis2:getVersionResponse" /><wsdl:fault message="axis2:getVersionFault" name="getVersionFault" /></wsdl:operation></wsdl:portType><wsdl:binding name="VersionSOAP11Binding" type="axis2:VersionPortType"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="getVersion"><soap:operation soapAction="urn:getVersion" style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output><wsdl:fault name="getVersionFault"><soap:body use="literal" /></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:binding name="VersionSOAP12Binding" type="axis2:VersionPortType"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="getVersion"><soap12:operation soapAction="urn:getVersion" style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output><wsdl:fault name="getVersionFault"><soap12:fault use="literal" name="getVersionFault" /></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:binding name="VersionHttpBinding" type="axis2:VersionPortType"><http:binding verb="POST" /><wsdl:operation name="getVersion"><http:operation location="getVersion" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="Version"><wsdl:port name="VersionSOAP11port_http" binding="axis2:VersionSOAP11Binding"><soap:address location="http://portal1.ahu.edu.cn:8080/wsc/services/Version" /></wsdl:port><wsdl:port name="VersionSOAP12port_http" binding="axis2:VersionSOAP12Binding"><soap12:address location="http://portal1.ahu.edu.cn:8080/wsc/services/Version" /></wsdl:port><wsdl:port name="VersionHttpport1" binding="axis2:VersionHttpBinding"><http:address location="http://portal1.ahu.edu.cn:8080/wsc/rest/Version" /></wsdl:port></wsdl:service></wsdl:definitions>

忘高手解答!
...全文
52 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
gyk120 2009-07-06
  • 打赏
  • 举报
回复
换高版本的Delphi,还有,Delphi最好是完整版的,精简绿化等等一概不要
BORLANDSUN 2009-07-06
  • 打赏
  • 举报
回复
gyk120说的对。我昨天用2009版本试了一下,已经成功了。
Web Service服务是axis2.0版本的。昨天从网上查了一下,axis2.0向下不兼容,唉~,怪不得SUN要被并购了,东西也是越搞越烂。
lantianhf 2009-07-05
  • 打赏
  • 举报
回复
我想还是你的数据连接有问题,好好检查一下配置!

5,927

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧