我用delphi 7 开发的web service,sap无法导入其wsdl生成代理,请问这种情况下,用delphi来开发的可行性。如果哪位大侠做过,还请相告,谢谢

解决方案 »

  1.   

    我拿delphi下做的webservice生成的wsdl文件,与 VS2008(C#)下做的webservice的wsdl文件比较确实不一样,感觉我用delphi做的那个wsdl可能不太符合标准,是不是做的时候有什么选项、设置,请大家帮帮忙,谢谢。
      

  2.   

    请看下面的wsdl文件内容:
    vs2008 C# 
    ----------------------------------------------------------------------------------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
          <s:element name="SendData_Test">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="psCode" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="psDate" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="psDate_curr" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="SendData_TestResponse">
            <s:complexType>        ......
    ---------------------------------------------------------------------------------------------------------
    delphi 7
    ---------------------------------------------------------------------------------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ISendData_Webserviceservice" 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="SendData_Test0Request">
        <part name="psCode" type="xs:string"/>
        <part name="psDate" type="xs:string"/>
        <part name="psDate_curr" type="xs:string"/>
        <part name="psMessage" type="xs:string"/>
      </message>
      <message name="SendData_Test0Response">
        <part name="psMessage" type="xs:string"/>
        <part name="return" type="xs:string"/>
      </message>
      <portType name="ISendData_Webservice">
        <operation name="SendData_Test">
          <input message="tns:SendData_Test0Request"/>
          <output message="tns:SendData_Test0Response"/>
          ......
    ---------------------------------------------------------------------------------------------------------
      

  3.   

    现在我有点怀疑delphi开发web service 的通用性,好像不如.NET,如果是这样,怎么让delphi开发的程序能成为较通用的Web service呢?谢谢大家的帮助和建议。
      

  4.   

    可能使用的标准不一样了,delphi7还是2002年的,我在使用java做webservice,使用axis发布的webservice,delphi7可以正常调用,而使用jax-ws发布的webservice,则连delphi2009都不能正常调用。
    axis是按JAX-RPC 1.0 标准设计,jax-ws是JAX-RPC1.0的后续,当初是JAX-RPC2.0,后来改为JAX-WS。
      

  5.   

    以前我也做过,delphi自己做的自己调用,很舒服。
    如果和java或者.net,死活就是不通。
    并且,delphi 7的WebService中BUG比较多。
    除非你是高手,可以将DELPHI 7 的底层改掉。
    否则:
    建议换更高版本或者用其他语言开发。
      

  6.   

    您好,我想问一下,SAP调用dotnet的web服务,对web服务有什么要求吗? 需要装额外得软件吗?是不是在dotnet平台下写web服务就可以了?