Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The following code generates these two troubleshooting tips in vb.net
The code builds with no errors.
The locals window lists everything under OrderContext as "Nothing", 0.0 or "False" when it stop on the line which attempts to set address1.

Troubleshooting tips:
"Use the new keyword to create an object instance."
"Check to determine if the object is null before calling the method."


[code begin]
VB
Imports TETest.com.nusa.cd.te2_ks
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim PEService As New PayService
        Dim OrderContext As New com.nicusa.cdc.tpe2_ks.WSOrderContext

        OrderContext.customer.address.address1 = "1233 Test Dr."
        OrderContext.customer.address.city = "Test City"
        OrderContext.customer.address.state = "KS"
        OrderContext.customer.address.zip = "66999"

[code end]

[edit]code block added[/edit]
Posted
Updated 27-Nov-12 11:56am
v2

1 solution

Does the constructor New com.nicusa.cdc.tpe2_ks.WSOrderContext also create an instance of customer, or is OrderContext.customer Nothing?
I guess that's what happens. Hence, also construct a customer object, and likely also an address object, and set the properties.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900