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

Wrapped/Literal with SOAP::Lite

Expand Messages
  • Steve Piercey
    Hi, I ve been successfully connecting to Web Services (Apache Axis) using SOAP::Lite v .60a. The end-point has been implemented in RPC/encoding, but is going
    Message 1 of 1 , Jan 7, 2005
    • 0 Attachment
      Hi,
      I've been successfully connecting to Web Services (Apache Axis) using
      SOAP::Lite v .60a. The end-point has been implemented in RPC/encoding, but
      is going to be moving to wrapped/literal.since Microsoft's Office
      "infopath" does not speak RPC.
      In testing wrapped literal with SOAP::Lite, I've noticed the following
      behavior. I'm not sure if the work-arounds are the best way to solve some of
      the problems.

      1. Problem with arrays of strings.
      In RPC, I could get the reference to the array of strings via:

      my $arr = $soap->getList()->result;
      foreach my $i ( @$arr ) {
      }

      In "wrapped/literal" the above example does not work, but I can use the
      'valueof' with the return list, or I can use '->paramsall'.

      my @arr = $soap->getList()->valueof('//getListReturn');
      -- or --
      my @arr = $soap->getList()->paramsall;

      2. Problems with byte arrays. My web service has a method that returns an
      array of bytes.
      In RPC, this automatically gets deserialized from an "hexBinary" type, and
      PERL/SOAP::Lite does the right thing.
      In Wrapped/literal, there are no xsi types, so my "string" contains the
      bytes still hex encoded. To work-around this problem, I have imported
      "MIME::Base64' and converted the result from those methods that I know
      return bytes[].

      use MIME::Base64;
      my $result = decode_base64($soap->getBytes()->result);

      That's all I found so far. Does anybody have any better solutions, or am I
      missing the boat? I know that SOAP::Lite is not sending true wrapped literal
      SOAP messages to the server, but Apache Axis appears to be doing the right
      thing with what is being sent. Extra attributes and name spaces does not
      appear to be affecting things in wrapped/literal.
      I've tried version .65 beta without any perceived benefit. I've also tried
      using the '->service($wsdl)' methods, but I get a nasty gram telling me the
      '/literal' is not supported. It sure would be nice to get true support for
      wrapped/literal since this seems to be the way that things are going.

      Steve Piercey
    Your message has been successfully submitted and would be delivered to recipients shortly.