PEAR SOAP map call
| From: | Lars Olesen | Date: | Sat, 23 Dec 2006 03:00:33 +0000 |
| Subject: | PEAR SOAP map call | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-26183@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have investigated the matter further, and I have found the solution to
my first problem. But there is still problems. I am using the following
php code:
[php]
require 'SOAP/Client.php';
$soapclient = new
SOAP_Client('http://aws.oio.dk/oas/2/FindAddressService.asmx');
$options = array(
'namespace' => 'FindAddressService',
'trace' => 1,
'soapaction' =>
'http://xmltools.oio.dk/oas/webservice/2/FindAddressAccess'
);
$ret = $soapclient->call(
'FindAddressAccess',
array(
'NamedStreetTextInput' => 'Thingvallagade',
'StreetBuildingIdentifier' => '5',
'MunicipalitySearch' => array('MunicipalityCode' => '',
'IncludeNeighbour' => false),
'DistrictSearch' => array('DistrictName' => '',
'IncludeNeighbour' => false),
'DistrictSubdivisionSearch' =>
array('DistrictSubdivisionIdentifier' => '')
),
$options
);
[/php]
Which generates the following soap-call.
[code]
POST /oas/2/FindAddressService.asmx HTTP/1.0
User-Agent: PEAR-SOAP 0.8.0RC4-devel
Host: aws.oio.dk
Content-Type: text/xml; charset=UTF-8
Content-Length: 655
SOAPAction: "http://xmltools.oio.dk/oas/webservice/2/FindAddressAccess"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="FindAddressService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:FindAddressAccess>
<NamedStreetTextInput
xsi:type="xsd:string">Thingvallagade</NamedStreetTextInput>
<StreetBuildingIdentifier
xsi:type="xsd:string">5</StreetBuildingIdentifier>
<MunicipalitySearch>
<MunicipalityCode xsi:type="xsd:string"></MunicipalityCode>
<IncludeNeighbour xsi:type="xsd:boolean">false</IncludeNeighbour>
</MunicipalitySearch>
<DistrictSearch>
<DistrictName xsi:type="xsd:string"></DistrictName>
<IncludeNeighbour xsi:type="xsd:boolean">false</IncludeNeighbour>
</DistrictSearch>
<DistrictSubdivisionSearch>
<DistrictSubdivisionIdentifier
xsi:type="xsd:string"></DistrictSubdivisionIdentifier>
</DistrictSubdivisionSearch>
</ns4:FindAddressAccess>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[/code]
However, I am getting the always lovely error: Unknown error. I am aware
that the SOAP-call should match the specifications found here:
http://aws.oio.dk/oas/2/FindAddressS...dAddressAccess
Anyone have an idea how to make the soap call match what the server expects?
Regards
Lars Olesen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFjJvR38cNW+2JLEoRAjpAAJ9HcrGFIIN3Q63BHc9ETPi+o3rvAQCgkXna
9PoFcIWwJRaFG6GclSL5haI=
=a21/
-----END PGP SIGNATURE-----