Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > passing non-primitive values to array class

Reply
Thread Tools

passing non-primitive values to array class

 
 
=?Utf-8?B?YW1hem9u?=
Guest
Posts: n/a
 
      11-05-2006
I have web service that acceping following parameters..
postev.PostEvent(authentication as ws.authentication, name as string,id as
string, exdate as date, parameter() as ws.nameparametervaluepair (I need help
in passing this))

Postev.postEvent(auth(), "Test", "1234567", tdt, parameter())

For the first parameter authentication I have:

Private Function auth() As ws.Authentication
Dim authWF As ws_sghe_WF.Authentication = New ws.Authentication()
authWF.principal = "test"
authWF.credential = "testpwd"
Return auth
End Function

It is working fine and I am connecting to web service

If I do the same thing for passing parameter()

Private Function parameter() As ws.NameParameterValuePair()
Dim parameter As ws.NameParameterValuePair()
parameter = New ws.NameParameterValuePair(2) {}

parameter(0).name = "string"
parameter(0).ItemElementName = "(E-Mail Removed)"

parameter(1).name = "string"
parameter(1).ItemElementName = "my name"

Return parameter
End Function

I get following error:
Object reference not set to an instance of an object.

If I remove (2) from declaration:
Index was outside the bounds of the array

Any suggessions??

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an array from FORTRAN to C then passing it within C andReturning it to FORTRAN deadpickle C Programming 1 11-07-2010 02:38 PM
Passing array values as tag attributes Venkatesh Java 2 12-02-2006 11:23 AM
passing multiple values into an argument as an array ? Jack Perl Misc 4 09-26-2006 03:45 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Passing derived class object array in place of base class object array justanotherguy63@yahoo.com C++ 9 12-03-2004 10:57 PM



Advertisments