php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45521 SoapClient is not working with wsi compliant web services
Submitted: 2008-07-15 13:46 UTC Modified: 2009-02-21 01:00 UTC
Votes:20
Avg. Score:4.8 ± 0.5
Reproduced:19 of 19 (100.0%)
Same Version:10 (52.6%)
Same OS:9 (47.4%)
From: sanderovich at avaya dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.6 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sanderovich at avaya dot com
New email:
PHP Version: OS:

 

 [2008-07-15 13:46 UTC] sanderovich at avaya dot com
Description:
------------
Hello All, 

I am trying to use soap php's soap client(version 5.2.6) with axis 1.4. 
The axis's wsdl is WSI compliant and doc\literal\wrapped.  
The problem is that the soap client does not create the soap body correctly, e.g it uses SOAP-ENC structures(both on wsdl and on non-wsdl modes).
For example, the following php structure:
stdClass Object
(
    [pagingFilteringSortingParameters] => stdClass Object
        (
            [startItemIndex] => 0
            [endItemIndex] => 34
            [filterList] => Array
                (
                    [0] => filterList Object
                        (
                            [fieldName] => IPAddress
                            [fieldValue] => 149
                            [filterType] => likeFilterType
                        )

                    [1] => filterList Object
                        (
                            [fieldName] => gatewayType
                            [fieldValue] => i40
                            [filterType] => likeFilterType
                        )

                )

        )

)

is translated into the following soap body:
<SOAP-ENV:Body>
            <ns1:getBranchPartialList>
                <pagingFilteringSortingParameters>
                    <startItemIndex>
                        0
                        </startItemIndex>
                    <endItemIndex>
                        34
                        </endItemIndex>
                    <filterList>
                        <SOAP-ENC:Struct>
                            <fieldName>
                                IPAddress
                                </fieldName>
                            <fieldValue>
                                149
                                </fieldValue>
                            <filterType>
                                likeFilterType
                                </filterType>
                            </SOAP-ENC:Struct>
                        <SOAP-ENC:Struct>
                            <fieldName>
                                gatewayType
                                </fieldName>
                            <fieldValue>
                                i40
                                </fieldValue>
                            <filterType>
                                likeFilterType
                                </filterType>
                            </SOAP-ENC:Struct>
                        </filterList>
                    </pagingFilteringSortingParameters>
                </ns1:getBranchPartialList>
            </SOAP-ENV:Body>

Instead of the following structure:
<SOAP-ENV:Body>
            <ns1:getBranchPartialList
                xmlns:ns1="http://xml.avaya.com/im/decm/guiws/07062006">
                <pagingFilteringSortingParameters>
                    <startItemIndex>
                        0
                    </startItemIndex>
                    <endItemIndex>
                        34
                    </endItemIndex>
                    <filterList>
                        <fieldName>
                            IPAddress
                        </fieldName>
                        <fieldValue>
                            149
                        </fieldValue>
                        <filterType>
                            likeFilterType
                        </filterType>
                    </filterList>
                    <filterList>
                        <fieldName>
                            gatewayType
                        </fieldName>
                        <fieldValue>
                            i40
                        </fieldValue>
                        <filterType>
                            likeFilterType
                        </filterType>
                    </filterList>
                    <sorterList>
                        <fieldName>
                            branchName
                        </fieldName>
                        <descending>
                            true
                        </descending>
                    </sorterList>
                 </pagingFilteringSortingParameters>
             </ns1:getBranchPartialList>
What i suggest is to add a flag to the soapClient\SoapServer feature flag that will use the array name instead of SOAP-ENC:Struct. The same 
rule should apply for arrays.
If anyone wishes to reproduce this problem, please send an email to sanderovich@avaya.com and i will send the source codes.

Thanks,
Oren


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-13 23:07 UTC] felipe@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-02-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 17:01:31 2024 UTC