php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36245 SOAP in WDSL incorrect complex type encoding
Submitted: 2006-02-01 13:02 UTC Modified: 2006-02-02 10:50 UTC
From: hans at lintoo dot dk Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.1.2 + CVS(200602010930) OS: FreeBSD 5.4 + FreeBSD 6 + Win32
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hans at lintoo dot dk
New email:
PHP Version: OS:

 

 [2006-02-01 13:02 UTC] hans at lintoo dot dk
Description:
------------
Please excuse me if this problem is related to my code, i tried all combinations of coding methods I could think of, but still it did not return the code I was expecting.

I get the following exception:
SoapFault exception: [soap:Client] Incorrect format for named street text line
which i believe is due to incorrect coding of the complex types.

You can find the WSDL at:
http://dev.lintoo.net/findaddressservice.wsdl

Reproduce code:
---------------
<?php
header('Content-type: text/xml');
$client = new SoapClient('http://dev.lintoo.net/findaddressservice.wsdl',	array(
	'soap_version'  => SOAP_1_1,
	"trace" => 1,
	"exceptions" => 1
));
class FindAddressAccessRequest {
	public $NamedStreetTextInput;
	public $StreetBuildingIdentifier;
	public $MunicipalitySearch;
	public $DistrictSearch;
	public $DistrictSubdivisionSearch;
}
$FindAddressAccessRequest = new FindAddressAccessRequest();
$FindAddressAccessRequest->NamedStreetTextInput = "Hjallesevej";
$FindAddressAccessRequest->StreetBuildingIdentifier = "34";

$findAddressParam = array('NamedStreetTextInput' => "Hjallesevej", 'StreetBuildingIdentifier' => '34');

$client->FindAddressAccess($FindAddressAccessRequest);

print($client->__getLastRequest());
?>

Expected result:
----------------
<ns2:FindAddressAccessRequest>
<NamedStreetTextInput>Hjallesevej</NamedStreetTextInput>
<ns1:StreetBuildingIdentifier>34</ns1:StreetBuildingIdentifier>
<MunicipalitySearch/>
<DistrictSearch/>
<DistrictSubdivisionSearch/>
</ns2:FindAddressAccessRequest>

Actual result:
--------------
<ns2:FindAddressAccessRequest>
<ns2:NamedStreetTextInput>Hjallesevej</ns2:NamedStreetTextInput>
<ns1:StreetBuildingIdentifier>34</ns1:StreetBuildingIdentifier>
<ns2:MunicipalitySearch/>
<ns2:DistrictSearch/>
<ns2:DistrictSubdivisionSearch/>
</ns2:FindAddressAccessRequest>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-01 13:03 UTC] hans at lintoo dot dk
switch: Expected result & Actual result... sorry!
 [2006-02-01 14:27 UTC] hans at lintoo dot dk
Tested on:
PHP 5.1.2 - FreeBSD 5.4
PHP 5.1.2 - FreeBSD 6
PHP 5.1.2 - Win32
PHP CVS(200602010930) - Win32

Same result everywhere... :(
 [2006-02-01 16:02 UTC] tony2001@php.net
Assigned to the maintainer.
 [2006-02-02 10:50 UTC] dmitry@php.net
This is not a bug in ext/soap, but bug in your WSDL file.

You should add elementFormDefault="qualified" attribute to third <s:schema> element.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 15:01:27 2025 UTC