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

From: Date: Wed, 03 Nov 2010 09:51:45 +0000
Subject: Bug #53234 [NEW]: "SOAP-ERROR: Encoding: object hasn't 'xxx' property" for xsd-choice element
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155731@lists.php.net to get a copy of this message
From:             
Operating system: Windows XP
PHP version:      5.2.14
Package:          SOAP related
Bug Type:         Bug
Bug description:"SOAP-ERROR: Encoding: object hasn't 'xxx' property" for
xsd-choice element

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 bug report at http://bugs.php.net/bug.php?id=53234&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53234&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53234&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53234&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53234&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53234&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53234&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53234&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53234&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53234&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53234&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53234&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53234&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53234&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53234&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53234&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53234&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53234&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53234&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53234&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53234&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53234&r=mysqlcfg



Thread (8 messages)

« previous php.bugs (#155731) next »