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

Accepting response w/ literalxml encoding

Expand Messages
  • Steven N. Hirsch
    All, Is there any low-impact method for getting SOAP::Lite to accept an RPC response with rpc/literal serialization? I found that I can override the default
    Message 1 of 1 , Mar 15, 2004
    View Source
    • 0 Attachment
      All,

      Is there any low-impact method for getting SOAP::Lite to accept an RPC
      response with rpc/literal serialization? I found that I can override the
      default encodingStyle by doing this after instantiating a SOAP object:

      $SOAP::Constants::SOAP_VERSIONS{'1.1'}->{NS_ENC} =
      "http://xml.apache.org/xml-soap/literalxml";

      But this seems quite brute-force and causes breakage if, e.g. the
      conventional "soap/encoded" namespace is declared anywhere else in the
      envelope (should be allowable in the header and/or higher-level elements).

      This code is tripping it up:

      die "Unrecognized/unsupported value of encodingStyle attribute '$encodingStyle'\n"
      if defined $encodingStyle &&
      length($encodingStyle) != 0 && # encodingStyle=""
      $encodingStyle !~ /(?:^|\b)$SOAP::Constants::NS_ENC/;
      # ^^^^^^^^ \b causing problems (!?) on some systems
      # as reported by David Dyck <dcd@...>
      # so use (?:^|\b) instead

      For reasons I cannot get into, modification of the module is not a viable
      option.

      Steve

      (Speaking on his own behalf - not my employers)
    Your message has been successfully submitted and would be delivered to recipients shortly.