Bug #53234 [Fbk->NoF]: "SOAP-ERROR: Encoding: object hasn't 'xxx' property" for xsd-choice element

From: Date: Sun, 07 Jun 2015 04:22:20 +0000
Subject: Bug #53234 [Fbk->NoF]: "SOAP-ERROR: Encoding: object hasn't 'xxx' property" for xsd-choice element
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193177@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53234&edit=1

 ID:               53234
 Updated by:       php-bugs@lists.php.net
 Reported by:      vadim dot sacharow at pali dot de
 Summary:          "SOAP-ERROR: Encoding: object hasn't 'xxx' property"
                   for xsd-choice element
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          SOAP related
 Operating System: Windows XP
 PHP Version:      5.2.14
 Assigned To:      cmb
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2015-05-27 21:07:38] cmb@php.net

Bug #50997 has been fixed since a long time. Can this ticket also
be closed, Vadim?

------------------------------------------------------------------------
[2010-11-03 14:06:05] vadim dot sacharow at pali dot de

Some new information: the problem occurs, if the first element of the choice-group is a xs:sequence.
If the first element is a xs:element (xs:sequence as second element), then everything works fine.

------------------------------------------------------------------------
[2010-11-03 10:54:11] vadim dot sacharow at pali dot de

The bug 50997 seems to describe the same problem

------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=53234&edit=1


Thread (8 messages)

« previous php.bugs (#193177) next »