I don't think it's Jodohost's fault now but I'm getting a Java.Lang.NullPointerException when I run the following code (juicy bits obfuscated) in VB.NET
---
Dim aService As New localhost.AdminServicesService
Dim aContact As New localhost.ContactInfo
With aContact
.first_name = Me.FirstName.Text
.last_name = Me.LastName.Text
.address1 = Me.Address1.Text
.address2 = Me.Address2.Text
.city = Me.City.Text
.state = Me.State.Text
.postal_code = Me.Zip.Text
.country = "USA"
.phone = Me.Phone.Text
.email = Me.Email.Text
.state2 = "na"
.org_name = "Company"
.fax = Me.Fax.Text
.address3 = ""
End With
Dim aPayment As New localhost.PaymentInfo
With aPayment
If Visa.Checked = True Then
.cc_type = "Visa"
ElseIf MasterCard.Checked = True Then
.cc_type = "Master Card"
ElseIf Amex.Checked = True Then
.cc_type = "Amex"
ElseIf Discover.Checked = True Then
.cc_type = "Discover"
End If
.number = Me.CCNum.Text
.expDay = CStr(System.DateTime.DaysInMonth(CInt(Me.expYear.Text), CInt(Me.expMonth.Text)))
.startDay = CStr(System.DateTime.Now.Day)
.startMonth = CStr(System.DateTime.Now.Month)
.startYear = CStr(System.DateTime.Now.Year)
.expMonth = CStr(expMonth.Text)
.expYear = CStr(expYear.Text)
.cvv = Me.CVV.Text
.name = Me.CCNameOnCard.Text
End With
Dim authToken As New localhost.AuthToken
With authToken
.accountId = <<my reseller account id>>
.login = <<my reseller user name>>
.password = <<My Reseller password>>
Dim arole As New localhost.Role
arole.accountId = 0
arole.login = ""
.role = arole
End With
Dim aParam() As localhost.NamedParameter
Dim planPeriod As Integer
If Monthly.Checked = True Then
planPeriod = 0
Else
planPeriod = 1
End If
Dim aParamw(1) As localhost.NamedParameter
aParamw(0) = New localhost.NamedParameter
aParamw(0).name = "domain_name"
aParamw(0).value = Me.Domain.Text
aParamw(1) = New localhost.NamedParameter
aParamw(1).name = "type_domain"
aParamw(1).value = "transfer_new_misc_domain"
aParam = aService.signupUser(authToken, CInt(Me.PlanType.Text), planPeriod, Me.username.Text, Me.Password.Text, "New Site", aContact, aContact, aPayment, True, "nodomain", aParamw)
---
Dim aService As New localhost.AdminServicesService
Dim aContact As New localhost.ContactInfo
With aContact
.first_name = Me.FirstName.Text
.last_name = Me.LastName.Text
.address1 = Me.Address1.Text
.address2 = Me.Address2.Text
.city = Me.City.Text
.state = Me.State.Text
.postal_code = Me.Zip.Text
.country = "USA"
.phone = Me.Phone.Text
.email = Me.Email.Text
.state2 = "na"
.org_name = "Company"
.fax = Me.Fax.Text
.address3 = ""
End With
Dim aPayment As New localhost.PaymentInfo
With aPayment
If Visa.Checked = True Then
.cc_type = "Visa"
ElseIf MasterCard.Checked = True Then
.cc_type = "Master Card"
ElseIf Amex.Checked = True Then
.cc_type = "Amex"
ElseIf Discover.Checked = True Then
.cc_type = "Discover"
End If
.number = Me.CCNum.Text
.expDay = CStr(System.DateTime.DaysInMonth(CInt(Me.expYear.Text), CInt(Me.expMonth.Text)))
.startDay = CStr(System.DateTime.Now.Day)
.startMonth = CStr(System.DateTime.Now.Month)
.startYear = CStr(System.DateTime.Now.Year)
.expMonth = CStr(expMonth.Text)
.expYear = CStr(expYear.Text)
.cvv = Me.CVV.Text
.name = Me.CCNameOnCard.Text
End With
Dim authToken As New localhost.AuthToken
With authToken
.accountId = <<my reseller account id>>
.login = <<my reseller user name>>
.password = <<My Reseller password>>
Dim arole As New localhost.Role
arole.accountId = 0
arole.login = ""
.role = arole
End With
Dim aParam() As localhost.NamedParameter
Dim planPeriod As Integer
If Monthly.Checked = True Then
planPeriod = 0
Else
planPeriod = 1
End If
Dim aParamw(1) As localhost.NamedParameter
aParamw(0) = New localhost.NamedParameter
aParamw(0).name = "domain_name"
aParamw(0).value = Me.Domain.Text
aParamw(1) = New localhost.NamedParameter
aParamw(1).name = "type_domain"
aParamw(1).value = "transfer_new_misc_domain"
aParam = aService.signupUser(authToken, CInt(Me.PlanType.Text), planPeriod, Me.username.Text, Me.Password.Text, "New Site", aContact, aContact, aPayment, True, "nodomain", aParamw)