如何调用具有复杂或非原始的Web服务 [英] How to invoke a webservice with complex or non-primitive

查看:145
本文介绍了如何调用具有复杂或非原始的Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我在这里遇到了问题。如何在ASP.NET / VB.Net中使用复杂非原始参数调用Web服务。

我创建了一个web服务,但我似乎无法调用这些方法只是bcoz代码是复杂或是非原始参数。将显示以下消息:



测试表仅适用于具有基本类型作为参数的方法。



如何解决这个问题?

非常感谢。



这是复杂的代码。 />


Hi All.
I got a problem here. How to invoke a webservice with complex or non-primitive parameters in ASP.NET/VB.Net.
I have created a webservice but I can''t seem to invoke the methods simply bcoz the codes are complex or are of non-primitive parameters. The following message appears:

The test form is only available for methods with primitive types as parameters.

How do I go about it?
Many thanks.

This is the complex code.

<WebMethod()> _
        Public Function WatchListWS(ByVal strName As String) As WatchListIntResp
        Dim watchStatus As String = ""
        Dim resp As New WatchListIntResp
        Dim objWatchList As Object = Server.CreateObject("VREMIT.Enterprise.ComWatchList")

        Try
            watchStatus = objWatchList.mtdMatchExact(strName, g_global_region_code)

            If watchStatus <> "" Then
                resp.watchlistIntCode = "3"
                resp.watchlistIntMsg = "Hit International"
                ''strResult = "3 | Hit International "
            Else
                ''strResult = " 0 | Not Watched "
                resp.watchlistIntCode = "0"
                resp.watchlistIntMsg = "Not Watched"
            End If
            Return resp

        Catch ex As Exception
            Return Nothing
        End Try
    End Function

推荐答案

如果你想要测试您的Web服务,然后获取 SOAPUI 。一个非常好的工具,虽然用Java编写,因此需要在你的机器上使用JDK。



问候,
If you want to test your web service then grab SOAPUI. A very good tool, though written in Java and hence will require JDK on your machine.

Regards,


这篇关于如何调用具有复杂或非原始的Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