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

Re: Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)

Expand Messages
  • mpafrica2001
    ... I ve found solutions to both my problems. To use the anyType type specifier as found in the WSDL, I used typelookup to set up the type in SOAP::Lite.
    Message 1 of 4 , Sep 17, 2003
      --- In soaplite@yahoogroups.com, "mpafrica2001" <yahoo@b...> wrote:
      > Apologies for the length of this message but I've tried to include
      > everything relevent....

      I've found solutions to both my problems. To use the
      anyType type specifier as found in the WSDL, I used
      typelookup to set up the type in SOAP::Lite.

      $service->typelookup->{'anyType'} =
      [11, sub { 1 }, 'as_anyType'];

      sub SOAP::Serializer::as_anyType {
      my $self = shift;
      my ($value, $name, $type, $attr) = @_;
      return [$name, {'xsi:type' => 'xsd:string', %{$attr}}, $value];
      }

      and to put multiple xmlns attributes on a data element, I used:

      my $av = SOAP::Data->name('strAvailability')
      ->attr({'xmlns:namesp2' => 'http://www.w3.org/2001/XMLSchema',
      'xmlns:namesp3' =>
      'http://www.w3.org/2001/XMLSchema-Instance'})
      ->type('anyType')->value('');

      A bit of hacking on the on_action sub and I'm now happily talking to
      the MS Soap Toolkit server.

      Cheers,

      --
      Michael Brader michael.brader@n...
      Senior Software Developer (Unix) ntl:ipd
      Hook 01256 75(3413)
    Your message has been successfully submitted and would be delivered to recipients shortly.