小编Ric*_*ner的帖子

Delphi XE2 HTTPRIO无法检索服务/端口的URL端点

我正在将Delphi 2007程序转换为Delphi XE2并出现以下错误消息:

无法从WSDL"http:// ....."检索服务/端口"/"的URL端点

我连接的服务是用Delphi 2007编写的.

在2007年,它编译并运行没有问题.在具有相同代码的XE2上,它会因错误而丢失.

我尝试使用新的WSDL导入器重新导入接口,默认设置但没有快乐.

我也尝试过设置端口和服务名称,错误仍然存​​在.不确定哪些信息有用,但据我所知它是连接.

这是我正在使用的方法的操作

<operation name="CheckRegistration">
  <soap:operation soapAction="urn:ScubaUpdateWSIntf-IScubaUpdateWS#CheckRegistration" style="rpc"/>
  <input>
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"     namespace="urn:ScubaUpdateWSIntf-IScubaUpdateWS"/>
  </input>
  <output>
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ScubaUpdateWSIntf-IScubaUpdateWS"/>
  </output>
</operation> 
Run Code Online (Sandbox Code Playgroud)

这是消息:

<message name="CheckRegistration10Request">
  <part name="centreId" type="xs:int"/>
  <part name="centreName" type="xs:string"/>
  <part name="checkActiveOnly" type="xs:boolean"/>
</message>
<message name="CheckRegistration10Response">
  <part name="return" type="xs:boolean"/>
</message>
Run Code Online (Sandbox Code Playgroud)

除了导入WSDL之外,抛出HTTPRIO并使用调用方法

(HTTPRIO1 as IScubaUpdateWS).CheckRegistration(strtoint(tcentre),tcentreName,true);
Run Code Online (Sandbox Code Playgroud)

我不认为我正在做任何其他事情,因为我说同样的代码适用于Delphi 2007.

delphi wsdl webservice-client delphi-2010 delphi-xe2

7
推荐指数
1
解决办法
7123
查看次数