I need to create SOAP request like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stor="http://storage.xdoc.xx/">
<soapenv:Header/>
<soapenv:Body>
<stor:createDocument>
<parentEntryId>workspace://SpacesStore/15f33e3a-32ba-4a5d-976f-c9e2096e1112</parentEntryId>
<name>test.txt</name>
<properties module="" name="Content" type="Binary">
<valueBinary>
<bytes>cXdlcnR5</bytes>
</valueBinary>
</properties>
</stor:createDocument>
</soapenv:Body>
</soapenv:Envelope>
As far as I understand I need to use nested arrays, but the problem is in the XML properties. SoapVar seems to be not exactly what I need.
Now I have such a call:
$client->__callSoap("createDocument",
array(new SoapParam($name, "name"),
new SoapParam(
new SoapParam(
new SoapParam(
$contents,
"bytes"
),
"valueBinary"
),
"properties"
)
)
);
How to add attributes to “properties”?
Thank you in advance.
I’ve tried some variants to make this work – with nested arrays, and stdClass, and SoapVar enconded arrays, and combinations, etc. But the only variant I found to be working properly is that:
I think it should work with array for properties too.
Hope this’ll be useful for someone else.