I am consuming the MapPoint .NET web service using PHP5. My preferred
option would be to use the built-in soap classes since they are more
tightly coupled with PHP and should be quicker because they are written
in C.. All seems to work fine until now, I have a problem creating a
cetain complex types.
This is the request generated by the MS example code for the GetMap()
function which worked as desired but required NuSOAP:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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:si="http://soapinterop.org/xsd" xmlns:nu="http://testuri.org"
xmlns:tns="http ://s.mappoint.net/mappoint-30/">
<SOAP-ENV:Body>
<GetMap xmlns="http://s.mappoint.net/mappoint-30/">
<specificatio n>
<DataSourceName >MapPoint.NA</DataSourceName>
<Options>
<Format>
<Height>550</Height>
<Width>600</Width>
</Format>
<ReturnType>Ret urnUrl</ReturnType>
<PanHorizontal> 0.8</PanHorizontal>
<PanVertical> 0</PanVertical>
</Options>
<Pushpins>
<Pushpin>
<IconDataSource >MapPoint.icons </IconDataSource>
<IconName>Coffe eShopIcon</IconName>
<Label>Fourth Coffee Store #7174</Label>
<LatLong><Latit ude>40.71824638 889</Latitude><Longi tude>-73.98562027778</Longitude></LatLong>
<PinID>0</PinID></Pushpin></Pushpins>
<Views>
<MapView xsi:type="tns:V iewByHeightWidt h">
<Height>0.49999 999999986722</Height>
<Width>0.545454 54545440075</Width>
<CenterPoint>
<Latitude>40.71 1058676066827</Latitude>
<Longitude>-73.957689818411 112</Longitude>
</CenterPoint>
</MapView>
</Views>
</specification>
</GetMap>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The bit which is causing problems is changing the type of MapView:
<Views><MapVi ew xsi:type="tns:V iewByHeightWidt h">...
MapView is an abstract class and has four derived classes, one of which
is ViewByHeightWid th. See
http://msdn.microsoft.com/library/de...nClMapView.asp
I can't find a solution to this problem and wondering if the built-in
soap classes support this functionality?
Any ideas would be very much appreciated.
Thank you in advance for any feedback!
Alex