r22086 - in /branches/upstream/soap-lite/current: Changes MANIFEST META.yml SOAP-Lite-0.710.06.ppd SOAP-Lite-0.710.06.zip lib/SOAP/Lite.pm lib/SOAP/Packager.pm lib/SOAP/Transport/HTTP.pm t/38-packager.t t/SOAP/Serializer.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Jun 23 10:10:34 UTC 2008


Author: dmn
Date: Mon Jun 23 10:10:33 2008
New Revision: 22086

URL: http://svn.debian.org/wsvn/?sc=1&rev=22086
Log:
[svn-upgrade] Integrating new upstream version, soap-lite (0.710.07)

Added:
    branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.ppd
    branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.zip   (with props)
Modified:
    branches/upstream/soap-lite/current/Changes
    branches/upstream/soap-lite/current/MANIFEST
    branches/upstream/soap-lite/current/META.yml
    branches/upstream/soap-lite/current/lib/SOAP/Lite.pm
    branches/upstream/soap-lite/current/lib/SOAP/Packager.pm
    branches/upstream/soap-lite/current/lib/SOAP/Transport/HTTP.pm
    branches/upstream/soap-lite/current/t/38-packager.t
    branches/upstream/soap-lite/current/t/SOAP/Serializer.t

Modified: branches/upstream/soap-lite/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/Changes?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/Changes (original)
+++ branches/upstream/soap-lite/current/Changes Mon Jun 23 10:10:33 2008
@@ -1,7 +1,7 @@
 #
 # Revision history for Perl extension SOAP::Lite.
 #
-# $Id: Changes 253 2008-06-05 18:26:18Z kutterma $
+# $Id: Changes 276 2008-06-13 19:04:55Z kutterma $
 
 The contents of this file provides a change history for the SOAP::Lite
 Perl module. New features are designated with a '+' and bug fixes with
@@ -15,6 +15,11 @@
 -----------------------------------------------------------------------
 THIS RELEASE
 -----------------------------------------------------------------------
+0.710.07
+   ! [ 1963995 ] > not deserialized in result
+   ! [ 1833218 ] < and > not deserialized in faultstring/detail
+   ! [ 1959329 ] Incorrect Content-Type while sending requests with no parts
+   ! [ 1945385 ] Incorrect starting part detection for Multipart/Related
 0.710.06
    ! #36477 SOAP::Lite Envelope not stripped down for XMLRPC
    ! #36455 XMLRPC::Transport::HTTP::CGI generates extra params

Modified: branches/upstream/soap-lite/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/MANIFEST?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/MANIFEST (original)
+++ branches/upstream/soap-lite/current/MANIFEST Mon Jun 23 10:10:33 2008
@@ -222,3 +222,6 @@
 t/XMLRPC/Lite.t
 t/XML/Parser/adam.xml
 t/XML/Parser/Lite.t
+
+SOAP-Lite-0.710.06.ppd
+SOAP-Lite-0.710.06.zip

Modified: branches/upstream/soap-lite/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/META.yml?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/META.yml (original)
+++ branches/upstream/soap-lite/current/META.yml Mon Jun 23 10:10:33 2008
@@ -1,9 +1,10 @@
 --- #YAML:1.0
 name:                SOAP-Lite
-version:             0.710.06
+version:             0.710.07
 abstract:            ~
 license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.36
+author:              ~
+generated_by:        ExtUtils::MakeMaker version 6.44
 distribution_type:   module
 requires:     
     Compress::Zlib:                0
@@ -24,5 +25,5 @@
     version:                       0
     XML::Parser:                   2.23
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Added: branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.ppd
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.ppd?rev=22086&op=file
==============================================================================
--- branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.ppd (added)
+++ branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.ppd Mon Jun 23 10:10:33 2008
@@ -1,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SOFTPKG NAME="SOAP-Lite-0.710.06" VERSION="0,710,06,0">
+  <TITLE>SOAP-Lite-0.710.06</TITLE>
+  <ABSTRACT>Perl's Web Services Toolkit</ABSTRACT>
+  <AUTHOR>Martin Kutter &lt;MKUTTER at cpan.org&gt;</AUTHOR>
+  <IMPLEMENTATION>
+    <DEPENDENCY NAME="IO-Socket-SSL" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="MIME-Lite" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="version" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="Scalar-List-Utils" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="MIME-tools" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="Crypt-SSLeay" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="IO" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="MIME-Base64" VERSION="0,0,0,0" />
+    <DEPENDENCY NAME="FCGI" VERSION="0,0,0,0" />
+    <OS NAME="linux" />
+    <ARCHITECTURE NAME="i486-linux-gnu-thread-multi-5.8" />
+    <CODEBASE HREF="SOAP-Lite-0.710.06.tar.gz" />
+  </IMPLEMENTATION>
+</SOFTPKG>

