For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > September 2006 > soaplite server and .net client









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author soaplite server and .net client
taocong810

2006-09-14, 6:57 pm

Hello,

I want to use my scripts on my site with webservices.


So,
with the book 'Programming Web Services with SOAP'
I make tests with


Server: SOAP::Lite 'myhibye.cgi'
-----------------------------------------------------------------
#!/usr/bin/perl
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Fussball')
-> handle;
package Fussball;
sub hi {
#print "hi\n";
return "hello, fussball";


}


sub bye {
#print "bye\n";
return "goodbye, cruel fussball";

}


sub languages {
#print "languages\n";
return ("HSV", "Perl", "C", "sh");

}


sub rechne1 {
my $a = @_[0];
my $b = @_[1];
my $c = @_[2];
return ($b+$c);

}


-----------------------------------------------------------------

Client: SOAP::Lite 'myhibly.pl'
-----------------------------------------------------------------
#!/usr/bin/perl
# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul
Kulchenko --
use SOAP::Lite;
print SOAP::Lite
-> uri('Fussball')
-> proxy('http://.../myhibye.cgi')
-> hi()
-----------------------------------------------------------------


And it works fine.


Now,
I want to use the SOAP::Lite Server with a .Net client.
Because, with .Net it is simple for me to build a gui-programm.


But,
in .Net cs the call of the functions fails.
The error is:


Unhandled Exception: System.Web.Services.Protocols.SoapHeaderException:

SOAPAction shall match 'uri#method' if present (got 'urn:Fussball/hi',
expected 'Fussball#hi' ..


In my cs-Programm I set
this.URL to 'http://.../myhibye.cgi'
Namespace to 'Fussball'.


And I read something, that it is a problem to call the function /
Namespace
.....


But I do not know what is necessary to solve this problem ?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com