473,425 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Complex Type using PHP SoapClient

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/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
Jul 17 '05 #1
1 3793
I also emailed one of the developers of ext/soap with this problem and
it turns out I have uncovered a bug which will be patched in version
5.0.5-dev and 5.1 and is currently available on CVS.

Cheers

Alex
Alex wrote:
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/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

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
0
by: David | last post by:
Hi everyone, I wonder how is it possible to make PHP SOAP extension convert the returned complex type to an instance of one of my classes. Here I give you a short example: complexTest.wsdl:...
3
by: PaulF | last post by:
Is it possible to use a SoapClient derived class to send a message to a Web Service (eg a .asmx file)? It it is, does anyone have any code they could point me at that actually does this ! ...
2
by: Jose Maestro | last post by:
I am using MS SOAP client provided with SOAP Toolkit 3.0. I have set the timeout for this application to 20 seconds. On some occasions, when there are network problems and the call to the...
2
by: (PeteCresswell) | last post by:
Seems like the toolkit does not handle complex data types. But that seems like much of the real world - once you get past something like just looking up a SIC code or adding two numbers. I see...
0
by: Florian Laws | last post by:
Hello, to work around an interoperability problem with the PHP5 SOAP extension, I'd like to modify the generate XML SOAP request. (as described in...
0
by: frugalprogrammer | last post by:
I'm pretty sure what I'm up against now is a namespace issue and/or a misunderstanding of how to use SoapVar. From the NetSuite docs, the request should look something like: <soapenv:Body>...
2
by: oh.i.love.spam | last post by:
This is just an example... I don't have the access/ability to upload the actual code. Here is the meat in the XML that is returned from the $client- <VesselConfigurations...
1
by: obj63 | last post by:
Hi All, TIA, but currently I am trying to make a soap call to an API and I am not able to get the soap body to conform properly. The current soap body that I am generating is <SOAP-ENV:Body>...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.