Edit report at http://bugs.php.net/bug.php?id=53234&edit=1

 ID:                 53234
 Comment by:         vadim dot sacharow at pali dot de
 Reported by:        vadim dot sacharow at pali dot de
 Summary:            "SOAP-ERROR: Encoding: object hasn't 'xxx' property"
                     for xsd-choice element
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   Windows XP
 PHP Version:        5.2.14
 Block user comment: N

 New Comment:

The bug 50997 seems to describe the same problem


Previous Comments:
------------------------------------------------------------------------
[2010-11-03 10:51:44] vadim dot sacharow at pali dot de

Description:
------------
I have the following xsd-part:

<xs:choice>

    <xs:sequence>

        <xs:element name="Company">

            <xs:complexType>

                <xs:complexContent>

                        <xs:extension base="Company"/>

                </xs:complexContent>

            </xs:complexType>

        </xs:element>

        <xs:element name="ContactPerson" type="Person" minOccurs="0">

        </xs:element>

    </xs:sequence>

    <xs:element name="Person" type="Person">

    </xs:element>

</xs:choice>



Its a choice-element. I expect, that my request must have just one of
following two elements:

a. sequence of Company and ContactPerson

b. Person



But when i try to send a request, that has a Person, i get the
SOAP-ERROR: Encoding: object hasn't 'Company' property



If i change the places of a and b in wsdl definition file - everything
works perfect with Person.



I think, that SoapClient working in wsdl-mode doesn't understand the
choice-element in the right way. SoapClient just takes the first one and
says, that this element is required - but its false, because just one of
the both (a or b) is required, and not the first element in the
choice-group.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53234&edit=1

Reply via email to