I have seen posts *close* to this, but most address talking to a .NET
Service from Perl SOAP::Lite. I need to talk to a Perl SOAP::Lite Service
from .NET.
Here is what I have tried:
1) *** Perl consuming C# .NET Service. OK.
2) *** Perl Consuming IIS Perl Service OK (activestate.com)
3) *** C# consuming IIS C# Service OK.
4) *** C# consuming IIS (or Linux) Perl SOAP::Lite Service - NO LUCK.
Case 4 is the big question.
Note: The service doesn't server up WSDL, so I can't just have wsdl.exe
write a proxy for me :-(
Here is a sample Server:
----
#!/usr/local/bin/perl5.8.0 -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
package Demo;
sub new {
bless {}, shift;
};
sub hi {
my ($self) = @_;
return "\nhello, world\n\n";
}
----
Here is a Perl SOAP::Lite Client that works OK:
----
#!/usr/bin/perl -w
use SOAP::Lite +trace => "debug";
# use SOAP::Lite;
print SOAP::Lite
-> uri('Demo')
-> proxy('http://192.168.1.100/cgi-bin/hello_arg.cgi')
-> hi()
-> result;
----
I have a .NET (C#) Client that can call the service, but doesn't display any
results. (Doesn't get any errors either..., it is like a null string is
returned, instead of the expected "hello world".)
----
*** s.cs
using System;
class TestApp
{
[STAThread]
static void Main()
{
SSim ssim = new SSim();
Console.WriteLine("SSim.hi: "+ssim.hi());
}
}
*** ssim.cs:
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="SSimSoap",
Namespace="Demo" )]
public class SSim : System.Web.Services.Protocols.SoapHttpClientProtocol {
public SSim() {
this.Url = "http://192.168.1.102/Test/hello_arg.pl";
//this.Url = "http://localhost:8080/Test/hello_arg.pl";
}
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("Demo#hi",
RequestNamespace="Demo",
ResponseNamespace="Demo",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
//Use=System.Web.Services.Description.SoapBindingUse.Encoded,
public string hi() {
object[] results = this.Invoke("hi", new object[0]);
return ((string)(results[0]));
}
*** csc s.cs ssim.cs
----
Curious, I wrote a .NET service and a SOAP::Lite client and had no problem
either...
Does anyone have a simple "hello world" type example of a .NET client
consuming a SOAP::Lite Service?
I suspect it has to do with the 1999 vs 2001 spec usage, or something
simple, but I just don't know.
literal vs encoded, rpc vs document? what?
Thanks!
Use=System.Web.Services.Description.SoapBindingUse.Encoded, // Was Literal
now you know.
"J. Patrick Brandt" <spam...@null.com> wrote in message
news:avmXa.5874$Ye.5664@fed1read02...