473,796 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

assigning values to a web service array

I receive the following error when I attempt to assign values to a web
service array.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:
Line 553: AppDTO.zip = sZip
Line 554: AppDTO.dob = sDOB
'** line 555 is the highlighted row with the problem.
Line 555: AppDTO.question Answer(0).id = 1
Line 556: AppDTO.question Answer(0).answe r(0).id = 1
Line 557: AppDTO.question Answer(0).answe r(0).value = ""
---

the code snippet that is running is:
AppDTO = New localhost.Appli cationDTO
AppDTO.firstNam e = sFirstName
AppDTO.middleNa me = sMiddleName
AppDTO.lastName = sLastName
AppDTO.address1 = sAddress1
AppDTO.address2 = sAddress2
AppDTO.city = sCity
AppDTO.state = sState
AppDTO.zip = sZip
AppDTO.dob = sDOB
AppDTO.question Answer(0).id = 1
AppDTO.question Answer(0).answe r(0).id = 1
AppDTO.question Answer(0).answe r(0).value = ""

the secion of the WSDL that show the question answer array is:
<xsd:element type="stns:Arra yOfQuestionDTO"
name="questionA nswer"
minOccurs="1"
nillable="true"
maxOccurs="1">
</xsd:element>

the snippet of the class' generated from the WSDL are:"
<System.Xml.Ser ialization.Soap TypeAttribute(" AnswerDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class AnswerDTO
Public answer As String
Public id As Integer
Public value As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" QuestionDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class QuestionDTO
Public answer() As AnswerDTO
Public id As Integer
Public question As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" ApplicationDTO" ,
"java:com.clien t.bus.apply.ws" )> _
'this only show a piece of this code
Public Class ApplicationDTO
Public address1 As String
Public address2 As String
Public city As String
Public dob As String
Public firstName As String
Public lastName As String
Public middleName As String
Public questionAnswer( ) As QuestionDTO
Public state As String
Public zip As String
End Class
Any thoughts on what I am doing wrong assigning these array values.

Nov 23 '05 #1
2 3274
Most likely the questionAnswer array is empty. Check the length!

Regards,

Sigmund Jakhel
"ryoung" <ry****@livebri dge.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
I receive the following error when I attempt to assign values to a web
service array.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:
Line 553: AppDTO.zip = sZip
Line 554: AppDTO.dob = sDOB
'** line 555 is the highlighted row with the problem.
Line 555: AppDTO.question Answer(0).id = 1
Line 556: AppDTO.question Answer(0).answe r(0).id = 1
Line 557: AppDTO.question Answer(0).answe r(0).value = ""
---

the code snippet that is running is:
AppDTO = New localhost.Appli cationDTO
AppDTO.firstNam e = sFirstName
AppDTO.middleNa me = sMiddleName
AppDTO.lastName = sLastName
AppDTO.address1 = sAddress1
AppDTO.address2 = sAddress2
AppDTO.city = sCity
AppDTO.state = sState
AppDTO.zip = sZip
AppDTO.dob = sDOB
AppDTO.question Answer(0).id = 1
AppDTO.question Answer(0).answe r(0).id = 1
AppDTO.question Answer(0).answe r(0).value = ""

the secion of the WSDL that show the question answer array is:
<xsd:element type="stns:Arra yOfQuestionDTO"
name="questionA nswer"
minOccurs="1"
nillable="true"
maxOccurs="1">
</xsd:element>

the snippet of the class' generated from the WSDL are:"
<System.Xml.Ser ialization.Soap TypeAttribute(" AnswerDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class AnswerDTO
Public answer As String
Public id As Integer
Public value As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" QuestionDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class QuestionDTO
Public answer() As AnswerDTO
Public id As Integer
Public question As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" ApplicationDTO" ,
"java:com.clien t.bus.apply.ws" )> _
'this only show a piece of this code
Public Class ApplicationDTO
Public address1 As String
Public address2 As String
Public city As String
Public dob As String
Public firstName As String
Public lastName As String
Public middleName As String
Public questionAnswer( ) As QuestionDTO
Public state As String
Public zip As String
End Class
Any thoughts on what I am doing wrong assigning these array values.

