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

Re: named arrays of structs

Expand Messages
  • jpeyser
    After further study, I see that the difference between the two xml s is not the namespace prefixes, but the namespaces themselves. In the first xml (generated
    Message 1 of 3 , Dec 2, 2003
    • 0 Attachment
      After further study, I see that the difference between the two xml's
      is not the namespace prefixes, but the namespaces themselves. In the
      first xml (generated by Windows SOAP?) all the objects have the same
      prefix (namesp4), thus the same namespace. In the second xml
      (generated by SOAP::Lite), each object is assigned a different
      namespace prefix (with the default namespace of
      http://namepspaces.soaplite.com/perl)

      If you want all objects to use a certain namespace, use the maptype
      method.

      my $soap = SOAP::Lite->new();
      $soap->serializer->maptype->{DataPoint} = 'urn:project4-wrapper';
      $soap->serializer->maptype->{DataArray} = 'urn:project4-wrapper';

      $soap
      -> uri
      -> proxy
      .
      .
      .

      The namespace assignments will be inserted into the envelope header.

      Jonathan

      --- In soaplite@yahoogroups.com, "Peter Sykora" <peter_sykora@g...>
      wrote:
      > Hello,
      >
      > I created a SOAP Server with gSOAP that expects named arrays of
      > structs. Now I want to access this server using a soaplite client.
      So
      > I create a named array of hashes using something like this:
      >
      > SOAP::Data->type('DataArray')->name('DataArray' => \@data_array);
      >
      > It works fine under windows where the resulting SOAP message sent to
      > the server looks something like:
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.