(PHP 5, PHP 7)
SoapVar::SoapVar — SoapVar-Konstruktor
$data
, string $encoding
[, string $type_name
[, string $type_namespace
[, string $node_name
[, string $node_namespace
]]]] )Erstellt ein neues SoapVar-Objekt.
data
Die zu übergebenden oder zurückzugebenden Daten.
encoding
Die Encoding-ID, eine der XSD_...-Konstanten.
type_name
Der Type-Name.
type_namespace
Der Type-Namespace.
node_name
Der XML-Nodename.
node_namespace
Der XML-Node-Namespace.
Beispiel #1 SoapVar::SoapVar()-Beispiel
<?php
class SOAPStruct {
function SOAPStruct($s, $i, $f)
{
$this->varString = $s;
$this->varInt = $i;
$this->varFloat = $f;
}
}
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$struct = new SOAPStruct('arg', 34, 325.325);
$soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd");
$client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
?>