Using Moodle: help me fix error when i run ws-test.php

Using Moodle: help me fix error when i run ws-test.php

by abdelaziz ouadah -
Number of replies: 0

Hi,

i am using Moodle OKTech web services, when i try to run ws-test.php i get the folowing error:

Request:

POST /wspp/service_pp.php HTTP/1.0 Host: 127.0.0.1 User-Agent: NuSOAP/0.7.2 (1.1) Content-Type: text/xml; charset=ISO-8859-1 SOAPAction: "http://127.0.0.1/wspp/wsdl#login" Content-Length: 593

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://127.0.0.1/wspp/wsdl"><SOAP-ENV:Body><tns:login xmlns:tns="http://127.0.0.1/wspp/wsdl"><username xsi:type="xsd:string">admin</username><password xsi:type="xsd:string">test</password></tns:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response:

HTTP/1.1 200 OK Date: Sun, 08 Nov 2009 09:28:59 GMT Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 X-Powered-By: PHP/5.2.5 Set-Cookie: MoodleSession=6c5f5c339f196c591a07b77a94f61fe4; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: MoodleSessionTest=v8IHOGAOEx; path=/ Content-Length: 0 Connection: close Content-Type: text/html

.......

2009-11-08 10:06:05.311380 soap_proxy_8952: endpoint=http://127.0.0.1/wspp/service_pp.php, soapAction=http://127.0.0.1/wspp/wsdl#login, namespace=http://127.0.0.1/wspp/wsdl, style=rpc, use=encoded, encodingStyle=http://schemas.xmlsoap.org/soap/encoding/

.......

2009-11-08 10:28:59.537853 soap_transport_http: read line of 25 bytes: Content-Type: text/html
2009-11-08 10:28:59.538089 soap_transport_http: read line of 2 bytes:
2009-11-08 10:28:59.538455 soap_transport_http: found end of headers after length 488
2009-11-08 10:28:59.538789 soap_transport_http: found cookie: MoodleSession = 6c5f5c339f196c591a07b77a94f61fe4
2009-11-08 10:28:59.539092 soap_transport_http: found cookie: MoodleSessionTest = v8IHOGAOEx
...........
2009-11-08 10:28:59.541640 soap_proxy_1461: Error: HTTP Error: no data present after HTTP headers

Error: HTTP Error: no data present after HTTP headers

thanks.

Average of ratings: -