Added: branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.zip
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.zip?rev=22086&op=file
==============================================================================
Binary file - no diff available.

Propchange: branches/upstream/soap-lite/current/SOAP-Lite-0.710.06.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: branches/upstream/soap-lite/current/lib/SOAP/Lite.pm
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/lib/SOAP/Lite.pm?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/lib/SOAP/Lite.pm (original)
+++ branches/upstream/soap-lite/current/lib/SOAP/Lite.pm Mon Jun 23 10:10:33 2008
@@ -4,7 +4,7 @@
 # SOAP::Lite is free software; you can redistribute it
 # and/or modify it under the same terms as Perl itself.
 #
-# $Id: Lite.pm 254 2008-06-05 18:43:57Z kutterma $
+# $Id: Lite.pm 274 2008-06-13 18:57:53Z kutterma $
 #
 # ======================================================================
 
@@ -19,7 +19,7 @@
 use 5.005;
 use strict;
 use vars qw($VERSION);
-use version; $VERSION = qv('0.710.06');
+use version; $VERSION = qv('0.710.07');
 # ======================================================================
 
 package SOAP::XMLSchemaApacheSOAP::Deserializer;
@@ -374,7 +374,14 @@
 sub encode_attribute { (my $e = $_[0]) =~ s/([&<>\"])/$encode_attribute{$1}/g; $e }
 
 my %encode_data = ('&' => '&amp;', '>' => '&gt;', '<' => '&lt;', "\xd" => '&#xd;');
-sub encode_data { my $e = $_[0]; if ($e) { $e =~ s/([&<>\015])/$encode_data{$1}/g; $e =~ s/\]\]>/\]\]&gt;/g; } $e }
+sub encode_data {
+    my $e = $_[0];
+    if ($e) {
+        $e =~ s/([&<>\015])/$encode_data{$1}/g;
+        $e =~ s/\]\]>/\]\]&gt;/g;
+    }
+    $e
+}
 
 # methods for internal tree (SOAP::Deserializer, SOAP::SOM and SOAP::Serializer)
 
@@ -1492,8 +1499,8 @@
         # Find all the SOAP Body elements
         else {
             # proposed resolution for [ 1700326 ] encode_data called incorrectly in envelope
-            # push(@parameters, $_);
-            push (@parameters, SOAP::Utils::encode_data($_));
+            push(@parameters, $_);
+            # push (@parameters, SOAP::Utils::encode_data($_));
         }
     }
     my $header = @header ? SOAP::Data->set_value(@header) : undef;
@@ -1541,9 +1548,6 @@
     }
     elsif ($type eq 'fault') {
         SOAP::Trace::fault(@parameters);
-        # parameters[1] needs to be escaped - thanks to aka_hct at gmx dot de
-        # commented on 2001/03/28 because of failing in ApacheSOAP
-        # need to find out more about it
         # -> attr({'xmlns' => ''})
         # Parameter order fixed thanks to Tom Fischer
         $body = SOAP::Data-> name(SOAP::Utils::qualify($self->envprefix => 'Fault'))
@@ -1558,7 +1562,7 @@
                         my $detail = $parameters[2];
                         ref $detail
                             ? \$detail
-                            : $detail
+                            : SOAP::Utils::encode_data($detail)
                     })
                     : (),
         ));

Modified: branches/upstream/soap-lite/current/lib/SOAP/Packager.pm
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/lib/SOAP/Packager.pm?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/lib/SOAP/Packager.pm (original)
+++ branches/upstream/soap-lite/current/lib/SOAP/Packager.pm Mon Jun 23 10:10:33 2008
@@ -4,7 +4,7 @@
 # SOAP::Lite is free software; you can redistribute it
 # and/or modify it under the same terms as Perl itself.
 #
-# $Id: Packager.pm 249 2008-05-05 20:35:05Z kutterma $
+# $Id: Packager.pm 265 2008-06-09 07:06:53Z kutterma $
 #
 # ======================================================================
 
