Loading ...
Sorry, an error occurred while loading the content.

2340Element 'xmlout' can't be allowed in valid XML message. Died\n

Expand Messages
  • vanvuure <marcel_van_vuure@hotmail.com>
    Feb 4, 2003
      Hi,

      I have got a soap server that has a method 'OpenSession' that should
      return a boolean, 'return' and a string 'session id'.

      The soap envelope of how the return message should look is this:

      <SOAP-ENV:Body><ns:OpenSessionResponse xmlns:ns="zsplat::wsdl"SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <return xsi:type="xsd:boolean">true</return>
      <xmlout xsi:type="xsd:string">
      <response> <session id="2" /> </response>
      </xmlout>
      </ns:OpenSessionResponse>
      </SOAP-ENV:Body>

      How do I build such an envelope?
      I tried to do it like this (in the OpenSession function on the
      server):
      return(SOAP::Data->type('boolean')->name('return')->value
      (true), SOAP::Data->type('string')->name('xmlout')->value('<response>
      <session id=\"2\" /> </response>'));

      So I return 2 things, one 'return' and one piece of xml in a string.
      But when I test that, the actual reply message from the server to the
      client looks like this:

      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
      <faultstring xsi:type="xsd:string">Element 'xmlout' can't be
      allowed in valid XML message. Died
      </faultstring>
      <faultactor xsi:type="xsd:string">http://h3a0433/</faultactor>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      It complains about the xmlout element. But I need this text there,
      otherwise the client won't understand the message. Why can't I
      put 'xmlout' there? Is it a reserved word or something?

      Marcel van Vuure
    • Show all 2 messages in this topic