Posted by olafmol on 08/26/05 15:34
Hello,
i have a problem using a .NET WSDL Webservice from PHP. Using both the
NuSOAP lib for PHP4, and the build-in SOAP lib for PHP5 it seems that the
SOAP client cannot pass a variable amount of complex datatypes to the WSDL
webservice.
This is the request-structure we've been using:
<EzCreateAuctionArray xmlns=http://www.blabla.com>
<mySewInfo>
<UserToken>string</UserToken>
<UserID>string</UserID>
<EnvironmentID>int</EnvironmentID>
</mySewInfo>
<theColl>
<SimpleItemType>
<Title>string</Title>
<Subtitle>string</Subtitle>
<Description>string</Description>
</SimpleItemType>
<SimpleItemType>
<Title>string</Title>
<Subtitle>string</Subtitle>
<Description>string</Description>
</SimpleItemType>
</theColl>
</EzCreateAuctionArray>
as you can see this structure is setup to accept a variable amount of
<SimpleItemType> datastructures. When setting up the correct data in PHP i
am using associative arrays and this works fine. The problem is that the
associative index-key needs to be exactly the same as the item-name in the
WSDL request structure. So if i f.e. use "theColtest123" instead of
"theColl" the request cannot be created correctly as there isn't a match
between the WSDL and my input data structure. This is not really a problem,
but it becomes one when i want to add multiple items of the
"SimpleItemType". It's impossible to add more than 1 of these to an
associative array because the key has to be unique. And by using other
key-names the WSDL structure is not the same anymore, so the request isn't
passed.
Can anyone tell me if there is a way to pass a variable amount of complex
datatypes from within PHP to a WSDL SOAP webservice?
Cheers! Olaf
[Back to original message]
|