PEAR::SOAP and same name/level nodes
| From: | Luis Corrêa d'Almeida | Date: | Wed, 01 Mar 2006 12:29:29 +0000 |
| Subject: | PEAR::SOAP and same name/level nodes | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-23178@lists.php.net to get a copy of this message | ||
Hi,
I am using PEAR::SOAP 0.9.3. I am trying to build a SOAP message that
looks something like
<?xml version="1.0" encoding="UTF-8"?>
<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:ns4="https://myserver/api/"
>
<SOAP-ENV:Header>
<email
SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"
SOAP-ENV:mustUnderstand="0">luis@m3.net</email>
<password
SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"
SOAP-ENV:mustUnderstand="0">password</password>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns4:add>
<ns4:parentId>25264</ns4:parentId>
<ns4:myNewEntity>
<ns4:id>0</ns4:id>
<ns4:text>my text 1</ns4:text>
</ns4:myNewEntity>
<ns4:myNewEntity>
<ns4:id>0</ns4:id>
<ns4:text>my text 2</ns4:text>
</ns4:myNewEntity>
</ns4:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Using PEAR::SOAP, I am not able to have 2 nodes (myNewEntity) with the
same name at the same level. This is primarily due to the fact that you
can't have 2 identical keys in the same hash. I tried using complex
types and SOAP_Value objects, but it creates an item node, which i can't
have.
Is there a way to achieve this?
Thanks,
Luis