Jump to content

Soap function doesn't give expected result


xsintill

Recommended Posts

First i'm very new to php. I'm trying to add a new method to an already existing soap interface. This function is as simple as can be. it's should just return a string.

When calling the wsdl i see the newly created function. I tested this out in both a client written in delphi and a php test page. but the response in the delphi client shows me the result is like the following:

<?xml version="1.0" encoding="UTF-8"?>
<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/">
<SOAP-ENV:Body>
  <ns1:getTestNewSoapMethodResponse xmlns:ns1="urn:ilUserAdministration">
    <output xsi:nil="true" xsi:type="xsd:string"/>
  </ns1:getTestNewSoapMethodResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope><!--

-->

the output has xsi:nil="true" this was not as expected since  the methods look like this.

 

	public static function  getTestNewSoapMethod() {
	include_once 'webservice/soap/classes/class.ilSoapAdministration.php';		
	$roa = new ilSoapAdministration();
	return $roa->getTestNewSoapMethod();							
}

code in class.ilSoapAdministration.php looks like

this:
    public function getTestNewSoapMethod() 
{			
	return "getTestNewSoapMethod has been called.";
}

 

anybody got an idea what i am doing wrong?

 

p.s. the other functions in the soap interface are working.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.