Worked just fine, thanks!  Out of curiosity, it returned

*
<ns:return>7</ns:return>

*

7 is apparently a good message, but is there a there a table of these messages for numbers without a minus sign? I have this one:http://openmeetings.apache.org/ErrorsTable.html but is there another?

As always, thanks again.

-Sam

On 10/10/2013 10:33 PM, Maxim Solodovnik wrote:
Just have tested
works as expected

I believe the issue is in your code

instead of calling
$result = $SOAP-> addOrganisation($sid, 'Testgroup');
you should call
$params = array(
                'SID' => $sid,
                'name' => 'Testgroup'
        );
$result = $SOAP-> addOrganisation($params)


On Fri, Oct 11, 2013 at 9:25 AM, Maxim Solodovnik <[email protected] <mailto:[email protected]>> wrote:

    Actually I was not aware we have such method addOrganisation :)
    will try to check/fix :)


    On Fri, Oct 11, 2013 at 1:43 AM, Samuel Hagen <[email protected]
    <mailto:[email protected]>> wrote:

        Hi All,

        Interesting situation using SOAP today.....I slipped on it in
        the shower this morning....

        ...OK ok ok, no more hygiene-related puns, here's the actual
        problem: I'm trying to create a group in Openmeetings using
        SOAP.  Really straightforward, right?  Anyway, I keep getting
        a -1: *"**Unknown error. Please report this to the
        administrator."*  I've actually tried this with two different
        installs on two different machines.  Other soap operation seem
        to be working just fine on both machines, it just gets cranky
        with /addOrganisation.

        /*Below is the code:*/
        /

                <?php
                $wsdl ="http://localhost:5080/openmeetings/services/UserService?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>";
                
                $result = $SOAP-> addOrganisation($sid, 'Testgroup');
                
                print "<pre>\n";

                print "<br />\n Request: 
".htmlspecialchars($SOAP->__getLastRequest());
print "<br />\n Response: ".htmlspecialchars($SOAP->__getLastResponse()); print "</pre>";
                ?>

        *
        And here is the output from the above code:*

                Request: <?xml version="1.0" encoding="UTF-8"?>
                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";  
<http://schemas.xmlsoap.org/soap/envelope/>  xmlns:ns1="http://services.axis.openmeetings.apache.org";  
<http://services.axis.openmeetings.apache.org>><SOAP-ENV:Body><ns1:getSession/></SOAP-ENV:Body></SOAP-ENV:Envelope>


                Response: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";  <http://schemas.xmlsoap.org/soap/envelope/>><soapenv:Body><ns:getSessionResponse xmlns:ns="http://services.axis.openmeetings.apache.org";  <http://services.axis.openmeetings.apache.org>><ns:return 
xmlns:ax27="http://asterisk.sip.beans.persistence.openmeetings.apache.org/xsd";  <http://asterisk.sip.beans.persistence.openmeetings.apache.org/xsd>  xmlns:ax213="http://basic.beans.data.openmeetings.apache.org/xsd";  <http://basic.beans.data.openmeetings.apache.org/xsd>  xmlns:ax24="http://domain.beans.persistence.openmeetings.apache.org/xsd";  
<http://domain.beans.persistence.openmeetings.apache.org/xsd>  xmlns:ax21="http://user.beans.persistence.openmeetings.apache.org/xsd";  <http://user.beans.persistence.openmeetings.apache.org/xsd>  xmlns:ax22="http://basic.beans.persistence.openmeetings.apache.org/xsd";  <http://basic.beans.persistence.openmeetings.apache.org/xsd>  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  <http://www.w3.org/2001/XMLSchema-instance>  xsi:type="ax22:Sessiondata"><ax22:id>7</ax22:id><ax22:language_id xsi:nil="true"/><ax22:organization_id xsi:nil="true"/><ax22:refresh_time>2013-10-10</ax22:refresh_time><ax22:sessionXml 
xsi:nil="true"/><ax22:session_id>b0bf9a4435eb0dacbb26cc8d019082ee</ax22:session_id><ax22:starttermin_time>2013-10-10</ax22:starttermin_time><ax22:storePermanent xsi:nil="true"/><ax22:user_id xsi:nil="true"/></ns:return></ns:getSessionResponse></soapenv:Body></so
          a
        penv:Envelope>


                SID: b0bf9a4435eb0dacbb26cc8d019082ee



                Request: <?xml version="1.0" encoding="UTF-8"?>
                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";  <http://schemas.xmlsoap.org/soap/envelope/>  
xmlns:ns1="http://services.axis.openmeetings.apache.org";  
<http://services.axis.openmeetings.apache.org>><SOAP-ENV:Body><ns1:loginUser><ns1:SID>b0bf9a4435eb0dacbb26cc8d019082ee</ns1:SID><ns1:username>admin</ns1:username><ns1:userpass>password</ns1:userpass></ns1:loginUser></SOAP-ENV:Body></SOAP-ENV:Envelope>


                Response: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";  
<http://schemas.xmlsoap.org/soap/envelope/>><soapenv:Body><ns:loginUserResponse xmlns:ns="http://services.axis.openmeetings.apache.org";  
<http://services.axis.openmeetings.apache.org>><ns:return>1</ns:return></ns:loginUserResponse></soapenv:Body></soapenv:Envelope>



                Request: <?xml version="1.0" encoding="UTF-8"?>
                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";  
<http://schemas.xmlsoap.org/soap/envelope/>  xmlns:ns1="http://services.axis.openmeetings.apache.org";  
<http://services.axis.openmeetings.apache.org>><SOAP-ENV:Body><ns1:addOrganisation/><param1>Testgroup</param1></SOAP-ENV:Body></SOAP-ENV:Envelope>


                Response: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";  
<http://schemas.xmlsoap.org/soap/envelope/>><soapenv:Body><ns:addOrganisationResponse 
xmlns:ns="http://services.axis.openmeetings.apache.org";  
<http://services.axis.openmeetings.apache.org>><ns:return>-1</ns:return></ns:addOrganisationResponse></soapenv:Body></soapenv:Envelope>


        *I was just wondering* if anyone could reproduce this error,
        or had run into it themselves or (better yet) had found a
solution that I could implement with /profound /laziness ;-) Any of the above would be awesome...Telling me that SOAP works
        fine for you and there just must be goblins inside my
        computers (or a man of profound incompetence at the keyboard,
        outside them) , while unwelcome, would also be satisfactory I
        suppose...if not a bit unsurprising.

        Anyway, thanks for your attention and any ideas you might have.

        -Sam




-- WBR
    Maxim aka solomax




--
WBR
Maxim aka solomax

Reply via email to