Hi Sebastian, if I browse http://localhost/openmeetings/services/UserService?wsdl I can see the list of the Soap Method with the arguments, the right order. For example, for the AddNewUser Method if shows me that the arguments are the following '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' . Is there any other place where I can check the right order, types and list of the arguments? Thank you.
On Sep 12, 10:24 pm, "[email protected]" <[email protected]> wrote: > in 99,99 % of all cases its an issue regarding the method signature. > > You've either not using: > - correct order of arguments > - correct type of arguments > - correct arguments in general by missing one > > Sebastian > > 2011/9/12 Netbuilder <[email protected]>: > > > > > > > > > > > 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 > > [email protected].> To unsubscribe from this group, send > > email [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/openmeetings-user?hl=en. > > -- > Sebastian > Wagnerhttp://www.webbase-design.dehttp://openmeetings.googlecode.comhttp://www.wagner-sebastian.com > [email protected] -- 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.
