#*********************************************************************
#*** ResourcePool::Resource::SOAP::Lite
#*** Copyright (c) 2003 by Markus Winand <mws@fatalmind.com>
#*** $Id: Lite.pm,v 1.4 2009-11-25 10:33:35 mws Exp $
#*********************************************************************
package ResourcePool::Resource::SOAP::Lite;

use vars qw($VERSION @ISA);
use strict;
use SOAP::Lite;
use ResourcePool::Resource;

$VERSION = "1.0102";
push @ISA, "ResourcePool::Resource";

sub new($$$) {
	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self = $class->SUPER::new();
	my $proxyurl  = shift;

	my $soap;
	eval {
		$soap = SOAP::Lite->new();
		$soap->proxy($proxyurl);
		$self->{soaph} = $soap;
	};

	if (!$@) {
		bless($self, $class);
		return $self;
	} else {
		return undef;
	}
}

sub close($) {
}

sub precheck($) {
	return 1;
}

sub postcheck($) {
	return 1;
}

sub get_plain_resource($) {
	my ($self) = @_;
	return $self->{soaph};
}

1;
