<div>Thanks Daniel, it worked perfectly after commenting the block. Much appreciated.</div><div> </div><div>Skyler<br><br></div><div class="gmail_quote">On Tue, Nov 20, 2012 at 6:32 AM, Daniel Tiefnig <span dir="ltr"><<a href="mailto:dtiefnig@sipwise.com" target="_blank">dtiefnig@sipwise.com</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">On 11/15/2012 08:16 PM, Skyler wrote:<br>
> Hi,<br>
<br>
Hi!<br>
<div class="im"><br>
> This results now in a new error for 2.6<br>
><br>
> PHP Fatal error: Uncaught exception 'Exception' with message 'No<br>
> value supplied' in<br>
> /home/skyler/wsdl2phpgenerator/lib/phpSource/PhpClass.php:203<br>
<br>
</div>The generator chokes on empty values in our enumeration restrictions of<br>
some parameters, like in:<br>
<br>
<simpleType name="sst_enable_usrEnum"><br>
<restriction base="xsd:string"><br>
<enumeration value="" /><br>
<enumeration value="no" /><br>
<enumeration value="yes" /><br>
</restriction><br>
</simpleType><br>
<br>
The XML Schema definition says value is "A set of values from the value<br>
space of the base type definition."[0]. The base type is "string" in<br>
this case, which allows empty values. And even though the XML Schema<br>
definition defines "value space" as "[...] the set of values for a given<br>
datatype. Each value in the value space of a datatype is denoted by one<br>
or more literals in its lexical space"[1], I would assume the "one or<br>
more literals" is a mistake in the specification, as it prohibits empty<br>
values right away.<br>
<br>
So if I'm correct, wsdl2phpgenerator should be changed to allow empty<br>
values in enumerations.<br>
Go to addConstant() in lib/phpSource/PhpClass.php and comment out the<br>
"if (strlen($value) == 0)" block at the beginning. If you're lucky,<br>
everything will work fine then.<br>
<br>
br,<br>
daniel<br>
<br>
[0] <a href="http://www.w3.org/TR/xmlschema-2/#rf-enumeration" target="_blank">http://www.w3.org/TR/xmlschema-2/#rf-enumeration</a><br>
[1] <a href="http://www.w3.org/TR/xmlschema-2/#dt-value-space" target="_blank">http://www.w3.org/TR/xmlschema-2/#dt-value-space</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
<a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a><br>
</div></div></blockquote></div><br>