php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49482 SOAP encoding although WSDL requires use='LITERAL'
Submitted: 2009-09-06 10:29 UTC Modified: 2009-09-16 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: joep at clickhere dot nl Assigned: dmitry (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.2.10 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joep at clickhere dot nl
New email:
PHP Version: OS:

 

 [2009-09-06 10:29 UTC] joep at clickhere dot nl
Description:
------------
I was hunting a bug in our soap-client. 'xsi:type' appears in the xml, even when the WSDL states 'use="literal"'.

Our client works fine with 5.2.4, but since 5.2.7/5.2.8 its broken (Also tested 5.2.9)

Came across this fix in ext/soap/php_encoding.c

+    if (encode != enc && style == SOAP_LITERAL) {
        add_type = 1;
-    }

Shouldn't that be:

if (encode != enc && style == SOAP_ENCODED) {
        add_type = 1;                           
}




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-07 13:24 UTC] dmitry@php.net
This is not a bug. In case of 'use'='ENCODED' ext/soap always adds type information and this check would just useless. In this place, it adds type name specidied in 'classmap' for LITERAL encoding because without it receiver won't be able to determine the real input type. Correct me if I'm wrong (I can't be 100% sure as I don't see your code) and demonstrate it with a small example.

BTW the 'classmap' concept is very limited. It was extended with 'typemap' concept which may give user the full control over generated XML. Probably you need to use it.
 [2009-09-08 12:24 UTC] joep at clickhere dot nl
Nothing is so obscure as the W3C documents. Therefore, "they" (microsoft  :-)  convened the WS-I group to come to some type of "best practices". But document/literal-wrapped is not a part of that. It became a "de facto" standard because MS uses it,  as do most  Java implementations. Nowhere this is described clearly (except perhaps in this document:

http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

Conclusion seems to be that xsi:type should not be sent.

Here http://jira.codehaus.org/browse/XFIRE-753 someone says that also perl is in error when it sends "xsi:type".

So we think that the current PHP-implementation is not correct, type information in document/literal is in the first place only given by the xml-schema. On the other side the axis server complains about the xsd:type and should just ignore it in this case to rely on the schema.
 [2009-09-08 13:27 UTC] dmitry@php.net
Please provide a woring example code PHP+WSDL.
 [2009-09-16 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: Thu Apr 25 17:01:29 2024 UTC