How to Consume a SOAP Web Service in VB6?

前端 未结 3 664
后悔当初
后悔当初 2020-12-22 04:37

I want to consume a file which is wsdl with VB6 , anyone can help me? Or how can I convert wsdl to proxy class ?

相关标签:
3条回答
  • 2020-12-22 05:02

    You can look at either Microsoft's SOAP Toolkit or PocketSOAP. Might be best to look at both, but don't despair over the learning curve. Both offer simple approaches for simple situations as well as complex solutions for more complex ones.

    0 讨论(0)
  • 2020-12-22 05:03

    Basicly you can use the SOAP moniker like this

    Set oProxy = GetObject("soap:wsdl=http://server/folder/service.wsdl")
    oProxy.Method "Param1"
    

    You can check out the answers to What is the best way to consume a web service from VB6?

    0 讨论(0)
  • 2020-12-22 05:15

    First, you have a problem with terminology: you do not want to consume the file. The file is a description of a web service. It is the web service that you want to consume. The WSDL gives you all the information you need to consume it.

    There are methods to consume a web service in VB6. In the same way you shouldn't be using VB6, you shouldn't be using any of these methods.

    You should use VB.NET to create a small COM component. This component will consume the service by using "Add Service Reference" to create proxy classes. You will be able to use modern tools and techniques to develop and debug this component.

    You can then consume the COM component from VB6, just like any other COM component.

    0 讨论(0)
提交回复
热议问题