in reply to Re^5: SOAP::WSDL Installation
in thread SOAP::WSDL Installation
Thank you for your detailed response. I was able to get SOAP::Lite 0.69 installed properly whereas i am running SOAP::WSDL 1.23 because there wasnt any connectivity issue with trouchelle.com it still gives me the same error as before.
I read through the resource links you provided and they were quite helpful and i was able to get my earlier error fixed so at least now i can call a simple method exposed through my service with only one string argument. This verifies that my WSDL is correctly generated.
Now when i run the test script you gave me earlier where i try to pass a Tester object that doesnt seem to work properly. I get the following output:
I read through the resource links you provided and they were quite helpful and i was able to get my earlier error fixed so at least now i can call a simple method exposed through my service with only one string argument. This verifies that my WSDL is correctly generated.
Now when i run the test script you gave me earlier where i try to pass a Tester object that doesnt seem to work properly. I get the following output:
Now here the script i use:C:\SoapTest>perl perlMonk.pl 3519 Reference found where even-sized list expected at C:/Perl/site/lib/SOA +P/WSDL.pm line 235. $VAR1 = 'NULL test';
My implemtation for the method is:use SOAP::WSDL; use Data::Dumper; use strict; my $proxy = "http://localhost:" . $ARGV[0] . "/"; my $soap = SOAP::WSDL->new(); $soap->wsdl('http://localhost:8000/'); $soap->proxy($proxy); #$soap->on_action(sub { return $_[0].$_[1]; }); $soap->wsdlinit +(caching => 1); my $som = $soap->SampleTest({ Name => 'Nathan', Age => 22}); if ($som->fault) { print "SampleTest Error: ".$som->faultstring."\n"; } else { print Dumper($som->paramsall); }
And the Tester class implementation is:public string SampleTest(Tester test) { if (test == null) { return String.Format("NULL test"); } else if (test.Age == 22) { return String.Format("SUCCESS test"); } else { return String.Format("FAILURE test"); } }
I can see two things going wrong either the SOAP::WSDL doesnt send the object properly or SOAP::WSDL cant handle some of the WCF generated WSDL contructs more specifically relating to the Tester class implementation because i was able to get SOAP::WSDL to work with the following simple web service method:[DataContract] public class Tester { private string name; private int age; public Tester(string n, int a) { name = n; age = a; } [DataMember(IsRequired = true)] public string Name { get { return name; } set { name = value; } } [DataMember(IsRequired = true)] public int Age { get { return age; } set { age = value; } } }
I will continue playing around but do you have any suggestions?public string HelloWorld(string name) { return String.Format("Hello {0}!!!", name); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: SOAP::WSDL Installation
by erroneousBollock (Curate) on Nov 08, 2007 at 10:05 UTC | |
by Khurrum (Novice) on Nov 08, 2007 at 10:15 UTC | |
by erroneousBollock (Curate) on Nov 09, 2007 at 00:35 UTC |
In Section
Seekers of Perl Wisdom