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

Re: [soaplite] Newbie question about SOAP:Lite

Expand Messages
  • Peter Sinnott
    ...
    Message 1 of 6 , Nov 2, 2005
    • 0 Attachment
      On Wed, Nov 02, 2005 at 05:57:29AM -0000, fyang1024 wrote:
      > I'm implementing a client endpoint in Perl using SOAP::Lite. The code
      > is as following:
      >
      >
      > I implemented client endpoints both in Java and PHP, and both work fine.
      >
      > But when I run the code in Perl, it gave me this error message:
      >
      >
      >
      > duplicate attribute at line 1, column 455, byte 455 at
      > D:/Perl/site/lib/XML/Parser.pm line 187

      <getAllLearningDesignsReturn
      soapenc:arrayType="ns1:SimpleLearningDesignVO[5]"
      xsi:type="soapenc:Array"
      xsi:type="ns1:ArrayOfSimpleLearningDesignVO"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      The getAllLearningDesignsReturn tag has 2 attributes with
      the same name xsi:type. This is not valid xml.

      >
      > What's wrong with my code?

      Nothing,it is a axis bug.

      http://issues.apache.org/jira/browse/AXIS-2100
      http://issues.apache.org/jira/browse/AXIS-2127

      There is a patch included with the bug reports but it
      should already be included in version 1.3

      http://www.apache.org/dyn/closer.cgi/ws/axis/1_3

      >
      > Thanks.

      --
      We exist to dramatically coordinate market-driven intellectual capital
      while maintaining the highest standards
    • fyang1024
      Thanks. Now It doesn t report error any more. But the result was unexpected. My Perl code is like this: my $ld_service =
      Message 2 of 6 , Nov 2, 2005
      • 0 Attachment
        Thanks. Now It doesn't report error any more.
        But the result was unexpected.

        My Perl code is like this:
        my $ld_service = SOAP::Lite->service("$serverurl"."$relativeurl");

        my @lds =
        $ld_service->getAllLearningDesigns($serverid,$datetime,$hashvalue,$username);

        print "$#lds\n";
        foreach $ld (@lds){
        print "$ld{'id'},$ld{'workspace'},$ld{'title'}:\n";
        }

        The @lds turned out to be empty, but on the server side, Java reports
        it sent out an array of 5 objects.

        I believe there's something wrong in my Perl code, since the PHP/Java
        clients I wrote both work well.

        Can anybody point it out? Many thanks.
      • Eric Bridger
        You service method call getAllLearningsDesigns will return a reference to an array which you must dereference: my $ref = $ld_service- getAll.... my @lds =
        Message 3 of 6 , Nov 10, 2005
        • 0 Attachment
          You service method call getAllLearningsDesigns will return a reference
          to an array which you must dereference:
          my $ref = $ld_service->getAll....

          my @lds = @{$ref};

          Eric


          On Wed, 2005-11-02 at 22:30, fyang1024 wrote: Thanks. Now It doesn't
          report error any more.
          But the result was unexpected.

          My Perl code is like this:
          my $ld_service = SOAP::Lite->service("$serverurl"."$relativeurl");

          my @lds =
          $ld_service->getAllLearningDesigns($serverid,$datetime,$hashvalue,$username);

          print "$#lds\n";
          foreach $ld (@lds){
          print "$ld{'id'},$ld{'workspace'},$ld{'title'}:\n";
          }

          The @lds turned out to be empty, but on the server side, Java reports
          it sent out an array of 5 objects.

          I believe there's something wrong in my Perl code, since the PHP/Java
          clients I wrote both work well.

          Can anybody point it out? Many thanks.






          ________________________________________________________________________
          YAHOO! GROUPS LINKS

          1. Visit your group "soaplite" on the web.

          2. To unsubscribe from this group, send an email to:
          soaplite-unsubscribe@yahoogroups.com

          3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
          Service.

          ________________________________________________________________________
        • Fei Yang
          I tried this and it still doesn t work. I have already implemented a new method which returns a single string instead of an array of objects in service
          Message 4 of 6 , Nov 14, 2005
          • 0 Attachment
            I tried this and it still doesn't work.
            I have already implemented a new method which returns
            a single string instead of an array of objects in
            service endpoint to walk around this problem.

            Here is the message from Bryan Reese:

            Axis does not support SOAP encoding, which is the
            default of SOAP::Lite.

            I would encourage you to install SOAP::Lite 0.65_6
            from sourceforge:
            http://sourceforge.net/project/showfiles.php?group_id=66000

            Try calling the service using the updated software via
            WSDL. If it doesn't work, I would suggest you consult
            documentation at majordojo about how to compose a
            message manually:

            http://www.majordojo.com/soaplite/


            --- Eric Bridger <eric@...> wrote:

            > You service method call getAllLearningsDesigns will
            > return a reference
            > to an array which you must dereference:
            > my $ref = $ld_service->getAll....
            >
            > my @lds = @{$ref};
            >
            > Eric
            >
            >
            > On Wed, 2005-11-02 at 22:30, fyang1024 wrote:
            > Thanks. Now It doesn't
            > report error any more.
            > But the result was unexpected.
            >
            > My Perl code is like this:
            > my $ld_service =
            > SOAP::Lite->service("$serverurl"."$relativeurl");
            >
            > my @lds =
            >
            $ld_service->getAllLearningDesigns($serverid,$datetime,$hashvalue,$username);
            >
            > print "$#lds\n";
            > foreach $ld (@lds){
            > print
            > "$ld{'id'},$ld{'workspace'},$ld{'title'}:\n";
            > }
            >
            > The @lds turned out to be empty, but on the server
            > side, Java reports
            > it sent out an array of 5 objects.
            >
            > I believe there's something wrong in my Perl code,
            > since the PHP/Java
            > clients I wrote both work well.
            >
            > Can anybody point it out? Many thanks.
            >
            >
            >
            >
            >
            >
            >
            ________________________________________________________________________
            > YAHOO! GROUPS LINKS
            >
            > 1. Visit your group "soaplite" on the web.
            >
            > 2. To unsubscribe from this group, send an
            > email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            > 3. Your use of Yahoo! Groups is subject to
            > the Yahoo! Terms of
            > Service.
            >
            >
            ________________________________________________________________________
            >
            >
            >
            >




            ____________________________________________________
            Do you Yahoo!?
            Find a local business fast with Yahoo! Local Search
            http://au.local.yahoo.com
          • Eric Bridger
            The key is upgrading to version 0.65 On Mon, 2005-11-14 at 19:35, Fei Yang wrote: I tried this and it still doesn t work. I have already implemented a new
            Message 5 of 6 , Nov 15, 2005
            • 0 Attachment
              The key is upgrading to version 0.65


              On Mon, 2005-11-14 at 19:35, Fei Yang wrote: I tried this and it still
              doesn't work.
              I have already implemented a new method which returns
              a single string instead of an array of objects in
              service endpoint to walk around this problem.

              Here is the message from Bryan Reese:

              Axis does not support SOAP encoding, which is the
              default of SOAP::Lite.

              I would encourage you to install SOAP::Lite 0.65_6
              from sourceforge:
              http://sourceforge.net/project/showfiles.php?group_id=66000

              Try calling the service using the updated software via
              WSDL. If it doesn't work, I would suggest you consult
              documentation at majordojo about how to compose a
              message manually:

              http://www.majordojo.com/soaplite/


              --- Eric Bridger <eric@...> wrote:

              > You service method call getAllLearningsDesigns will
              > return a reference
              > to an array which you must dereference:
              > my $ref = $ld_service->getAll....
              >
              > my @lds = @{$ref};
              >
              > Eric
              >
              >
              > On Wed, 2005-11-02 at 22:30, fyang1024 wrote:
              > Thanks. Now It doesn't
              > report error any more.
              > But the result was unexpected.
              >
              > My Perl code is like this:
              > my $ld_service =
              > SOAP::Lite->service("$serverurl"."$relativeurl");
              >
              > my @lds =
              >
              $ld_service->getAllLearningDesigns($serverid,$datetime,$hashvalue,$username);
              >
              > print "$#lds\n";
              > foreach $ld (@lds){
              > print
              > "$ld{'id'},$ld{'workspace'},$ld{'title'}:\n";
              > }
              >
              > The @lds turned out to be empty, but on the server
              > side, Java reports
              > it sent out an array of 5 objects.
              >
              > I believe there's something wrong in my Perl code,
              > since the PHP/Java
              > clients I wrote both work well.
              >
              > Can anybody point it out? Many thanks.
              >
              >
              >
              >
              >
              >
              >
              ________________________________________________________________________
              > YAHOO! GROUPS LINKS
              >
              > 1. Visit your group "soaplite" on the web.
              >
              > 2. To unsubscribe from this group, send an
              > email to:
              > soaplite-unsubscribe@yahoogroups.com
              >
              > 3. Your use of Yahoo! Groups is subject to
              > the Yahoo! Terms of
              > Service.
              >
              >
              ________________________________________________________________________
              >
              >
              >
              >




              ____________________________________________________
              Do you Yahoo!?
              Find a local business fast with Yahoo! Local Search
              http://au.local.yahoo.com


              SPONSORED LINKS
              Protocol analyzer
              Ssl protocol
              Protocol converter
              Sip protocol
              Protocol analysis
              Protocol

              ________________________________________________________________________
              YAHOO! GROUPS LINKS

              1. Visit your group "soaplite" on the web.

              2. To unsubscribe from this group, send an email to:
              soaplite-unsubscribe@yahoogroups.com

              3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
              Service.

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