Why is response type empty?
[email protected] (Shmuel Aharon Kam) Mon, 18 Jul 2011 21:23:41 +0200
| Newsgroups | php.soap |
|---|---|
| Message-ID | <CAPn0MofquhSoV9Cf3K-kVJRz70sUBc6W+VQtVvA=hc8HOJ4_bQ@mail.gmail.com> |
Hello all,
Richard and Justin having been so helpful with my previous query, I'm
stuck on the complementary operation. Before the client sent a complex
Person object and received an int in reply. Now I need to send that
int and receive a=A0Person object in return.
I have a question and a problem:
1) Likely sounds silly: In defining the WSDL (I use The Eclipse
WebTools GUI), I have the two operations, InsertID and GetUser. Why
must I define two new wsdl:message types, instead of using the two
defined for the first operation in the reverse order??
2) No matter how I wrap it or whatever, the GetUserResponse type comes
back completely empty. Is this the infamous "can't return complex
objects issue"?? I tried the work-around suggested by nodkz in the PHP
manual ( http://www.php.net/manual/en/book.soap.php#83409 ), but that
didn't work either. :-(
here's the XML received by the client. It's even missing a matching
<out/> tag. Is that even valid??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1=3D"http://localhost/TestSOAP/">
<SOAP-ENV:Body>
<ns1:GetUserResponse><out/>
</ns1:GetUserResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On the Server side, the objects, before serialization look fine:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Person Object
(
[ID] =3D> 342
[Name] =3D> Cohen
)
GetUserResponse Object
(
[out] =3D>
[Person] =3D> Person Object
(
[ID] =3D> 342
[Name] =3D> Cohen
)
)
SoapVar Object
(
[enc_type] =3D> 301
[enc_value] =3D> GetUserResponse Object
(
[out] =3D>
[Person] =3D> Person Object
(
[ID] =3D> 342
[Name] =3D> Cohen
)
)
[enc_stype] =3D> GetUserResponse
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thank you once again,
Shmuel-Aharon Kam
--
You're just jealous because the voices only talk to me.
Shmuel A. Kam
[email protected]