I'm calling a service witch among many other parameters demands an entry like (Taken from soapUI):
<v110:ReadWorkerRequest> <v111:Key v111:type="INITIALS">RKM</v111:Key> </v110:ReadWorkerRequest>
How do I get the Zend_Soap_Client to send the type-attribute in the Key element?
As this is just part of a rather big service, I've been creating classes to create the datastructure, like:
class Key {
public $_ = 'RKM;
public $type = 'INITIALS';
}
class Body {
public $ReadWorkerRequest;
public function __construct() {
$this->ReadWorkerRequest = new Key();
}
}
However, I do not even get to sending the request as PHP fails, telling me: "SOAP-ERROR: Encoding: object hasn't 'Key' property"
So my question is, how do I create an object structure, possibly with a subpart created as an Array which will honor this?
Or is the object structure correct, and I need to use classmap or SoapVar (I tried some combinations, but not with any success)
Happy holidays, for those of you who has them! :-)
I have spent many hours myself trying to solve this problem but the best I could come up with was to use the XSD_ANYXML hack, eg:
Its a pretty nasty hack though. Hopefully somebody else can provide a better solution.