FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=14328&edit=1

ID: 14328
Updated by: daniel.oconnor@gmail.com
Reported By: s dot kruger at 3-gsp dot com
Summary: WSDL decoding of embedded complex types not working
-Status: Open
+Status: Wont fix
Type: Bug
Package: SOAP
Operating System: Gentoo Linux
Package Version: 0.11.0
PHP Version: 5.1.4
Roadmap Versions:
New Comment:

-Status: Open
+Status: Wont fix
If you are submitting patches, they need to be against svn and via diff
-u or similar.


Previous Comments:
------------------------------------------------------------------------

[2008-07-14 09:22:58] doconnor

See also - suggested design changes

Base.php
http://pastebin.com/f2f7f15c6

WSDL.php
http://pastebin.com/m5999193b

meeting.php
http://pastebin.com/f3a62a272

meeting.wsdl
http://pastebin.com/f462c062

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

[2008-07-12 13:59:45] doconnor

The attached patch isn't a patch at all.

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

[2008-07-11 05:44:03] #b61df2625b2a3709e13

Description:
------------
I'm trying to build a server using an existing wsdl file. One method
takes a complex type embedding another complex type as argument, but the
object is not correctly mapped to the classes I defined.

It seems to go wrong when WSDL decodes the received SOAP message and
tries to retrieve the type info of children on one of the arguments in
the method getComplexTypeChildType.

This method does not try to match complex types that are defined in the
top-level of the WSDL, but only [elements]. While the type of each
argument is defined in the [element], but not the type of it's children,
this goes wrong. The method should therefore first check if the type of
the parent is a top-level complex type.

Attached are a php file that acts as a SOAP server and a wsdl file that
needs to be in the same directory.

The files WSDL_fix.php and SERVER_fix.php provide a possible fix for
this problem.

Test script:
---------------
The script meetings.php produces the problem. You need to POST the
following XML to it, and it will print_r() what gets passed to the
timeZoneInformation argument in the CreateWorkspace method:

<?xml version="1.0"?>
<q:Envelope xmlns:q="http://schemas.xmlsoap.org/soap/envelope/">
<q:Header>
</q:Header>
<q:Body>
<mt:CreateWorkspace
xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/">
<mt:title>Meeting 1</mt:title>
<mt:templateName>MB0</mt:templateName>
<mt:lcid>1033</mt:lcid>
<mt:timeZoneInformation>
<mt:bias>-60</mt:bias>
<mt:standardDate>
<mt:year>0</mt:year>
<mt:month>10</mt:month>
<mt:dayOfWeek>0</mt:dayOfWeek>
<mt:day>5</mt:day>
<mt:hour>3</mt:hour>
<mt:minute>0</mt:minute>
<mt:second>0</mt:second>
<mt:milliseconds>0</mt:milliseconds>
</mt:standardDate>
<mt:standardBias>0</mt:standardBias>
<mt:daylightDate>
<mt:year>0</mt:year>
<mt:month>3</mt:month>
<mt:dayOfWeek>0</mt:dayOfWeek>
<mt:day>5</mt:day>
<mt:hour>2</mt:hour>
<mt:minute>0</mt:minute>
<mt:second>0</mt:second>
<mt:milliseconds>0</mt:milliseconds>
</mt:daylightDate>
<mt:daylightBias>-60</mt:daylightBias>
</mt:timeZoneInformation>
</mt:CreateWorkspace>
</q:Body>
</q:Envelope>



Expected result:
----------------
The print_r should show this:

TimeZoneInf Object
(
[bias] => -60
[standardDate] => SysTime Object
(
[year] => 0
[month] => 10
[dayOfWeek] => 0
[day] => 5
[hour] => 3
[minute] => 0
[second] => 0
[milliseconds] => 0
)

[standardBias] => 0
[daylightDate] => SysTime Object
(
[year] => 0
[month] => 3
[dayOfWeek] => 0
[day] => 5
[hour] => 2
[minute] => 0
[second] => 0
[milliseconds] => 0
)

[daylightBias] => -60
)


Actual result:
--------------
However, the example shows this:

TimeZoneInf Object
(
[bias] => -60
[standardDate] => stdClass Object
(
[year] => 0
[month] => 10
[dayOfWeek] => 0
[day] => 5
[hour] => 3
[minute] => 0
[second] => 0
[milliseconds] => 0
)

[standardBias] => 0
[daylightDate] => stdClass Object
(
[year] => 0
[month] => 3
[dayOfWeek] => 0
[day] => 5
[hour] => 2
[minute] => 0
[second] => 0
[milliseconds] => 0
)

[daylightBias] => -60
)

As you can see, the SysTime object is not instantiated, instead the WSDL
decoder creates stdClass objects.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 14, '12 at 1:01p
activeJan 14, '12 at 1:01p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase