Installation

wwassignment4: Fatal error: Class 'soap_client' not found

wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
Number of replies: 10
Hi,

I have a problem installing wwassignment4 in this step. I have the block called "WeBWorK Link", but when I try to edit it, I obtain this

Configuring a WeBWorK Link block

Select WeBWorK Course Fatal error: Class 'soap_client' not found in /usr/share/moodle/mod/wwassignment/locallib.php on line 368

Any ideas?

Thanks in advance!

LeninAu
In reply to Lenin Augusto Echavarria

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Jason Aubrey -
Hi -

The most likely problem is that the settings in steps 2b and 2c do not match between webwork and moodle:

(2b) Finally you must modify one line at the top of the file:

webwork2/lib/WebworkSOAP/WSDL.pm

to include the full domain name of the host of the WeBWorK installation.

use constant RPC_URL => 'http://host.name.edu/webwork2_rpc';

(note the agreement with the stanzas in the webwork.apache-config file.

(2c) and modify one line at the top of the file:

webwork2/lib/WebworkSOAP.pm to contain your secret code:

WebworkSOAP.pm:$WebworkSOAP::SeedCE{soap_authen_key} = "YourSecretCodeHere";



Can you point us to your WSDL? Thanks, Jason
In reply to Jason Aubrey

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
Hi,

I am doing local tests. The wsdl is in the attachments. Probably I should mention that I am using Ubuntu 11.04.

Thanks,

LeninAu
In reply to Lenin Augusto Echavarria

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Jason Aubrey -
Hi LeninAu,

I think this is the problem:

targetNamespace="http://localhost/WebworkSOAP"

it means that the RPC_URL hasn't been changed in

webwork2/lib/WebworkSOAP/WSDL.pm

Try changing the RPC_URL from localhost to the domain name of your webwork server.

use constant RPC_URL => 'http://host.name.edu/webwork2_rpc';

Jason

In reply to Jason Aubrey

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
Jason,

thank you for your replies.

I am doing all locally before I ask the IT department to do it. I have access to Moodle in my laptop with the address:

http://localhost/moodle/

and to WeBWorK through:

http://localhost/webwork2

The line that you refer in

webwork2/lib/WebworkSOAP/WSDL.pm

is

use constant RPC_URL => 'http://localhost/webwork2_rpc';

because my WeBWorK server is in localhost. I think that the URLs are right. Am I wrong?
In reply to Jason Aubrey

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
Hi,

I have been trying with wwassignment5. I have the following error in the apache error log

failed to resolve handler `Apache2::SOAP': Can't locate Apache2/SOAP.pm in @INC (@INC contains: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2) at (eval 1112) line 3.\n

Could someone help me please?
In reply to Lenin Augusto Echavarria

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Danny Glin -
It looks like your perl installation is missing the Apache2::SOAP module.  Most likely you will have to install it.

On Redhat-type systems you can do
yum install perl-Apache2-SOAP

I don't use ubuntu, so I couldn't tell you if there is a package available on ubuntu, but you could try replacing 'yum' in the above with 'apt-get' if you're on ubuntu.

If this doesn't work, you should be able to install it via CPAN.
From the command line, type 'cpan', then at the cpan prompt, type:
install Apache2::SOAP

Regards,
Danny
In reply to Danny Glin

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
I think you are right.

apache2 error.log has:

failed to resolve handler `Apache2::SOAP': Can't locate Apache2/SOAP.pm in @INC (@INC contains...


I tried copying the file apache/SOAP.pm, but this didn't solve the problem.


Installing Apache2::SOAP via cpan also gives errors.

Could you give some ideas???
In reply to Lenin Augusto Echavarria

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Michael Gage -
Hi,

If you can't get Apache2::SOAP to install I believe you can get by with the 
older Apache2::SOAP.  You will need to change a stanza in 
webwork.apache2-config  to:

 # WEBWORK SOAP CONFIGURATION
 <Location /webwork2_rpc>
         PerlHandler Apache::SOAP
         SetHandler perl-script
         PerlSetVar dispatch_to "WebworkSOAP"
         PerlSetVar options "compress_threshold => 10000"
         Order Allow,Deny
         Allow from All
 </Location>


Notice the PerlHandler is Apache::SOAP and not Apache2::SOAP

Hope this helps.

-- Mike

In reply to Michael Gage

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Lenin Augusto Echavarria -
Thanks,

The Block says: Moodle is connected to WeBWorK. But when I try to add the activity WeBWorK Problem Set, I obtain the following error in Moodle:

XML Parsing Error: junk after document element
Location: http://192.168.56.101/moodle/course/modedit.php?add=wwassignment&type=&course=4&section=1&return=0
Line Number 1, Column 517:

<div class="notifytiny">function moodle_form::setHelpButton() is deprecated<ul style="text-align: left"><li>line 1542 of /lib/formslib.php: call to debugging()</li><li>line 56 of /mod/wwassignment/mod_form.php: call to MoodleQuickForm->setHelpButton()</li><li>line 154 of /lib/formslib.php: call to mod_wwassignment_mod_form->definition()</li><li>line 71 of /course/moodleform_mod.php: call to moodleform->moodleform()</li><li>line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()</li></ul></div><div class="notifytiny">function moodle_form::setHelpButton() is deprecated<ul style="text-align: left"><li>line 1542 of /lib/formslib.php: call to debugging()</li><li>line 61 of /mod/wwassignment/mod_form.php: call to MoodleQuickForm->setHelpButton()</li><li>line 154 of /lib/formslib.php: call to mod_wwassignment_mod_form->definition()</li><li>line 71 of /course/moodleform_mod.php: call to moodleform->moodleform()</li><li>line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()</li></ul></div><?xml version="1.0" encoding="utf-8"?>

Also, I created a new course un Moodle, but when I tried to enroll new users it keeps loading the list of users. So, I cannot make new tests to the installation.


Thanks,

Lenin Au.
In reply to Lenin Augusto Echavarria

Re: wwassignment4: Fatal error: Class 'soap_client' not found

by Michael Gage -
Hi,

we need a summary of the situation.  which version of wwmoodle are you using?  wwmoodle4?  Which version of Moodle are you using Moodle 2.x?

Were you able to get the Apache::SOAP module to work?