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

transport of ready xml

Expand Messages
  • Jens Puruckherr
    Hi, i want to send a ready XML via SOAP to my server. (client, server and called class are only a minimlaistic testsystem, without any dataprozessing) I use:
    Message 1 of 3 , Jun 27, 2005
    • 0 Attachment
      Hi,

      i want to send a ready XML via SOAP to my server.
      (client, server and called class are only a minimlaistic testsystem,
      without any dataprozessing)
      I use:

      my $soapdata = SOAP::Data->type(xml=>$myxml);

      to pass it to the call.

      But on the server I didnt' get back the original values.
      My XML-source looks like:

      <liste>
      <test nr="1">
      <item>xxx</item>
      <wert>yyy</wert>
      </test>
      <test nr="2">
      <item>aaa</item>
      <wert>bbb</wert>
      </test>
      <test nr="3">
      <item>ccc</item>
      <wert>ddd</wert>
      </test>
      <test nr="4">
      <item>eee</item>
      <wert>fff</wert>
      </test>
      </liste>

      The called class at the server only dumps all parameters(@_).
      I get just:

      $VAR1 = [
      'myClass',
      {
      'test' => {
      'wert' => 'fff',
      'item' => 'eee'
      }
      }
      ];


      So the first tree entries from the xml are lost.
      How can I get back all entires from my xml?
      Is it a problem of the serializer or the deserializer?
      How may I fix it, so that it's working for different xmls?




      Mit freundlichen Grüßen

      Jens Puruckherr
    • Andre Merzky
      Yes, that seems like a deserialization issue. SOAP::Lite expects: instead of in
      Message 2 of 3 , Jul 4, 2005
      • 0 Attachment
        Yes, that seems like a deserialization issue. SOAP::Lite
        expects:

        <list xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:any-type[4]">

        instead of

        <list>

        in order to create an array of elements.

        You may want to check the list archive of the last couple of
        weeks for related mails.

        Cheers, Andre.


        Quoting [Jens Puruckherr] (Jun 27 2005):
        > Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
        > To: soaplite@yahoogroups.com
        > From: "Jens Puruckherr" <jpuruckherr@...>
        > Mailing-List: list soaplite@yahoogroups.com; contact soaplite-owner@yahoogroups.com
        > Date: Mon, 27 Jun 2005 10:45:23 +0200
        > Subject: [soaplite] transport of ready xml
        >
        > Hi,
        >
        > i want to send a ready XML via SOAP to my server.
        > (client, server and called class are only a minimlaistic testsystem,
        > without any dataprozessing)
        > I use:
        >
        > my $soapdata = SOAP::Data->type(xml=>$myxml);
        >
        > to pass it to the call.
        >
        > But on the server I didnt' get back the original values.
        > My XML-source looks like:
        >
        > <liste>
        > <test nr="1">
        > <item>xxx</item>
        > <wert>yyy</wert>
        > </test>
        > <test nr="2">
        > <item>aaa</item>
        > <wert>bbb</wert>
        > </test>
        > <test nr="3">
        > <item>ccc</item>
        > <wert>ddd</wert>
        > </test>
        > <test nr="4">
        > <item>eee</item>
        > <wert>fff</wert>
        > </test>
        > </liste>
        >
        > The called class at the server only dumps all parameters(@_).
        > I get just:
        >
        > $VAR1 = [
        > 'myClass',
        > {
        > 'test' => {
        > 'wert' => 'fff',
        > 'item' => 'eee'
        > }
        > }
        > ];
        >
        >
        > So the first tree entries from the xml are lost.
        > How can I get back all entires from my xml?
        > Is it a problem of the serializer or the deserializer?
        > How may I fix it, so that it's working for different xmls?
        >
        >
        >
        >
        > Mit freundlichen Grüßen
        >
        > Jens Puruckherr
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >



        --
        +-----------------------------------------------------------------+
        | Andre Merzky | phon: +31 - 20 - 598 - 7759 |
        | Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
        | Dept. of Computer Science | mail: merzky@... |
        | De Boelelaan 1083a | www: http://www.merzky.net |
        | 1081 HV Amsterdam, Netherlands | |
        +-----------------------------------------------------------------+
      • Duncan Cameron
        Jens, you need to navigate through the SOAP body, see the section ACCESSING HEADERS AND ENVELOPE ON SERVER SIDE in the docs. Something like this will get you
        Message 3 of 3 , Jul 4, 2005
        • 0 Attachment
          Jens,
          you need to navigate through the SOAP body, see the section
          ACCESSING HEADERS AND ENVELOPE ON SERVER SIDE in the docs.
          Something like this will get you going

          sub hello {
          my $som = pop @_;

          my $liste = $som->match('//liste');

          for my $t ($som->valueof('test')) {
          print "$t->{wert} $t->{item}\n";
          }

          }

          Duncan


          At 2005-07-04, 15:28:02 you wrote:

          >Yes, that seems like a deserialization issue. SOAP::Lite
          >expects:
          >
          > <list xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:any-type[4]">
          >
          >instead of
          >
          > <list>
          >
          >in order to create an array of elements.
          >
          >You may want to check the list archive of the last couple of
          >weeks for related mails.
          >
          >Cheers, Andre.

          >
          >Quoting [Jens Puruckherr] (Jun 27 2005):
          >> Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
          >> To: soaplite@yahoogroups.com
          >> From: "Jens Puruckherr" <jpuruckherr@...>
          >> Mailing-List: list soaplite@yahoogroups.com; contact soaplite-owner@yahoogroups.com
          >> Date: Mon, 27 Jun 2005 10:45:23 +0200
          >> Subject: [soaplite] transport of ready xml
          >>
          >> Hi,
          >>
          >> i want to send a ready XML via SOAP to my server.
          >> (client, server and called class are only a minimlaistic testsystem,
          >> without any dataprozessing)
          >> I use:
          >>
          >> my $soapdata = SOAP::Data->type(xml=>$myxml);
          >>
          >> to pass it to the call.
          >>
          >> But on the server I didnt' get back the original values.
          >> My XML-source looks like:
          >>
          >> <liste>
          >> <test nr="1">
          >> <item>xxx</item>
          >> <wert>yyy</wert>
          >> </test>
          >> <test nr="2">
          >> <item>aaa</item>
          >> <wert>bbb</wert>
          >> </test>
          >> <test nr="3">
          >> <item>ccc</item>
          >> <wert>ddd</wert>
          >> </test>
          >> <test nr="4">
          >> <item>eee</item>
          >> <wert>fff</wert>
          >> </test>
          >> </liste>
          >>
          >> The called class at the server only dumps all parameters(@_).
          >> I get just:
          >>
          >> $VAR1 = [
          >> 'myClass',
          >> {
          >> 'test' => {
          >> 'wert' => 'fff',
          >> 'item' => 'eee'
          >> }
          >> }
          >> ];
          >>
          >>
          >> So the first tree entries from the xml are lost.
          >> How can I get back all entires from my xml?
          >> Is it a problem of the serializer or the deserializer?
          >> How may I fix it, so that it's working for different xmls?
          >>
          >>
          >>
          >>
          >> Mit freundlichen Grüßen
          >>
          >> Jens Puruckherr
        Your message has been successfully submitted and would be delivered to recipients shortly.