// the type_name and type_namespace parameters must be specified // when specifying attributes $complex_type = new SOAPVar($attributes, SOAP_ENC_OBJECT, 'ComplexType', // type_name 'http://www.example.com/namespace', // type_namespace 'complex_type', 'http://www.example.com/namespace');
$header = new SOAPHeader('http://www.example.com/namespace', 'ComplexType', $complex_type, true);