Nov 23 '05 #2
Most likely the questionAnswer array is empty. Check the length!

Regards,

Sigmund Jakhel
"ryoung" <ry****@livebri dge.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
I receive the following error when I attempt to assign values to a web
service array.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:
Line 553: AppDTO.zip = sZip
Line 554: AppDTO.dob = sDOB
'** line 555 is the highlighted row with the problem.
Line 555: AppDTO.question Answer(0).id = 1
Line 556: AppDTO.question Answer(0).answe r(0).id = 1
Line 557: AppDTO.question Answer(0).answe r(0).value = ""
---

the code snippet that is running is:
AppDTO = New localhost.Appli cationDTO
AppDTO.firstNam e = sFirstName
AppDTO.middleNa me = sMiddleName
AppDTO.lastName = sLastName
AppDTO.address1 = sAddress1
AppDTO.address2 = sAddress2
AppDTO.city = sCity
AppDTO.state = sState
AppDTO.zip = sZip
AppDTO.dob = sDOB
AppDTO.question Answer(0).id = 1
AppDTO.question Answer(0).answe r(0).id = 1
AppDTO.question Answer(0).answe r(0).value = ""

the secion of the WSDL that show the question answer array is:
<xsd:element type="stns:Arra yOfQuestionDTO"
name="questionA nswer"
minOccurs="1"
nillable="true"
maxOccurs="1">
</xsd:element>

the snippet of the class' generated from the WSDL are:"
<System.Xml.Ser ialization.Soap TypeAttribute(" AnswerDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class AnswerDTO
Public answer As String
Public id As Integer
Public value As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" QuestionDTO",
"java:com.clien t.bus.apply.ws" )> _
Public Class QuestionDTO
Public answer() As AnswerDTO
Public id As Integer
Public question As String
End Class

<System.Xml.Ser ialization.Soap TypeAttribute(" ApplicationDTO" ,
"java:com.clien t.bus.apply.ws" )> _
'this only show a piece of this code
Public Class ApplicationDTO
Public address1 As String
Public address2 As String
Public city As String
Public dob As String
Public firstName As String
Public lastName As String
Public middleName As String
Public questionAnswer( ) As QuestionDTO
Public state As String
Public zip As String
End Class
Any thoughts on what I am doing wrong assigning these array values.

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8281
by: Ben | last post by:
Hi all, This may sound easy but I'm having trouble assigning values to array element. My problem is as follows: m = for o in m: # Here first o is 'Peter'.. I want to do something like this: Peter = 10
1
2180
by: Jenny | last post by:
Hi, Can I create an array of tags by assigning same name to these tags? For example, I have two <p> tags with the same name t1. But document.all.b.value=document.all.t.length does not work. It works if the tags are <input type=radio...>. This line is OK:
14
74902
by: Eric Bantock | last post by:
Very basic question I'm afraid. Once an array has been declared, is there a less tedious way of assigning values to its members than the following: myarray=8; myarray=3; myarray=4; myarray=0; myarray=0; myarray=1; myarray=8;
0
1014
by: ryoung | last post by:
I receive the following error when I attempt to assign values to a web service array. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 553: AppDTO.zip = sZip Line 554: AppDTO.dob = sDOB '** line 555 is the highlighted row with the problem.
28
2452
by: anonymous | last post by:
I have couple of questions related to array addresses. As they belong to the same block, I am putting them here in one single post. I hope nobody minds: char array; int address; Questions 1: Why cannot I do the following:
2
2532
by: Military Smurf | last post by:
I am interested in dumping some results from a collection I have into a group of variables. I have a counter that loops but I don't know how to use the counter to determine my variable names. Here is my code... Imports System.Web Imports System.Web.Services
2
7053
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
1
2267
by: assgar | last post by:
Hi I need help solving a porblem. I have a form that displays a checkbox, service code, description and dropdown with fees on each row. The fee_money and unit array only returns a selected value from the first item (checkbox).
37
2678
by: miken32 | last post by:
In PHP, if a function returns an array it's fairly common to capture its return values like this: <?php list($foo, $bar, $baz) = some_function_that_return_an_array(); ?> In Javascript, would the equivalent (acceptable) code be this? = some_function_that_return_an_array();
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.