Hey Genadij,
Thanks for the advise. but I could not find a difference. I checked just about every table and I was not able to notice anything different...
I checked for null values where other fields had values, ID differences etc. All looked like they match up.
SolidCP.EnterpriseServer.ExchangeServerController.GetMailboxSetupInstructions tells me it's the setup instructions that's the problem. Only issue is that a mailbox has not been generated, so why would this be a problem?
Also I did check when the org is setup it creates an exchange mailbox record for the main domain, and then the mailboxes under it. That record is created and matches the others...
So the question is, What Object is NULL? There's an object that should be returning but isn't, how can we determine that object?
I did notice the below lines, which shows an object defined as [], is that correct?
It's the only direct declaration of an object as such. But I suppose it can be referncing a DB looked up record too...?
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +237812
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +273
SolidCP.EnterpriseServer.esExchangeServer.GetMailboxSetupInstructions(Int32 itemId, Int32 accountId, Boolean pmm, Boolean emailMode, Boolean signup, String passwordResetUrl) +281
SolidCP.Portal.ExchangeServer.ExchangeCreateMailbox.Page_Load(Object sender, EventArgs e) +180
The problem is that a lot of codebase in SolidCP is legacy that comes from websitepanel and dotnetPanel, where developers probably didn't care about calling SOAP manually :). So most of the SOAP methods awaiting that we send 100% correct data, and if we send wrong, the methods won't say anything.
If the problem is in this GetMailboxSetupInstructions
I can guess that null exception probably comes from one of those line:
2977 - org.PackageId (it is possible that object "org" not null, but PackageId is null)
2980 - user.UserId (the same)
So you need to be sure, that this method accept correct - itemId
Anyway the best way is download the source, add some debug information into this method and check on which line it gives null exception 🙂
P.S I think the problem is somewhere with your Creating Organization, maybe you create it wrong, or send wrong parameters
Hey Genadij,
I have no idea how to compile windows based code like this. So that's gonna be tough. I do understand code. But mostly php, So I'd have to learn it all which can be a bit much for the purpose of this exercise.
What I did do. Is I did dump a bunch of info which I am going to post below. I double checked the fields. And it looks like they line up correctly. So it looks like I am putting the right value for the right field in...
Can you maybe advise?
$SolidCPUserPackage = $api->APIExecute('esPackages.asmx', 'AddPackageWithResources', $planVars)->AddPackageWithResourcesResult;
object(stdClass)#771 (2) {
["Result"]=>
int(49)
["ExceedingQuotas"]=>
object(stdClass)#762 (2) {
["schema"]=>
string(608) ""
["any"]=>
string(127) ""
}
}
$SolidCPUserPackage = $api->APIExecute('esPackages.asmx', 'GetPackage', ['packageId' => $tblcustomfieldsvalues->value])->GetPackageResult;
object(stdClass)#751 (18) {
["PackageId"]=>
int(49)
["UserId"]=>
int(47)
["ParentPackageId"]=>
int(1)
["StatusId"]=>
int(1)
["PlanId"]=>
int(3)
["PurchaseDate"]=>
string(23) "2021-01-28T13:49:56.837"
["PackageName"]=>
string(23) "Exchange Earlybird Plan"
["PackageComments"]=>
string(0) ""
["ServerId"]=>
int(1)
["DiskSpace"]=>
int(0)
["BandWidth"]=>
int(0)
["DiskSpaceQuota"]=>
int(0)
["BandWidthQuota"]=>
int(0)
["Domains"]=>
int(0)
["DomainsQuota"]=>
int(0)
["OverrideQuotas"]=>
bool(false)
["DefaultTopPackage"]=>
bool(false)
["StatusIDchangeDate"]=>
string(23) "2021-01-28T13:49:56.883"
}
$SolidCPUserPackageOrg = $api->APIExecute('esOrganizations.asmx', 'CreateOrganization', $orgVars)->CreateOrganizationResult;
int(187)
I also did a var_dump of the $orgVars which gave the below output. So it looks like all the data is being populated correctly? Unless I am missing something?
array(4) {
["packageId"]=>
string(2) "49"
["organizationID"]=>
string(16) "marcel123.africa"
["organizationName"]=>
string(16) "marcel123.africa"
["domainName"]=>
string(16) "marcel123.africa"
}
Is it not possible to get the line of the error happening? I know in PHP I can see the last line run before the error popped up?
Wondering if something like that's not possible?
I also did check through the functions and made some educated guesses and it seems as though the PackageID and other info you mentioned are present in the DB... I can't find any differences in the database?