|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51165 Using XSD_ANYTYPE removes method response tags in SOAP response
Submitted: 2010-02-27 07:29 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:6 of 6 (100.0%)
Same Version:5 (83.3%)
Same OS:5 (83.3%)
From: tok at iki dot fi Assigned:
Status: Open Package: SOAP related
PHP Version: 5.2.13 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
45 - 4 = ?
Subscribe to this entry?

 [2010-02-27 07:29 UTC] tok at iki dot fi
function function1() {
  return new SoapVar("some text",XSD_STRING);
function function2() {
  return new SoapVar("<tag>some text</tag>",XSD_ANYXML);

$soapserver = new SoapServer("mywsdl.wsdl");

Requesting function1 will produce

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="myns">
      <ns1:function1Response>some text</ns1:function1Response>

but requesting function2 will produce

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="myns">
      <tag>some text</tag>

The method name response tags are missing here. The Body-part should be

  <tag>some text</tag>

Response-tags should come from WSDL as with function1.

This behaviour is also demostrated in


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 08:03:45 2023 UTC