goetas/xsd2php

Problem deserializing

Closed this issue · 3 comments

I'm having a problem deserializing XML into PHP. I get an object back, but all fields are null.

Code and generated files can be found here: http://pastie.org/private/jkbrrqdmzmzykydh3hecha

My output:

class GenExample\Generated\MyXMLNamespace\Response#49 (4) {
  private $returnCode =>
  NULL
  private $authCode =>
  NULL
  private $authTkt =>
  NULL
  private $returnMessage =>
  NULL
}

Related: #46?

Your example xml need the xmlns attribute, since you declared a target namespace inside your xsd

Thanks. I thought I tried that, but I must have done it incorrectly. Works now.

The way my XML is structured I am forced to get a child node, then add it to an element in the correct namespace.

I do not have really understood the solution, but if you think that I can help you, do not hesitate to re open the issue