Re: [SOAP] PHP 5 SOAP extension : problem with response containing several tags with the same name
| From: | PiRanha | Date: | Tue, 07 Feb 2006 17:15:29 +0000 |
| Subject: | Re: [SOAP] PHP 5 SOAP extension : problem with response containing several tags with the same name | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2122@lists.php.net to get a copy of this message | ||
Hi Dimitri.
Please find below an example of XML response (got from Ethereal traces) to
my SOAP call :
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/>
<soapenv:Body>
<getServiceSubscriptionsResponse
xmlns="http://test.enabler.sei/UserInfoQueryByIDSEI">
<getServiceSubscriptionsReturn
xmlns="http://test.enabler.sei/UserInfoCSRQueryByIDSEI">
<beginDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2004-11-18T00:00:00.000Z
</beginDate>
<endDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2006-11-17T00:00:00.000Z
</endDate>
<subscribedVP
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">0</subscribedVP>
<subState xmlns="http://test.enabler.sei.eto/UserInfoEnabler">A</subState>
<serviceId
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">SRV1</serviceId>
<srvProfile xsi:nil="true"
xmlns="http://test.enabler.sei.eto/UserInfoEnabler"/>
</getServiceSubscriptionsReturn>
<getServiceSubscriptionsReturn
xmlns="http://test.enabler.sei/UserInfoCSRQueryByIDSEI">
<beginDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2004-11-18T00:00:00.000Z
</beginDate>
<endDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2006-11-17T00:00:00.000Z
</endDate>
<subscribedVP
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">0</subscribedVP>
<subState xmlns="http://test.enabler.sei.eto/UserInfoEnabler">A</subState>
<serviceId
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">SRV2</serviceId>
<srvProfile xsi:nil="true"
xmlns="http://test.enabler.sei.eto/UserInfoEnabler"/>
</getServiceSubscriptionsReturn>
<getServiceSubscriptionsReturn
xmlns="http://test.enabler.sei/UserInfoCSRQueryByIDSEI">
<beginDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2004-12-02T00:00:00.000Z
</beginDate>
<endDate
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">2006-12-01T00:00:00.000Z
</endDate>
<subscribedVP
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">0</subscribedVP>
<subState xmlns="http://test.enabler.sei.eto/UserInfoEnabler">U</subState>
<serviceId
xmlns="http://test.enabler.sei.eto/UserInfoEnabler">SRV3</serviceId>
<srvProfile xsi:nil="true"
xmlns="http://test.enabler.sei.eto/UserInfoEnabler"/>
<paramValues
xmlns="http://test.enabler.sei.eto/UserInfoEnabler"><name>defaultAlias</name
><value>test@test.com</value></paramValues>
</getServiceSubscriptionsReturn>
</getServiceSubscriptionsResponse>
</soapenv:Body>
</soapenv:Envelope>
And this is what is displayed when I make a "print_r($result);" ($result is
the value returned by the "__soapCall" method) :
Array ( [getServiceSubscriptionsReturn] => stdClass Object ( [beginDate] =>
2004-12-02T00:00:00.000Z [endDate] => 2006-12-01T00:00:00.000Z
[subscribedVP] => 0 [subState] => U [serviceId] => SRV3 [srvProfile] =>
[paramValues] => stdClass Object ( [name] => defaultAlias [value] =>
test@test.com ) ) )
Remarks :
I only use the PHP5 SOAP extension for querying the WebService (client-side
functions).
The WebService itself does not use PHP (it is a Java implementation) and it
is not mine.
Regards.
PiRanha
""Dmitry Stogov"" <dmitry@zend.com> wrote in message
news:000a01c62bd6$ae04be60$6e02a8c0@thinkpad...
> Hi PiRanha,
>
> Please provide an example. Then I'll able to check.
>
> Thanks. Dmitry.
>
> > -----Original Message-----
> > From: PiRanha [mailto:PiR_94@ifrance.com]
> > Sent: Tuesday, February 07, 2006 12:05 PM
> > To: soap@lists.php.net
> > Subject: [SOAP] PHP 5 SOAP extension : problem with response
> > containing several tags with the same name
> >
> >
> > Hello,
> >
> > I have the following problem with the PHP 5 (5.1.1) SOAP
> > extension : The WebService I call has an operation
> > (getServiceSubscriptions) that returns a list of
> > subscriptions for a user (see extracts of the WSDL below)
> >
> > <wsdl:operation name="getServiceSubscriptions">
> > <wsdl:input message="impl:getServiceSubscriptionsRequest"
> > name="getServiceSubscriptionsRequest"/>
> > <wsdl:output message="impl:getServiceSubscriptionsResponse"
> > name="getServiceSubscriptionsResponse"/>
> > <wsdl:fault message="impl:EnablerException"
> > name="EnablerException"/>
> > <wsdl:fault message="impl:InvalidUserException"
> > name="InvalidUserException"/>
> > <wsdl:fault message="impl:NotAuthorizedException"
> > name="NotAuthorizedException"/>
> > </wsdl:operation>
> >
> > <element name="getServiceSubscriptionsResponse">
> > <complexType>
> > <sequence>
> > <element maxOccurs="unbounded"
> > name="getServiceSubscriptionsReturn"
> > type="tns4:ServiceSubscriptionETO"/>
> > </sequence>
> > </complexType>
> > </element>
> >
> > It can be seen above that the SOAP response may contain more
> > than one "getServiceSubscriptionsReturn" tags. My problem is
> > that, when this is the case, the response returned by the
> > __soapCall() method only contains one
> > "getServiceSubscriptionsReturn" : the last one. Is it a bug ?
> > (already corrected in 5.1.2 or not)
> >
> > Thanks in advance for your help.
> > PiRanha
> >
> > --
> > PHP Soap Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >