Name

soap —

ATTRIBUTES

Attribute Pos. Req. Default Description
call Yes
uri Yes
proxy Yes
param
trace_transport
object
result
init
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

soap is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/SystemTag/soap.coretag
Lines: 18


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: soap.coretag,v 1.6 2007-03-30 23:40:49 pajamian Exp $

UserTag soap                Order        call uri proxy
UserTag soap                addAttr
UserTag soap                PosNumber    3
UserTag soap                Version      $Revision: 1.6 $
UserTag soap                MapRoutine   Vend::SOAP::tag_soap

UserTag soap_entity      addAttr
UserTag soap_entity      Version      $Revision: 1.6 $
UserTag soap_entity      MapRoutine   Vend::SOAP::tag_soap_entity

Source: lib/Vend/SOAP.pm
Lines: 170

sub tag_soap {
my ($method, $uri, $proxy, $opt) = @_;
my @args;
if($opt->{param}) {
  if (ref($opt->{param}) eq 'ARRAY') {
    @args = @{$opt->{param}};
  }
  elsif (ref($opt->{param}) eq 'HASH') {
    @args = %{$opt->{param}};
  }
  else {
    @args = $opt->{param};
  }
}
else {
  @args = $opt;
}

if($opt->{trace_transport}) {
  if (exists $Vend::Cfg->{Sub}->{$opt->{trace_transport}}) {
    SOAP::Trace->import('transport' => $Vend::Cfg->{Sub}->{$opt->{trace_transport}});
  } else {
    ::logError (qq{no such subroutine "$opt->{trace_transport}" for SOAP transport tracing});
  }
}

my $result;
#::logDebug("to method call, uri=$uri proxy=$proxy call=$method args=" . ::uneval(\@args));
eval {
  if(! $method ) {
    $result = SOAP::Lite
        -> uri($uri)
        -> proxy($proxy)
        -> call ('init');
  }
  elsif(ref $opt->{object}) {
    $result = $opt->{object}
        -> uri($uri)
        -> proxy($proxy)
        -> call( $method => @args )
        -> result;
  }
  else {
    $result = SOAP::Lite
        -> uri($uri)
        -> proxy($proxy)
        -> call( $method => @args )
        -> result;
  }
};
if($@) {
  ::logError("error on SOAP call: %s", $@);
}
#::logDebug("after method call, uri=$uri proxy=$proxy call=$method result=$result");

$::Scratch->{$opt->{result}} = $result if $opt->{result};
return '' if $opt->{init};
return $result;
}

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!