P
Pernille
Hi,
I have a problem transfurring the parametres from my perl client
program to the webservice. I have another clientprogram in C# where
there is no problem so it cant be the webservice which is wrong.
The connection to the service is ok, but if I try to call the
Webmethod with the parametres from the client and return the
parametervalues from the webservice, they are always set to default,
zero if it's an int or " " if its a string.
Perl Client:
_______________________________________________________________________________
#!/local/perl/eg
# hello.pl
use WebService::ServiceProxy;
my $wsdl = "http://localhost/DmuCheckOutService/Service1.asmx?WSDL";
my $service = WebService::ServiceProxy->new($wsdl);
print "Which funktion do you want to access?\n A: Check Out DMU\n ";
$name = <STDIN>;
if ($name =~ "a")
{
print "Check Out Dmu:\n Enter DMU id: ";
$dmuid = <STDIN>;
print $service->Test($dmuid);
}
________________________________________________________________________________
Webservice:
________________________________________________________________________________
[WebMethod]
public string Test(int id)
{
return "id : "+id;
}
________________________________________________________________________________
Even if I hardcode the id in the client as: "Test(2); " it returns 0.
Can enyone tell me what I am doing wrong??
Thanks
Pernille
I have a problem transfurring the parametres from my perl client
program to the webservice. I have another clientprogram in C# where
there is no problem so it cant be the webservice which is wrong.
The connection to the service is ok, but if I try to call the
Webmethod with the parametres from the client and return the
parametervalues from the webservice, they are always set to default,
zero if it's an int or " " if its a string.
Perl Client:
_______________________________________________________________________________
#!/local/perl/eg
# hello.pl
use WebService::ServiceProxy;
my $wsdl = "http://localhost/DmuCheckOutService/Service1.asmx?WSDL";
my $service = WebService::ServiceProxy->new($wsdl);
print "Which funktion do you want to access?\n A: Check Out DMU\n ";
$name = <STDIN>;
if ($name =~ "a")
{
print "Check Out Dmu:\n Enter DMU id: ";
$dmuid = <STDIN>;
print $service->Test($dmuid);
}
________________________________________________________________________________
Webservice:
________________________________________________________________________________
[WebMethod]
public string Test(int id)
{
return "id : "+id;
}
________________________________________________________________________________
Even if I hardcode the id in the client as: "Test(2); " it returns 0.
Can enyone tell me what I am doing wrong??
Thanks
Pernille