用C#写了个webservices,提供两个接口updata,downdata做数据交换用,在c#中updata和downdata都用dataset做为参数.
现在想用delphi7连接这个webservices传送数据.请问如何实现.
讲讲大体步骤就ok,还有是不是delphi也用dataset作为数据传送的类型呢?
最好举个简单的例子

解决方案 »

  1.   

    file->new->others->webservices->wsdl importer把webservices的wsdl文件导入,会自动帮你生成函数声明单元的。
      

  2.   

    >>也用dataset作为数据
    這個可能比較麻煩, 沒試過傳 dataset的
      

  3.   

    http://bdn.borland.com/article/0,1410,28631,00.html
    Use ADO.NET Datasets in Delphi應該能解決你的問題
      

  4.   

    Let's start with a simple .NET service, as given in http://services.pagedownweb.com/ZipCodes.asmx. I've used the Web Service Importer in File | New | Other | Web Services and generated the Pascal files. Here's the declaration that looks odd: 
      rtnZipDSResult = class(TRemotable)
      private
        Fs_schema: String;
      published
        property s_schema: String read Fs_schema write Fs_schema;
      end;  ZipCodesSoap = interface(IInvokable)
      ['{FEF279A0-29EE-CF0B-FBB2-7DD79A5502CE}']
        ...
    function  rtnZipDS(const City_IN: String; const State_IN: String): rtnZipDSResult; stdcall;
    ...
      end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      (HTTPRIO1 as ZipCodesSoap).rtnZipDS(edtCity.Text, edtState.Text);
    end;procedure TForm1.HTTPRIO1AfterExecute(const MethodName: String;
      SOAPResponse: TStream);
    begin
      SOAPResponse.Position := 0;
      Memo1.Lines.LoadFromStream(SOAPResponse);  SOAPResponse.Position := 0;
    end;procedure TForm1.HTTPRIO1AfterExecute(const MethodName: String;
      SOAPResponse: TStream);
    var
      XMLDoc: IXMLDocument;
    begin
      SOAPResponse.Position := 0;
      Memo1.Lines.LoadFromStream(SOAPResponse);  ClientDataset1.Active := FALSE;
      SOAPResponse.Position := 0;
      XMLDoc := NewXMLDocument;
      XMLDoc.Encoding := SUTF8;
      SOAPResponse.Position := 0;
      XMLDoc.LoadFromStream(SOAPResponse);  XMLTransformProvider1.TransformRead.SourceXmlDocument := XMLDoc.GetDOMDocument;
      ClientDataset1.Active := TRUE;
    end;
      

  5.   

    var
      vWsObj:Variant;
      sUrl:String;
    begin
      vWsObj := CreateOleObject('MSSOAP.SoapClient');
      vWsObj.mssoapinit('http://192.168.0.68/dataexchange/dataexchange.asmx?wsdl');
      edit2.text := vWsObj.hello(edit1.text);
    end
    这样可以完成简单的调用.但是,如何处理dataset呢?