none
don create user in WebSitePanel for dotnetpanel of api RRS feed

All replies

  • Im having the same problem. Any suggest anyone?
    Tuesday, September 28, 2010 6:43 PM
  • Hello,

     

    Could you post the error as it appears in the audit-log?
    From the stack trace we can maybe deduct what parameters are missing.

    Wednesday, September 29, 2010 10:14 AM
  • Here is a part of the log from the soap call:

     

    2010-09-29 18:07:53.471664 soap_parser: parsed successfully, found root struct: 7 of name Fault
    2010-09-29 18:07:53.471894 soapclientNusoap: sent message successfully and got a(n) array
    return=array(3) {
     ["faultcode"]=>
     string(11) "soap:Server"
     ["faultstring"]=>
     string(96) "Server was unable to process request. ---> Object reference not set to an instance of an object."
     ["detail"]=>
     string(0) ""
    }
    2010-09-29 18:07:53.472002 soapclientNusoap: got fault
    2010-09-29 18:07:53.472075 soapclientNusoap: faultcode = soap:Server<br>
    2010-09-29 18:07:53.472135 soapclientNusoap: faultstring = Server was unable to process request. ---> Object reference not set to an instance of an object.<br>
    2010-09-29 18:07:53.472195 soapclientNusoap: detail = <br>
    

    I have used all the parameters in the API, so im sure that im not missing anything.

    Her is my code:

    <?php

    require_once ("nusoap/lib/nusoap.php");

    $dnp = new soapclientNusoap('http://server:port/esUsers.asmx?WSDL', true);
    $dnp->soap_defencoding = 'utf-8';

    $dnp->setCredentials("username", "password");

    class leggtil{
        public $ownerid;
        public $roleid;
        public $statusid;
        public $isdemo;
        public $ispeer;
        public $username;
        public $password;
        public $firstname;
        public $lastname;
        public $email;
    }

    $user = new leggtil;
    $user->ownerid = 1;
    $user->roleid = 3;
    $user->statusid = 1;
    $user->isdemo = 'false';
    $user->ispeer = 'false';
    $user->username = 'test';
    $user->password = '123123';
    $user->firstname = 'test';
    $user->lastname = 'testing';
    $user->email = 'test@test.com';


    $result = $dnp->call('AddUser', array('parameters' => $user),
          'http://server/websitepanel/enterpriseserver',
          'http://server/websitepanel/enterpriseserver/AddUser');

    if ($dnp->fault) {
        echo '<h2>Fault </h2><pre>'; print_r($result); echo '</pre>';
    } else {
        $err = $dnp->getError();
        if ($err) {
            echo '<h2>Error</h2><pre>' . $err . '</pre>';
        } else {
            echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
        }
    }

    echo '<h2>Request</h2><pre>' . htmlspecialchars($dnp->request, ENT_QUOTES) . '</pre>';
    echo '<h2>Response</h2><pre>' . htmlspecialchars($dnp->response, ENT_QUOTES) . '</pre>';
    echo '<h2>Debug</h2><pre>' . htmlspecialchars($dnp->debug_str, ENT_QUOTES) . '</pre>';
    ?>

     

    Wednesday, September 29, 2010 4:16 PM
  • Yes,

    this is the error that WSP returns. But I'd like to see the stack trace that was recorded in the WebsitePanel audit-log.
    From the error message ("object reference ...") I can deduct that WSP was trying to act upon a non-existing item (maybe a wrong user id, package id, domain, ... but this error doesn't show what.

    If you can post the error message from the audit-log I can determine where exactly it went wrong in websitepanel and thus determine what wsp was trying to do when it failed.

    Saturday, October 2, 2010 5:37 PM
  • I have the same problem here. Did you find a solution (since this is a while ago).

     

    Friday, March 25, 2011 11:20 AM
  • Has anyone tried outside of PHP to confirm that this is even a WSP issue, if its PHP related, this isn't the place to get help on this issue.

     

    PS: I have a working example in .NET if that will help... by the look of things, you might not be setting the user credentials correctly, but I don't know much about PHP other then its NOT very forgiving.

     

     


    British Columbia Usernet | Crooked Software, Unlimited http://www.bcu.cc | http://crooked.ii1.net
    Friday, March 25, 2011 5:20 PM
  • Hi Matt Crook,

    Please, could you send me an example in .Net?

    Thanks,

    Tuesday, April 12, 2011 12:03 PM
  • Matt,

    Could you send me the working .Net example? 

    Would be great!

    Thanks,

    Brian Davis


    Brian Davis

    Thursday, June 7, 2012 12:58 PM