Re: [SOAP] WSDL with attributes?

From: Date: Mon, 11 Jun 2007 16:40:54 +0000
Subject: Re: [SOAP] WSDL with attributes?
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-2559@lists.php.net to get a copy of this message
You can handle elements with attributes in PHP just like you would handle ComplexTypes. The magic trick is to place content under "_" class field. E.g (a simple string element with attributes) $element = new StdClass(); $element->_ = "value"; $element->param1 = "val1"; $element->param2 = "val2"; It should generate content like this: <element param1="val1" param2="val2">value</element> I know, looks crazy :-) I had similar issue with Apache AXIS-generated WSDL files. As a side note - if you have anything to say about what goes into WSDL - eliminate the need for attributes. They are horribly non-scalable.

« previous php.soap (#2559) next »