[Spce-user] SoapFault exception error

Skyler skchopperguy at gmail.com
Thu Nov 22 07:17:44 EST 2012


Thanks Daniel, it worked perfectly after commenting the block. Much
appreciated.

Skyler

On Tue, Nov 20, 2012 at 6:32 AM, Daniel Tiefnig <dtiefnig at sipwise.com>wrote:

> On 11/15/2012 08:16 PM, Skyler wrote:
> > Hi,
>
> Hi!
>
> > This results now in a new error for 2.6
> >
> > PHP Fatal error:  Uncaught exception 'Exception' with message 'No
> > value supplied' in
> > /home/skyler/wsdl2phpgenerator/lib/phpSource/PhpClass.php:203
>
> The generator chokes on empty values in our enumeration restrictions of
> some parameters, like in:
>
>   <simpleType name="sst_enable_usrEnum">
>     <restriction base="xsd:string">
>       <enumeration value="" />
>       <enumeration value="no" />
>       <enumeration value="yes" />
>     </restriction>
>   </simpleType>
>
> The XML Schema definition says value is "A set of values from the value
> space of the base type definition."[0]. The base type is "string" in
> this case, which allows empty values. And even though the XML Schema
> definition defines "value space" as "[...] the set of values for a given
> datatype. Each value in the value space of a datatype is denoted by one
> or more literals in its lexical space"[1], I would assume the "one or
> more literals" is a mistake in the specification, as it prohibits empty
> values right away.
>
> So if I'm correct, wsdl2phpgenerator should be changed to allow empty
> values in enumerations.
> Go to addConstant() in lib/phpSource/PhpClass.php and comment out the
> "if (strlen($value) == 0)" block at the beginning. If you're lucky,
> everything will work fine then.
>
> br,
> daniel
>
> [0] http://www.w3.org/TR/xmlschema-2/#rf-enumeration
> [1] http://www.w3.org/TR/xmlschema-2/#dt-value-space
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20121122/ce05f7cc/attachment.html>


More information about the Spce-user mailing list