Documentation

CSOAPRequest::addParameter

void
CSOAPRequest::addParameter( 
    string name, 
		ЛюбойТипДанных value
)

The method addParameter adds parametrized data to be passed in a SOAP request. Those are parameters for a web service.

Parameters

Parameter Description
name The name of a parameter.
value Associated array describing the message contents in the request header. See CXMLCreator::encodeValueLight.

Example



// An example of creating a request to call a web servicу from webservice.wsdl.phpt
$request = new CSOAPRequest( "wsTestStart4", "http://bitrix.soap/" );
$request->addParameter("str1", "qwe");
$request->addParameter("str2", array(
    "1:ArrayOfsGenTestXEl" => array(
        "id" => "123",
        "name" => "qwe",
        "testa" => array(
                "1:ArrayOfsGenLiteEl" => array("id" => "56", "name" => "asd"),
                "2:ArrayOfsGenLiteEl" => array("id" => "13", "name" => "fjhg")
                )
    ),
    "2:ArrayOfsGenTestXEl" => array(
        "id" => "7653",
        "name" => "dfgsdf DASD",
        "testa" => array(
                "1:ArrayOfsGenLiteEl" => array("id" => "78", "name" => "ty"),
                "2:ArrayOfsGenLiteEl" => array("id" => "99", "name" => "3425rte")
            )
    )
));
© «Bitrix24», 2001-2024
Up