~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/soap/tests/bugs/bug39832.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #39832 (SOAP Server: parameter not matching the WSDL specified type are set to 0)
 
3
--SKIPIF--
 
4
<?php require_once('skipif.inc'); ?>
 
5
--INI--
 
6
soap.wsdl_cache_enabled=0
 
7
--FILE--
 
8
<?php
 
9
$HTTP_RAW_POST_DATA = <<<EOF
 
10
<?xml version="1.0" encoding="UTF-8"?>
 
11
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test.pl"><SOAP-ENV:Body>
 
12
<SOAP-ENV:Test>
 
13
<parameters priority="high">
 
14
<ns1:NetworkErrorCode>1</ns1:NetworkErrorCode>
 
15
</parameters>
 
16
</SOAP-ENV:Test></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
17
EOF;
 
18
 
 
19
function Test($x) {
 
20
  return $x->priority;
 
21
}
 
22
 
 
23
$x = new SoapServer(dirname(__FILE__)."/bug39832.wsdl");
 
24
$x->addFunction("Test");
 
25
$x->handle($HTTP_RAW_POST_DATA);
 
26
?>
 
27
--EXPECT--
 
28
<?xml version="1.0" encoding="UTF-8"?>
 
29
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SOAP-ERROR: Encoding: Violation of encoding rules</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>