如果使用ISAPI模式可以,但是升级台麻烦,我像做成CIG模式,但是与ISAPI模式一样设置的,却不能调用! 我的问题与下面的一个未解决的帖子完全一样! 
http://topic.csdn.net/t/20061018/10/5090469.html 
---------------------------- 楼主cbuiler(老公)2006-10-18 10:22:13 在 Delphi / 网络通信/分布式开发 提问 
一个Delphi7编写的  WebServcie  (CGI),  在  Win2k,XP  下都能正常工作,  但在  Win2003  Enterprise  下,  不能正常工作,  在Delphi7中Debug的时候在调用任何一个接口的时候都报下面错误:  
    
  Unable  to  load  WSDL  File/Location:  
  http://192.168.100.33/LcdServiceCGI/LcdService.exe/wsdl/IWSLcdConfigIntf.  Error  [End  tag  'head'  does  not  match  the  start  tag  'META'  
    
  Line:  1  
  <html> <head> <META  name="serviceInspectio]  
    
    
  不知道是什么原因,好像在Win2003环境下,不能正确解析XML 

解决方案 »

  1.   

    IIS当中的CGI执行权限没有打开。
    "Web 服务扩展"下面的"所有未知 CGI 扩展"设置为"允许"(默认为“禁止”)。
      

  2.   

    另外就是要指定到特定的接口,比如http://localhost/Test.exe/wsdl/ITest
      

  3.   

    CGI 扩展"设置为"允许" -------------已经开了! 浏览EXE都可以看到提供的接口,就是更进一般获取WSDL不行
      

  4.   

    输入http://IP地址/Test.exe/wsdl这个也应该可以返回一个XML文档
      

  5.   

    谁有WIN2003我把程序发给你(简单的测试源程序).你可以在自己机器上测试!
      

  6.   

    我这里也是win2k3的系统。比如我生成了一个ITest接口,程序为Test.exe
    那么使用工具wsdlimp.exe时输入的就是http://localhost/Test.exe/wsdl/ITest
      

  7.   

    我知道调用的时候要输入http://localhost/Test.exe/wsdl/ITest 到具体的接口现在就是输入http://localhost/Test.exe/wsdl/ITest这个出错!所以我一步步判断是到什么地方出错的先输入http://localhost/Test.exe 有返回
    输入http://localhost/Test.exe/wsdl没有放回了(也不是没有返回,而是返回的与输入http://localhost/Test.exe的一样,应该是不对的)如果输入http://localhost/Test.exe/wsdl/ITest,返回还是与http://localhost/Test.exe返回一样! 
      

  8.   

    这个我倒没有碰到。不知道是否跟SP有关系。我这里是Win2k3 Enterprise + SP2(V5.2.3790),IIS6
      

  9.   

    [code=BatchFile]wsdlimp.exe http://localhost/PMyTest2.exe/wsdl/IMyTest2[/code]
    一切正常。但是执行的时候就报错Unknow SOAPAction "http://tempuri.org/ReturnStr"
      

  10.   

    执行 wsdlimp.exe http://localhost/PMyTest2.exe/wsdl/IMyTest2 返回的是XML还是Html表单执行什么,出现Unknow SOAPAction "http://tempuri.org/ReturnStr
      

  11.   

    请把你编译后的EXE,通过邮件发给我好吗!
      

  12.   

    我看到的情况是MyTest2Intf当中绑定了URI "http://tempuri.org"这个有问题。initialization
      { Invokable interfaces must be registered }
      CoInitialize(nil);
      //InvRegistry.RegisterInterface(TypeInfo(IMyTest2),'http://tempuri.org/','utf-8');
      //InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IMyTest2),'http://tempuri.org/%operationName%');
      InvRegistry.RegisterInterface(TypeInfo(IMyTest2));
      CoUnInitialize;
    这样子修改就正常了。
      

  13.   

    你把修改正常后的exe发给我!//InvRegistry.RegisterInterface(TypeInfo(IMyTest2),'http://tempuri.org/','utf-8');
      //InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IMyTest2),'http://tempuri.org/%operationName%');
    这两句是我病急乱投医,加上去测试的!加上去之前我这也是不行的!我想看看你的exe在我这能不能运行,如果可以,那就是不能在XP下编译!
      

  14.   

    先声明,我的编译环境是Delphi2007
    wsdlimp.exe执行后返回的是正常的XML
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IMyTest2service" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      <message name="ReturnStr0Request"/>
      <message name="ReturnStr0Response">
        <part name="return" type="xs:string"/>
      </message>
      <portType name="IMyTest2">
        <operation name="ReturnStr">
          <input message="tns:ReturnStr0Request"/>
          <output message="tns:ReturnStr0Response"/>
        </operation>
      </portType>
      <binding name="IMyTest2binding" type="tns:IMyTest2">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="ReturnStr">
          <soap:operation soapAction="urn:MyTest2Intf-IMyTest2#ReturnStr" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:MyTest2Intf-IMyTest2"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:MyTest2Intf-IMyTest2"/>
          </output>
        </operation>
      </binding>
      <service name="IMyTest2service">
        <port name="IMyTest2Port" binding="tns:IMyTest2binding">
          <soap:address location="http://localhost/PMyTest2.exe/soap/IMyTest2"/>
        </port>
      </service>
    </definitions>通过wsdlimp生成的单元调用Webservice返回上述错误。
      

  15.   

    用你修改后的exe,也不能在我的win2003上发布.
      

  16.   

    不清楚你现在的环境当中是否有什么特别的处理,比如是否有HTTP Filter等给做了什么处理。
      

  17.   

    你在IE中输入 http://localhost/PMyTest2.exe/wsdl/IMyTest2 可以返回XML吗
      

  18.   

    就是我上面贴出来的XML代码。
      

  19.   

    上面写错了,那不是wsdlimp.exe生成的,它只能生成.pas/.cpp,而不会生成XML.
      

  20.   

    你在IE中访问http://localhost/PMyTest2.exe/wsdl/IMyTest2 可以返回XML吗
      

  21.   

    问题解决了!在win2003下安装delphi 2007 重新编译就可以了!编译后的CGI,不论是delphi,java,.net 都可以调用!