When a struct contains properties with invalid names (such as "my-property"), the setter is named setMy_property but the property which is set is $this->{'my-property'} so when the object is sent to the SoapClient, this is the right value that is used. When we use var_export, then the property is exported as "my-property" but the __set_state() method, called in the WsdlClass when loading the exported object, only considers valid attribute names to call the setter. To fix this issue, we then also set the valid attribute name $this->my_property in the setMy_property() method, the setter. So the setter method, setMy_property() is called accordingly to the attribute name when the __set_state() method is called and everything goes well!