in reply to SOAP::Lite remote objects

Hi,

I can't run the code on my side. So what I'm saying is a guess looking at your code and at the documentation.

Are you sure that the code snippet my $t1 = $soap->new(); does a remote call to 'new' to instantiate an object on the remote site? I guess not. I assume that 'new' is called on SOAP::Lite.

Is my $t1 = $soap->call('new'); the solution?

Probaby you make a cross check calling your object creation method in TestWrapper not 'new' but e.g. 'mynew'.

Best regards
McA

Replies are listed 'Best First'.
Re^2: SOAP::Lite remote objects
by tjking (Novice) on Jun 27, 2012 at 18:40 UTC

    Yes, it's instantiating a TestWrapper object, or it wouldn't be giving the client output that I'm already getting. Renaming the constructor results in "Can't locate object method "put" via package "SOAP::SOM" at client.pl line 10.". Using $soap->call('new') instead of $soap->new() makes no difference either way.

    The problem is, the SOAP::Lite documentation and examples that are out there are severely out of date, and many do not work at all with the current version. The only example I could find for remote instantiation was this one, which does work. However, only the constructor takes a user-defined argument, the subsequent method call is static, and only takes the object returned by call(). Unfortunately, I can't seem to figure out how to get this to work with regular methods that take additional arguments (other than the object itself).

    Thanks for the input!