Soap of VB6

Source: Internet
Author: User

According to the information found on the internet, Ms has a component that can be used to support VB6 to access the soap interface.

After installing mssoaptoolkit.exe and trying it, I found that the WebService written in C # Or VB.net can be accessed.

However, if the interface is written in other languages, various inexplicable errors may occur, such as incorrect parameter types or initialization failures (which should be caused by parsing the WSDL message ).

In any case, VB6 provides a way to access WebService.

If you are not at ease, you can construct an HTTP object and parse the XML message of the interface. In this way, you can call the WebService in any language through VB6.

1' before use, please reference "Microsoft soap Type Library (V3.0)" 2 'Code by lichmama from cnblogs.com 3 private sub form_load () 4 dim objsc as new soapclient30 5 Dim RET as variant 6 7'initialize soap 8 call objsc. mssoapinit ("http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx? WSDL ") 9 10' using the method of webservice11 ret = objsc. getregioncountry () 12 13 debug. print "returntype:" & typename (RET) 14 for each R in ret15 debug. print R16 next17 18 set objsc = nothing19 end sub

 

 

Returntype: string () Algeria, 3320 Argentina, 3522 Oman, 3170 Azerbaijan, 3176 Egypt, 3317 Ethiopia, 3314 Ireland, 3246...

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.