473,799 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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/">
<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
Jul 17 '05 #1
1 3813
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/">
<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

Jul 17 '05 #2

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

Similar topics

2
32087
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 complex type: <s:complexContent><s:restriction base="SOAP-ENC:Array"><s:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string"/></s:complexContent> Actual Output :
0
2628
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: <?xml version="1.0" encoding="UTF-8"?>
3
2300
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 ! Thanks Paul
2
8256
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 webservice is not able to complete succesfully, the client waits for 50 seconds before returning an error. I include an example of the code I am using to set this timeout: dim SOAPClient dim par_WSDLFile, par_ServiceName, par_Port
2
3586
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 something about the SOAP 2.0 toolkit... then I see that there's a SOAP 3.0... and then I see a note somewhere something like "Support for SOAP 3.0 will be discontinued on (sometime in 2005)".
0
4758
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 http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesforce.com-and-PHP.html ) To acheive this, I subclass SoapClient and overwrite the __doRequest() method. According to the PHP documentation and the article above, the
0
1986
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> <search xmlns="urn:messages_2_5.platform.webservices.netsuite.com"> <searchRecord xsi:type="ns1:ContactSearch" xmlns:ns1="urn:relationships_2_5.lists.webservices.netsuite.com"> <ns1:customerJoin xsi:type="ns2:CustomerSearchBasic"
2
2343
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 xmlns="http://thisUrl.com/Types"> <VehicleConfiguration xsi:type="CarConfig" Manufacturer="Porsche" Model="911" SerialNumber="1234567890-A" Color="red" />
1
5371
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> <ns1:CancelEnhancedListing xsi:type="ns1:135"> <item><key>ListingID</key><value>12</value></item> </ns1:CancelEnhancedListing> </SOAP-ENV:Body>
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7570
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.