Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
Posted 10-Mar-13 4:50am
Edited 10-Mar-13 22:54pm
v2
Comments
aspnet_regiis -i at 10-Mar-13 12:55pm
   
Show us the code...

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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,
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 475
1 Maciej Los 349
2 Richard MacCutchan 220
3 BillWoodruff 219
4 Mathew Soji 160
0 OriginalGriff 8,759
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,269
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100