Re: [Solved] SOAP addNewUser does not send email

92 views
Skip to first unread message

Maxim Solodovnik

unread,
Sep 26, 2013, 11:03:29 PM9/26/13
to Openmeetings user-list, openmeet...@googlegroups.com
Thanks for sharing this,
I'll try to check/fix this :(
Could you file JIRA issue?


On Fri, Sep 27, 2013 at 5:27 AM, Sam Hagen <hage...@gmail.com> wrote:
Hi All,

So I was about to post about an issue that I had where SOAP addNewUser wouldn't send a confirmation email when I found the solution.  I decided to post the solution (maddeningly simple) because the thing confounded me for a couple hours and I figure it might save some other hapless person some time.

The problem was as Follows:

I'm trying out Openmeetings SOAP API for the first time and I'm running into a bit of a problem.  I'm trying to add a new user with the addNewUser function and I get back the message code "-40".  From my understanding, this is an indication that everything should be fine, given the documentation:

-40   Message    You have successfully signed up. An email with a verification code will be sent to your mailbox.

However, I go to my email account and find nothing.  I know my Openmeetigns is configured to send email just fine because it does so for lost passwords and alike (I've even tested it with the particular email address I'm trying to use), however no such email is sent in the situation above.  Also (I don't know if this is an indication of any issue but just in case) no added user shows up in the "Users" administration panel.  Additionally (again, don't know if this is a problem) no entry is made in the om_users table in the database.

Solution:  Turns out my test username was too short.  I was using "bob" and openmeetings didn't like that.  However, this was not reflected in any sort of error message returned by SOAP...at least none that my code picked up on (see below).  Just thought this might be helpful to anyone who might be in the same situation (I'd already typed up a whole bunch so I figured it would be good not to let it go to waste).



My php code:
<?php
        $wsdl = "http://localhost:5080/openmeetings/services/UserService?wsdl";
        $SOAP = new SoapClient($wsdl, array(
                    "trace"=>1,
                    "exceptions"=>0));
        $value = $SOAP->getSession();
        $session = $value->return;
        $sid = $session->session_id;
        print "<pre>\n";
   
        print "<br />\n Request: ".htmlspecialchars($SOAP->__getLastRequest());
       
        print "<br />\n Response: ".htmlspecialchars($SOAP->__getLastResponse());
       
        print "</pre>";
        print "<br/>\n SID: $sid";
        $params = array(
            'SID' => $sid,
            'username' => 'admin',
            'userpass' => 'password'
        );

        $result = $SOAP-> loginUser($params);
        print "<pre>\n";
   
        print "<br />\n Request: ".htmlspecialchars($SOAP->__getLastRequest());
       
        print "<br />\n Response: ".htmlspecialchars($SOAP->__getLastResponse());
       
        print "</pre>";
        $parameters = array("SID"=>$sid,"username"=>"Bob","userpass"=>"password","lastname"=>"Woodward","firstname"=>"Robert","email"=>"em...@email.com", "additionalname"=>NULL, "street"=>"555 Test Street", "zip"=>"55555", "fax"=>NULL, "states_id"=>"1", "town"=>"City", "language_id"=>"1", "baseURL"=>"http://website.com");
        echo "<br/><strong>Parameters:</strong> ";
        var_dump($parameters);
        $value = $SOAP->addNewUser($parameters);
                print "<pre>\n";
   
        print "<br />\n Request: ".htmlspecialchars($SOAP->__getLastRequest());
       
        print "<br />\n Response: ".htmlspecialchars($SOAP->__getLastResponse());
       
        print "</pre>";
       
?>





--
WBR
Maxim aka solomax

Maxim Solodovnik

unread,
Sep 27, 2013, 2:03:27 AM9/27/13
to Openmeetings user-list, openmeet...@googlegroups.com

Maxim Solodovnik

unread,
Sep 30, 2013, 3:45:29 AM9/30/13
to Openmeetings user-list, openmeet...@googlegroups.com
sure :)

register
create new issue

the one reported by you https://issues.apache.org/jira/browse/OPENMEETINGS-806 is already fixed for upcoming 2.2 and 3.0 versions



On Mon, Sep 30, 2013 at 2:42 PM, Sam Hagen <hage...@gmail.com> wrote:
Hi there!

Thanks for taking a look at this.  I am, unfortunately a noob when it comes to development and so I don't know what you mean by "filing jira issue."  Would you be so kind as to fill me in or direct me to a tutorial?  I'd appreciate it and would be happy to do so if it's still needed.

Best

Sam
Reply all
Reply to author
Forward
0 new messages