Re: WSDL with attributes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux