Jump to content

SOAP - Problems with class mapping inside arrays


halufa

Recommended Posts

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) {

      [0] => 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.