@@ -213,7 +213,14 @@
   # As it turns out, the Content-ID and start parameters are optional
   # according to the MIME and SOAP specs. In the event that the head cannot
   # be found, the head/root entity is used as a starting point.
-  my $start = get_multipart_id($entity->head->mime_attr('content-type.start'));
+    # [19 Mar 2008] Modified by Feng Li <feng.li at sybase.com>
+    # Check optional start parameter, then optional Content-ID, then create/add
+    # Content-ID (the same approach as in SOAP::Lite 0.66)
+
+    #my $start = get_multipart_id($entity->head->mime_attr('content-type.start'));
+    my $start = get_multipart_id($entity->head->mime_attr('content-type.start'))
+        || get_multipart_id($entity->parts(0)->head->mime_attr('content-id'));
+
   if (!defined($start) || $start eq "") {
       $start = $self->generate_random_string(10);
       $entity->parts(0)->head->add('content-id',$start);
@@ -242,7 +249,7 @@
     if ($start && $pid eq $start) {
       $env = $part->bodyhandle->as_string;
     } else {
-      $self->push_part($part) if (defined($part->bodyhandle));
+      $self->push_part($part);
     }
   }
 #  die "Can't find 'start' parameter in multipart MIME message\n"

Modified: branches/upstream/soap-lite/current/lib/SOAP/Transport/HTTP.pm
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/lib/SOAP/Transport/HTTP.pm?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/lib/SOAP/Transport/HTTP.pm (original)
+++ branches/upstream/soap-lite/current/lib/SOAP/Transport/HTTP.pm Mon Jun 23 10:10:33 2008
@@ -4,7 +4,7 @@
 # SOAP::Lite is free software; you can redistribute it
 # and/or modify it under the same terms as Perl itself.
 #
-# $Id: HTTP.pm 247 2008-04-19 21:39:39Z kutterma $
+# $Id: HTTP.pm 267 2008-06-09 07:22:43Z kutterma $
 #
 # ======================================================================
 
@@ -104,11 +104,6 @@
 
     $self->agent(join '/', 'SOAP::Lite', 'Perl', SOAP::Transport::HTTP->VERSION);
     $self->options({});
-    $self->http_request(HTTP::Request->new);
-    $self->http_request->headers(HTTP::Headers->new);
-
-    # TODO - add application/dime
-    $self->http_request->header(Accept => ['text/xml', 'multipart/*', 'application/soap']);
 
     while (@methods) {
         my($method, $params) = splice(@methods,0,2);
@@ -135,6 +130,11 @@
             && eval { require Compress::Zlib };
 
     # Initialize the basic about the HTTP Request object
+    $self->http_request(HTTP::Request->new);
+    $self->http_request->headers(HTTP::Headers->new);
+
+    # TODO - add application/dime
+    $self->http_request->header(Accept => ['text/xml', 'multipart/*', 'application/soap']);
     $self->http_request->method($method);
     $self->http_request->url($endpoint);
 

Modified: branches/upstream/soap-lite/current/t/38-packager.t
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/t/38-packager.t?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/t/38-packager.t (original)
+++ branches/upstream/soap-lite/current/t/38-packager.t Mon Jun 23 10:10:33 2008
@@ -1,9 +1,4 @@
-#!/bin/env perl 
-BEGIN {
-    print "1..0 # Skip: Test broken - going to fix in one of the next releases\n";
-    exit 0;
-}
-
+#!/bin/env perl
 use strict;
 use Test;
 
@@ -12,7 +7,7 @@
     chdir 't' if -d 't';
     unshift @INC, '../lib' if -d '../lib';
   }
-  plan tests => 20;
+  plan tests => 5;
 }
 
 my ($mp, $env, $part, @part_data);
@@ -81,24 +76,24 @@
 ok(UNIVERSAL::isa(ref($mp->parts->[0]) => "MIME::Entity"));
 
 # Tests to see if data extraction works - TIFF not checked
