I am sending data to a web service thru asp.net vb
Connection to web service is good and the header data goes over but the
subdata which is an arra is not going. I can not set the instance correctly.
MHSA says
The SubUnitData element in the XML should be instantiated the following way:
TheForm.SubUnitData = New Form70002SubUnit(3)
You need to instantiate the SubUnitData with an array of Form70002SubUnit
objects.
but my code
TheForm.SubUnitData = New Form70002SubUnit(3)
'Dim subunitdata(3) As Form70002SubUnit
TheForm.SubUnitData(0) = NewSubUnit1
TheForm.SubUnitData(1) = NewSubUnit2
TheForm.SubUnitData(2) = NewSubUnit3
TheForm.SubUnitData(3) = NewSubUnit4
Gives me an (too many arguments for sub new) on the form70002Subunit(3)
I set the newsubunits up earlier in the code as follows:
Dim NewSubUnit4 As Form70002SubUnit = New
gov.msha.lakegovprod1.Form70002SubUnit
'Select Case fourth
' Case "06"
NewSubUnit4.Mode = "A"
NewSubUnit4.SubUnitCode = "06"
NewSubUnit4.NumberOfPersons = dr.Item(15).ToString
NewSubUnit4.NumberOfHours = dr.Item(16).ToString
NewSubUnit4.ShortTonCoalProduction = "0"
I have tried every combination of setting this mostly getting an object not
set to reference
Please help