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

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

Expand Messages
  • vanvuure <marcel_van_vuure@hotmail.com>
    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
    Message 1 of 2 , Feb 4, 2003
    • 0 Attachment
      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
    • Duncan Cameron
      ... 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
      Message 2 of 2 , Feb 4, 2003
      • 0 Attachment
        On 2003-02-04 vanvuure <marcel_van_vuure wrote:
        >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?
        >
        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.

        Regards,
        Duncan Cameron
      Your message has been successfully submitted and would be delivered to recipients shortly.