Start New Discussion within our Software Development Community

I'm hoping this is the appropriate forum for my situation.

I'm trying to populate a form on a .NET server with data from a form on a different server.

Using SOAP::Lite we've managed to get this code working:

use strict;
use warnings;
use SOAP::Lite +trace => 'debug';
my $name='Trudge';

print SOAP::Lite
-> uri('http://localhost:180/bazaar')
-> on_action( sub { return '"http://localhost:180/bazaar/Insert"' })
-> proxy('http://xxx.xxx.xxx.xxx/bazaar.asmx') # edited
-> Insert('Trudge')
-> result;

but when I replace the literal string with the $name variable (unquoted) the remote site receives no data. Has someone here any experience talking with a .NET server in a similar situation?

After much much reading and tweaking, I have working Perl code to send data to a .NET server.

use strict;
use warnings;
use SOAP::Lite ( +trace => 'all', maptype => {} );

my $soap = SOAP::Lite
-> uri('http://localhost:yyy/your_uri')
-> on_action( sub { join '/', 'http://localhost:yyy/your_uri','Insert'} )
-> proxy('http://xxx.xxx.xxx.xxx:yyy/somescript.asmx');

my $method = SOAP::Data->name('Insert')
	->attr({xmlns => 'http://localhost:yyy/your_uri'});

# variables below are predefined
my @params = ( 
	SOAP::Data-> name(FirstName => $FirstName),
	SOAP::Data-> name(LastName => $LastName));
print $soap->call($method => @params)->result;

If the server is returning a string (such as 'OK', you should see it printed. This script is run from the CLI on my home PC (Win2K + AS Perl).

Two links were very helpful in getting this to work, but it was a matter of kludging things from various sources.

http://users.skynet.be/pascalbotte/rcx-ws-doc/perldotnet.htm
http://msdn2.microsoft.com/en-us/library/ms995764.aspx

This question has already been answered. Start a new discussion instead.