webservice系列教学(3)

4.7使用vb.net调用
无需下载任何组件
新建项目Visual Basic项目windows应用程序
在解决方案资源管理器中添加web引用,输入wsdl文件所在地址。
将web引用改名为yundan.
yundan.(service_name)即可引用
*需引用System.web.services*
例程:
  1. Public Class Form1   
  2.         Inherits System.Windows.Forms.Form   
  3. #Region " Windows 窗体设计器生成的代码 "   
  4.     Public Sub New()   
  5.         MyBase.New()   
  6.         InitializeComponent()   
  7.     End Sub   
  8.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)   
  9.         If disposing Then   
  10.             If Not (components Is Nothing) Then   
  11.                 components.Dispose()   
  12.             End If   
  13.         End If   
  14.         MyBase.Dispose(disposing)   
  15.     End Sub   
  16.     Private components As System.ComponentModel.IContainer   
  17.     Friend WithEvents Label1 As System.Windows.Forms.Label   
  18.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox   
  19.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()   
  20.         Me.Label1 = New System.Windows.Forms.Label()   
  21.         Me.TextBox1 = New System.Windows.Forms.TextBox()   
  22.         Me.SuspendLayout()   
  23.         Me.Label1.AutoSize = True  
  24.         Me.Label1.Location = New System.Drawing.Point(96, 40)   
  25.         Me.Label1.Name = "Label1"  
  26.         Me.Label1.Size = New System.Drawing.Size(91, 14)   
  27.         Me.Label1.TabIndex = 0  
  28.         Me.Label1.Text = "Webservice演示"  
  29.         Me.TextBox1.Location = New System.Drawing.Point(88, 144)   
  30.         Me.TextBox1.Name = "TextBox1"  
  31.         Me.TextBox1.TabIndex = 1   
  32.         Me.TextBox1.Text = "TextBox1"  
  33.         Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)   
  34.         Me.ClientSize = New System.Drawing.Size(292, 273)   
  35.         Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox1, Me.Label1})   
  36.         Me.Name = "Form1"  
  37.         Me.Text = "VB.net webserive演示"  
  38.         Me.ResumeLayout(False)   
  39.     End Sub   
  40. #End Region   
  41.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load   
  42.         Dim cc As yundan.Service1 = New yundan.Service1()   
  43.         TextBox1.Text = cc.test(12, 123)   
  44.     End Sub   
  45. End Class   
4.8使用vb6.0调用
需下载msSoapToolkit20.exe
添加引用:Microsoft Soap Type Library
位置:”C:\Program Files\Common Files\MSSoap\Binaries\ MSSOAP1.dll”
    调用方法:
    Dim cc As New MSSOAPLib.SoapClient
    例程:
    新建工程标准EXE添加3个textbox控件,text1,text2,text3添加一个button控件Command1
    代码如下:
  1. Option Explicit   
  2. Dim cc As New MSSOAPLib.SoapClient   
  3. Private Sub Command1_Click()   
  4. cc.mssoapinit "http://192.168.0.4/yundan/Service1.asmx?WSDL"   
  5. Me.Text3.Text = cc.test(CInt(Text1.Text), CInt(Text2.Text))   
  6. End Sub  
4.9使用vbscript调用
需下载msSoapToolkit20.exe
引用:MSSOAP.SoapClient
    例程:
  1. Option Explicit   
  2. Const WSDL_URL = "http://192.168.0.4/yundan/service1.wsdl"  
  3. WScript.echo "Connecting: " & WSDL_URL   
  4. Dim Calc   
  5. Set Calc = CreateObject("MSSOAP.SoapClient")   
  6. Calc.mssoapinit WSDL_URL   
  7. Dim Answer   
  8. Answer = Calc.test(14,28)   
  9. WScript.Echo "14+28=" & Answer  
将其存成domo.vbs文件,直接双击运行。
4.10使用vc调用
需下载mssoaptoolkit20.exe
    引用
#import "msxml3.dll"
using namespace msxml2;