- at part_data = $mp->find_part( id => '<claim061402a.jpeg at claiming-it.com>' );
-ok($part_data[0] eq '...Raw JPEG image..');
- at part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
-ok($part_data[0] eq '<a><b>c</b></a>');
- at part_data = $mp->find_part( id => '<claim061404a.realxml at claiming-it.com>' );
-ok($part_data[0] eq '<a><b>c</b></a>');
+#@part_data = $mp->find_part( id => '<claim061402a.jpeg at claiming-it.com>' );
+#ok($part_data[0] eq '...Raw JPEG image..');
+#@part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
+#ok($part_data[0] eq '<a><b>c</b></a>');
+#@part_data = $mp->find_part( id => '<claim061404a.realxml at claiming-it.com>' );
+#ok($part_data[0] eq '<a><b>c</b></a>');
 
 
 # Test: no start parameter specified
+# Content-ID: <claim061400a.xml at claiming-it.com>
+# Content-Type: text/xml; charset=UTF-8
 $env = $mp->unpackage(<<'EOX');
 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"
 SOAPAction: http://schemas.risky-stuff.com/Auto-Claim
 Content-Description: This is the optional message description.
 
 --MIME_boundary
-Content-Type: text/xml; charset=UTF-8
 Content-Transfer-Encoding: 8bit
-Content-ID: <claim061400a.xml at claiming-it.com>
 
 <?xml version='1.0' ?>
 <SOAP-ENV:Envelope
@@ -128,8 +123,8 @@
 # test to see how how many parts were found:
 ok(@{$mp->parts} == 1);
 # Tests to see if data extraction worked
- at part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
-ok($part_data[0] eq '<a><b>c</b></a>');
+#@part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
+#ok($part_data[0] eq '<a><b>c</b></a>');
 
 # test to see if start parameter works if it doesn't point to root
 $env = $mp->unpackage(<<'EOX');
@@ -169,7 +164,7 @@
 # test to see how how many parts were found:
 ok(@{$mp->parts} == 1);
 # Tests to see if data extraction worked
- at part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
-ok($part_data[0] eq '<a><b>c</b></a>');
+#@part_data = $mp->find_part( id => '<claim061403a.somexml at claiming-it.com>' );
+#ok($part_data[0] eq '<a><b>c</b></a>');
 
 1;

Modified: branches/upstream/soap-lite/current/t/SOAP/Serializer.t
URL: http://svn.debian.org/wsvn/branches/upstream/soap-lite/current/t/SOAP/Serializer.t?rev=22086&op=diff
==============================================================================
--- branches/upstream/soap-lite/current/t/SOAP/Serializer.t (original)
+++ branches/upstream/soap-lite/current/t/SOAP/Serializer.t Mon Jun 23 10:10:33 2008
@@ -1,9 +1,34 @@
 use strict;
 use warnings;
-use Test::More tests => 2; #qw(no_plan);
+use Test::More tests => 12; #qw(no_plan);
 
 use_ok qw(SOAP::Lite);
 
-my $obj = SOAP::Serializer->new();
+my $serializer = SOAP::Serializer->new();
 
-is $obj->find_prefix('http://schemas.xmlsoap.org/soap/envelope/'), 'soap';
+is $serializer->find_prefix('http://schemas.xmlsoap.org/soap/envelope/'), 'soap';
+
+ok my $tag = $serializer->tag('fooxml', {}, undef), 'serialize <fooxml/>';
+ok $tag = $serializer->tag('_xml', {}, undef), 'serialize <_xml/>';
+eval {
+    $tag = $serializer->tag('xml:lang', {}, undef);;
+};
+like $@, qr{^Element \s 'xml:lang' \s can't \s be \s allowed}x, 'error on <xml:lang/>';
+undef $@;
+eval {
+    $tag = $serializer->tag('xmlfoo', {}, undef);
+};
+like $@, qr{^Element \s 'xmlfoo' \s can't \s be \s allowed}x, 'error on <xmlfoo/>';
+
+
+my $xml = $serializer->envelope('fault', faultstring => '>>> foo <<<');
+like $xml, qr{\&gt;\&gt;\&gt;}x, 'fault escaped OK';
+unlike $xml, qr{\&amp;gt;}x, 'fault escaped OK';
+
+$xml = $serializer->envelope('response', foo => '>>> bar <<<');
+like $xml, qr{\&gt;\&gt;\&gt;}x, 'response escaped OK';
+unlike $xml, qr{\&amp;gt;}x, 'response escaped OK';
+
+$xml = $serializer->envelope('method', foo => '>>> bar <<<');
+like $xml, qr{\&gt;\&gt;\&gt;}x, 'response escaped OK';
+unlike $xml, qr{\&amp;gt;}x, 'response escaped OK';




More information about the Pkg-perl-cvs-commits mailing list