SOAP
[ class tree: SOAP ] [ index: SOAP ] [ all elements ]

Source for file example_types.php

Documentation is available at example_types.php

  1. <?php
  2.  
  3. /*
  4. * this is a data type that is used in SOAP Interop testing, but is
  5. * here as an example of using complex types.  When the class is
  6. * deserialized from a SOAP message, it's constructor IS NOT CALLED!
  7. * So your type classes need to behave in a way that will work
  8. * with that.
  9. *
  10. * Some types may need more explicit serialization for SOAP.  The
  11. * __to_soap function allows you to be very explicit in building the
  12. * SOAP_Value structures.  The soap library does not call this directly,
  13. * you would call it from your soap server class, echoStruct in the server
  14. * class is an example of doing this.
  15. */
  16. class SOAPStruct {
  17.     var $varString;
  18.     var $varInt;
  19.     var $varFloat;
  20.     function SOAPStruct($s=NULL$i=NULL$f=NULL{
  21.         $this->varString $s;
  22.         $this->varInt $i;
  23.         $this->varFloat $f;
  24.     }
  25.     
  26.     function &__to_soap($name 'inputStruct'$header=false$mustUnderstand=0$actor='http://schemas.xmlsoap.org/soap/actor/next')
  27.     {
  28.         $inner[=new SOAP_Value('varString','string',$this->varString);
  29.         $inner[=new SOAP_Value('varInt','int',$this->varInt);
  30.         $inner[=new SOAP_Value('varFloat','float',$this->varFloat);
  31.         if ($header{
  32.             return new SOAP_Header($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner,$mustUnderstand,$actor);
  33.         }
  34.         return new SOAP_Value($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner);
  35.         
  36.     }
  37. }
  38.  
  39. ?>

Documentation generated on Mon, 11 Mar 2019 14:20:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.