|
Dear Mr. Scott /People,
I had posted this sometime before, can you please
give me some little feed back regarding this message that I had
posted.
This is not a mulitdimentional array. Can use a
nusoap function to be able to extract it?
Any help will be highly appreciated.
Thanks a lot.
Stefan Sammut
Prev. Message
Hello People, I having a problem accessing
an unbounded innrer array in PHP v.4. Here is the WSDL schema request type
elements. <s:element name="webStop" type="s0:JTRealTimeRequestType"
/> <s:complexType
name="JTRealTimeRequestType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" form="unqualified" name="StopS
tatusRealTimeRequest"
type="s0:StopStatusRealTimeRequestType"/>
</s:sequence> </s:complexType> <s:complexType
name="StopStatusRealTimeRequestType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" form="unqualified" name=" Date"
type="s:string"/>
<s:element form="unqualified" maxOccurs="unbounded" minOccurs="0" n
ame="LocationsPairs"
type="s0:LocationsPairsType"/>
</s:sequence> </s:complexType> <s:complexType
name="LocationsPairsType">
<s:all>
<s:element form="unqualified" maxOccurs="1" minOccurs="0" name="FromSto
p"
type="s0:StopType"/>
<s:element form="unqualified" maxOccurs="1" minOccurs="0" name="ToSt op"
type="s0:StopType"/> </s:all>
</s:complexType> PHP Sample Client
$LocationsPairs[]=array
(
'rt:FromStop' =>
array
(
'rtig:NaptanStopNumber' =>
'LOC1',
'label' => 'The High
Street'
),
'rt:ToStop' =>
array
(
'rtig:NaptanStopNumber' =>
'LOC2',
'label' => 'The High
Street'
) ); $LocationsPairs[]=array
(
'rt:FromStop' =>
array
(
'rtig:NaptanStopNumber' =>
'LONE040',
'label' => 'The High
Street'
),
'rt:ToStop' =>
array
(
'rtig:NaptanStopNumber' =>
'LONE150',
'label' => 'The High
Street'
) ); foreach ($LocationsPairs as $web)
{ $webstop_soap[] = new
soapval('LocationsPairs',
'LocationsPairsType',
$web); } /
$JTRealTimeRequest = array
(
'rt:Date' =>
'19/05/2004',
$webstop_soap );
$inputSoapVal=new soapval ("JTRealTimeRequest",
"JTRealTimeRequestType", $JTRealTimeRequest, '', 'http://webStop.org');
$client = new soapclient('http://10.1.1.2:80/infowebjt.php'); PHP Server
$locs= array($JTRealTimeRequest['LocationsPairs']);
$ct = count($locs); $dt =
$JTRealTimeRequest["Date"]; create_temp_table($conn_id);
for ($i = 0 ; $i<$ct; $i++) { $floc1 =
$locs[$i]["FromStop"]; $floc2 = $locs[$i]["ToStop"];
The $JTRealTimeRequest is passed to the server service as a
parameter. WSDL parses OK, however I can't access when a have more then one
element of 'LocationsPairs']); type. i.e. Only When I pass one array it
works..... Any ideas please...It this a PHP issue..
Thanks in advance... Stefan Sammut
|