Re: [SOAP] WSDL with attributes?

[email protected] (Ammarmar)
Newsgroups php.soap
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.