Posted by Alex on 06/20/05 14:59
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/">
<specification>
<DataSourceName>MapPoint.NA</DataSourceName>
<Options>
<Format>
<Height>550</Height>
<Width>600</Width>
</Format>
<ReturnType>ReturnUrl</ReturnType>
<PanHorizontal>0.8</PanHorizontal>
<PanVertical>0</PanVertical>
</Options>
<Pushpins>
<Pushpin>
<IconDataSource>MapPoint.icons</IconDataSource>
<IconName>CoffeeShopIcon</IconName>
<Label>Fourth Coffee Store #7174</Label>
<LatLong><Latitude>40.71824638889</Latitude><Longitude>-73.98562027778</Longitude></LatLong>
<PinID>0</PinID></Pushpin></Pushpins>
<Views>
<MapView xsi:type="tns:ViewByHeightWidth">
<Height>0.49999999999986722</Height>
<Width>0.54545454545440075</Width>
<CenterPoint>
<Latitude>40.711058676066827</Latitude>
<Longitude>-73.957689818411112</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><MapView xsi:type="tns:ViewByHeightWidth">...
MapView is an abstract class and has four derived classes, one of which
is ViewByHeightWidth. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mappointsdk/html/mpn35devCommonClMapView.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
Navigation:
[Reply to this message]
|