SoapVar::SoapVar

(PHP 5 >= 5.0.1)

SoapVar::SoapVarConstructeur SoapVar

Description

SoapVar::SoapVar ( mixed $data , string $encoding [, string $type_name [, string $type_namespace [, string $node_name [, string $node_namespace ]]]] )

Construit un nouvel objet SoapVar.

Liste de paramètres

data

Les données à passer ou à retourner.

encoding

L'ID d'encodage, une des constantes XSD_....

type_name

Le nom du type.

type_namespace

Le type de l'espace de noms.

node_name

Le nom du noeud XML.

node_namespace

L'espace de noms du noeud XML.

Exemples

Exemple #1 Exemple avec SoapVar::SoapVar()

  1. <?php
  2. class SOAPStruct {
  3. function SOAPStruct($s, $i, $f)
  4. {
  5. $this->varString = $s;
  6. $this->varInt = $i;
  7. $this->varFloat = $f;
  8. }
  9. }
  10. $client = new SoapClient(null, array('location' => "http://localhost/soap.php",
  11. 'uri' => "http://test-uri/"));
  12. $struct = new SOAPStruct('arg', 34, 325.325);
  13. $soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd");
  14. $client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
  15. ?>

Voir aussi

LoadingChargement en cours