Hi All,
I need a little help with soap.
The code below allow me to connect as ADMIN. At line 58 (ADMIN IS
CONNECTED) you can see it.
Then I call Soap Method AddNewUser, but I had the following error:
    Fault (Expect - The request contains an invalid SOAP body)


Where's the mistake?
Thank you.


<?

require_once('nusoap.php');

$client_userService = new nusoap_client("http://localhost/openmeetings/
services/UserService?wsdl", "wsdl");

$err = $client_userService->getError();

    if ($err) {

        echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';

        exit();
    }

$resultSesssion = $client_userService->call('getSession');

if ($client_userService->fault)
{

    echo '<h2>Fault </h2>';

} else
        {

    if ($err)
    {

       echo '<h2>Error2</h2>';

    } else
        {

                      $client_userService->session_id = 
$resultSesssion["return"]
["session_id"];

                      $params = array(
                          'SID' => $client_userService->session_id,
                          'username' => 'admin',
                          'userpass' => 'admin'
      );

      $result = $client_userService-> call('loginUser',$params);

                  if ($client_userService->fault) {

                echo '<h2>Fault </h2>';

      } else {

          if ($err) {
              echo '<h2>Error</h2>';
          } else {

                echo '<h2>ADMIN IS CONNECTED</h2>';

                $params1 = array(
                                            'SID' => 
$client_userService->session_id ,
                                            'username' => 'newuser',
                                            'userpass' => 'newuser',
                                            'lastname' => 'newuser',
                                            'firstname' => 'newuser',
                                            'email' => ' [email protected]',
                                            'additionalname' => 'newuser',
                                            'street' => 'newuser',
                                            'zip' => 'newuser',
                                            'fax' => 'newuser',
                                            'states_id' => 10,
                                            'town' => 'newuser',
                                            'language_id' => 5,
                                            'baseURL' => 'localhost'
                                              );

                                        $result = $client_userService -> 
call('addNewUser',
$params1);

                                        if ($client_userService->fault) {

                                            echo '<h2>Fault </h2>';

                                        } else
                                                {

                                            $err = 
$client_userService->getError();

                                            if ($err) {

                                                echo '<h2>Error</h2>';

                                            } else {

                                                        echo '<h2>OK</h2>';
                                            }
                                          }
                         }
            }
      }


}

?>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenMeetings User" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-user?hl=en.

Reply via email to