#import "c:\program files\common files\mssoap\binaries\mssoap1.dll" exclude("istream", "isequentialstream", "_large_integer", "_ularge_integer", "tagstatstg", "_filetime") raw_interfaces_only
using namespace mssoaplib;
例程:
新建工程àmfc appwizard(exe)[ mclient]àstep1à基本对话à其他默认值即可
修改源文件:
  1. < stdafx.h>  
  2. // stdafx.h : include file for standard system include files,   
  3. //  or project specific include files that are used frequently, but   
  4. //      are changed infrequently   
  5. //   
  6.   
  7. #if !defined(afx_stdafx_h__045cd307_9518_4af1_8ce3_8ffe38d1acb2__included_)   
  8. #define afx_stdafx_h__045cd307_9518_4af1_8ce3_8ffe38d1acb2__included_   
  9.   
  10. #if _msc_ver > 1000   
  11. #pragma once   
  12. #endif // _msc_ver > 1000   
  13.   
  14. #define vc_extralean        // exclude rarely-used stuff from windows headers   
  15.   
  16. #include <afxwin.h>         // mfc core and standard components   
  17. #include <afxext.h>         // mfc extensions   
  18. #include <afxdisp.h>        // mfc automation classes   
  19. #include <afxdtctl.h>       // mfc support for internet explorer 4 common controls   
  20. #ifndef _afx_no_afxcmn_support   
  21. #include <afxcmn.h>         // mfc support for windows common controls   
  22. #endif // _afx_no_afxcmn_support   
  23.   
  24.   
  25.   
  26. #import "msxml3.dll"    
  27. using namespace msxml2;   
  28.   
  29. #import "c:\program files\common files\mssoap\binaries\mssoap1.dll" exclude("istream", "isequentialstream", "_large_integer", "_ularge_integer", "tagstatstg", "_filetime") raw_interfaces_only   
  30. using namespace mssoaplib;   
  31.   
  32.   
  33. #define msg(message) \   
  34. { \   
  35.     ::messagebox(null,_t(message),null,mb_ok | mb_iconexclamation| mb_applmodal);\   
  36.     goto cleanup; \   
  37. }   
  38.   
  39.   
  40. #define check_hresult(hr, message) \   
  41. if (failed(hr)) \   
  42. { \   
  43.     msg(message); \   
  44. }    
  45.   
  46.   
  47. //{{afx_insert_location}}   
  48. // microsoft visual c++ will insert additional declarations immediately before the previous line.   
  49.   
  50. #endif // !defined(afx_stdafx_h__045cd307_9518_4af1_8ce3_8ffe38d1acb2__included_)   
  51. <mclient.h>  
  52. // mclient.h : main header file for the mclient application   
  53. //   
  54.   
  55. #if !defined(afx_mclient_h__9a397da6_5a62_4aef_be5e_6c7629322ecc__included_)   
  56. #define afx_mclient_h__9a397da6_5a62_4aef_be5e_6c7629322ecc__included_   
  57.   
  58. #if _msc_ver > 1000   
  59. #pragma once   
  60. #endif // _msc_ver > 1000   
  61.   
  62. #ifndef __afxwin_h__   
  63.     #error include 'stdafx.h' before including this file for pch   
  64. #endif   
  65.   
  66. #include "resource.h"       // main symbols   
  67.   
  68. /   
  69. // cmclientapp:   
  70. // see mclient.cpp for the implementation of this class   
  71. //   
  72.   
  73. class cmclientapp : public cwinapp   
  74. {   
  75. public:   
  76.     cmclientapp();   
  77.   
  78. // overrides   
  79.     // classwizard generated virtual function overrides   
  80.     //{{afx_virtual(cmclientapp)   
  81.     public:   
  82.     virtual bool initinstance();   
  83.     //}}afx_virtual   
  84.   
  85. // implementation   
  86.   
  87.     //{{afx_msg(cmclientapp)   
  88.         // note - the classwizard will add and remove member functions here.   
  89.         //    do not edit what you see in these blocks of generated code !   
  90.     //}}afx_msg   
  91.     declare_message_map()   
  92. };   
  93.   
  94.   
  95. /   
  96.   
  97. //{{afx_insert_location}}   
  98. // microsoft visual c++ will insert additional declarations immediately before the previous line.   
  99.   
  100. #endif // !defined(afx_mclient_h__9a397da6_5a62_4aef_be5e_6c7629322ecc__included_)   
数据集介绍:野生动物目标检测数据集 一、基础信息 数据集名称:野生动物目标检测数据集 图片数量: - 训练集:4,181张图片 - 验证集:1,212张图片 - 测试集:610张图片 总计:6,003张航拍及自然场景图片 分类类别: 涵盖23类野生动物,包括: - 濒危物种(北极熊、犀牛、熊猫) - 大型哺乳动物(大象、河马、长颈鹿) - 猛禽类(鹰、鹦鹉、企鹅) - 食肉动物(狮子、猎豹、美洲豹) - 草食动物(斑马、鹿、山羊) 标注格式: YOLO格式标注,包含边界框坐标与类别标签,适配主流目标检测框架。 数据特性: 航拍视角与地面视角相结合,包含动物群体活动和个体行为场景。 二、适用场景 生态保护监测系统: 构建野生动物种群识别系统,支持自然保护区自动监测动物迁徙和栖息地活动。 智能林业管理: 集成至森林巡护无人机系统,实时检测濒危物种并预警盗猎行为。 动物行为研究: 为科研机构提供标注数据支撑,辅助研究动物种群分布与行为特征。 自然纪录片制作: AI预处理工具开发,快速定位视频素材中的特定物种片段。 教育科普应用: 用于野生动物识别教育软件,支持互动式物种学习功能开发。 三、数据集优势 物种覆盖全面: 包含非洲草原系、极地系、森林系等23类特色动物,特别涵盖10种IUCN红色名录物种。 多场景适配: 整合航拍与地面视角数据,支持开发不同观测高度的检测模型。 标注质量可靠: 经动物学专家校验,确保复杂场景(群体/遮挡)下的标注准确性。 模型兼容性强: 原生YOLO格式可直接应用于YOLOv5/v7/v8等系列模型训练。 生态研究价值: 特别包含熊科动物(棕熊/北极熊/熊猫)细分类别,支持濒危物种保护研究。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值