SOAP - Problems with class mapping inside arrays

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
halufa
Forum Newbie
Posts: 1
Joined: Fri Jul 10, 2009 5:40 am

SOAP - Problems with class mapping inside arrays

Post by halufa »

I'm using PHP 5.2.10 with SOAP ext, and trying to do some mapping of SOAP Complex types to PHP Classes. All seems to work fine less when an object is inside an array. In that case it come as stdClass.

Here's a var_dump of an object received in PHP via SOAP.

["msgBody"] => object(MsgBody)#5 (4) {
["var1"] => object(ClassMarvilha)#6 (1) {
["var2"] => int(212121212)
}
["var3"] => object(ClassPotente)#7 (5) {
["var4"] => int(1)
}
["listaDeVars"] => array(2) {


* => object(stdClass)#8 (2) {
["var1"] => string(6) "Coisa Feia"
["var2"] => int(0)
}
[1] => object(stdClass)#9 (2) {
["var1"] => string(6) "Coisa linda"
["var2"] => int(1)
}
}
}

Anybody knows what could be the problem?

Thanks
Post Reply