Bitrix Site Manager



Method Description
CSOAPClient Constructor. Configures a SOAP client to use a specific server ($server), SOAP server access point ($path = '/'), web server port ($port).
send Sends a SOAP request created by CSOAPRequest.
setTimeout Sets the response waiting period of a SOAP server.
getRawRequest Returns a string which is a request sent to a SOAP server.
getRawResponse Returns a string which is a response obtained from a SOAP server.
setLogin Sets the SOAP request login for authorisation via HTTP Basic.
setPassword Sets the SOAP request password for authorisation via HTTP Basic.
login Returns the previously set login.
password Returns the previously set password.

Example 1 (internal test)

function TestComponent() 
	$client = new CSOAPClient( "bitrix.soap", $APPLICATION->GetCurPage() );
	$request = new CSOAPRequest( "wsTestStartOut1", "http://bitrix.soap/" );
	$request->addParameter("str1", "qwe");
	$request->addParameter("str2", "fjdfhgfdh");
	$request->addParameter("int3", "123");
	$response = $client->send( $request );
	echo "Call wsTestStartOut1";
	if ( $response->isFault() )
	    print( "SOAP fault: " . $response->faultCode(). " - " . $response->faultString() . "" );
	    echo "[OK]: ".mydump($response->Value);		

Example 2 (external test)


function TestComponent() 
	$client = new CSOAPClient("", "/relauto/iplookup/DNS");
	$request = new CSOAPRequest( "DNSLookup", "");
	$request->addSOAPHeader( "LicenseInfo xmlns=\"\"",
			array("UnregisteredUser" => array( "EmailAddress" => "" ))
	$request->addParameter("server", "");
	$response = $client->send( $request );
	echo "SOAPRequest: ".htmlspecialchars($client->getRawRequest());
	echo "SOAPResponse: ".htmlspecialchars($client->getRawResponse());