All,
Absolutely new to .NET
I want to be able to call a perl module from a WebService.
I compile test.pl and am trying to call it from
StringServer2.asmx. When I uncomment the 2 lines I feel should make it work
I
get the following error:
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET
Files\soaptest\5dee38ee\d9f5ec47\qyvdu9h0.cs(6,7): error CS0246: The type or
namespace name 'OrangeSoap' could not be found (are you missing a using
directive or an assembly reference?)
Stopped with exit code 1
What am I doing wrong.
-------------------------------------------------------
test.pm
gets compiles as "c:\> plc test.pm -target="library"
-------------------------------------------------------
package OrangeSoap::Test;
=for interface
[interface: pure]
=cut
=for interface
str addthis(str thisstring);
=cut
sub addthis {
my ($this, $thisstring);<br>
return '***' . $thisstring . '***';<br>
}
--------------------------------------------------------
StringServer2.asmx
located in c:\> inetpub\wwwroot\StringServer
When I uncomment 1 or both of the following 2 lines I get
an error
#use namespace "OrangeSoap.Test";
#my $s1 = thisstring;
--------------------------------------------------------
<%@ WebService class="StringServer3" Language="perl" %>
package StringServer3;
#use namespace "OrangeSoap.Test";
=for interface
[System.Web.Services.WebMethod]
str Concat(str str1, str str2);
[System.Web.Services.WebMethod]
str Concat2(str str1, str str2);
=cut
sub Concat{
my ($this, $str1, $str2) = @_;
#my $s1 = thisstring;
return($str1 . $str2 . $s1);
}
sub Concat2{
my ($this, $str1, $str2) = @_;
return($str1 . $str2 . 'method 2');
}
------------------------------------------------------------
What am I doing wrong?
Thanks,
Richard Vlahov
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.