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

2342Re: [soaplite] Element 'xmlout' can't be allowed in valid XML message. Died\n

Expand Messages
  • Duncan Cameron
    Feb 4, 2003
      On 2003-02-04 vanvuure <marcel_van_vuure wrote:
      >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-
      > <return xsi:type="xsd:boolean">true</return>
      > <xmlout xsi:type="xsd:string">
      > <response> <session id="2" /> </response>
      > </xmlout>
      >How do I build such an envelope?
      >I tried to do it like this (in the OpenSession function on the
      > 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: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>
      >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?
      It's to do with namespace prefixes which cannot begin with xX|mM|lL.
      I can't figure out whether SOAP::Lite is correct in your case, it's a bit too
      late at night for me to think clearly.

      Seeing this query and your previous one I can't help thinking that you're
      not going about this in the right way. You shouldn't be passing strings of
      XML as parameters, at least not for something as simple as you seem to be
      trying to do.

      Duncan Cameron
    • Show all 2 messages in this topic