SOAP::Lite and .Net Web Service 
Author Message
 SOAP::Lite and .Net Web Service

I am trying to connect a perl client to a Microsoft .Net Web Service
using SOAP::Lite.  I seem to be having SOAP header problems (as shown
by the output).
One thing I do notice is that the line:

uri (' http://www.*-*-*.com/ ')

in my perl script is case sensitive in some of the examples that I
have seen. Has anyone had any similar problems connecting SOAP::Lite
to Microsoft .Net Web Services??

My Microsoft C# web service:
---------------------------------
namespace WebService1
{
        public class Service1 : System.Web.Services.WebService
        {
                public Service1()
                {
                        InitializeComponent();
                }

                [WebMethod]
                public string HelloWorld()
                {
                        return "Hello World";
                }
        }

Quote:
}

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

My Perl script:
---------------------------------
#!/usr/bin/perl -w
use SOAP::Lite;

print SOAP::Lite
    -> uri(' http://www.*-*-*.com/ ')
    -> proxy(' http://www.*-*-*.com/ ')

    -> HelloWorld()
    -> result;
---------------------------------

Output:
---------------------------------

POST http://www.*-*-*.com/
Accept: text/xml
Accept: multipart/*
Content-Length: 473
Content-Type: text/xml; charset=utf-8
SOAPAction: " http://www.*-*-*.com/ #HelloWorld"

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi=" http://www.*-*-*.com/
3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC=" http://www.*-*-*.com/
ncoding/" xmlns:SOAP-ENV=" http://www.*-*-*.com/ ;
xmlns:xsd="
http://www.*-*-*.com/ ;
SOAP-ENV:encodingStyle=" http://www.*-*-*.com/
.org/soap/encoding/"><SOAP-ENV:Body><namesp1:HelloWorld
xmlns:namesp1="http://sw
oolley.adstelecom.com/WebService1/"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
HTTP/1.1 500 (Internal Server Error) Internal Server Error.
Cache-Control: private
Connection: close
Date: Fri, 04 Apr 2003 17:21:44 GMT
Server: Microsoft-IIS/5.1
Content-Length: 408
Content-Type: text/xml; charset=utf-8
Client-Date: Fri, 04 Apr 2003 17:27:27 GMT
Client-Response-Num: 1

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=" http://www.*-*-*.com/ ;>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Server did not recognize the value of HTTP Header
SOAPAction:
  http://www.*-*-*.com/ #HelloWorld.</faultstring>
      <detail />
    </soap:Fault>
  </soap:Body>
</soap:Envelope>



Wed, 21 Sep 2005 01:26:07 GMT  
 SOAP::Lite and .Net Web Service
The easiest way is probably to use the WSDL directly using the service
function of SOAP::Lite.  See the below code as an example.

#!/usr/bin/perl -w

use strict;
use SOAP::Lite;

my $service = SOAP::Lite
      ->
service('http://swoolley.adstelecom.com/WebService1/Service1.asmx?WSDL');

my $hw = $service->HelloWorld();
print "$hw\n";



Wed, 28 Sep 2005 08:42:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Accessing Unix SOAP::Lite Services from MS SOAP Toolkit

2. SOAP::Lite -- calling Perl services from other languages.

3. using SOAP::Lite to call other services.

4. SOAP in Apache with SOAP::Lite

5. SOAP in Apache with SOAP::Lite

6. How to suppress methodName element in soap:Body of envelope with SOAP::Lite

7. Best modules for XML/SOAP web services

8. SOAP Web Services Mailing List

9. over-riding values using SOAP::Lite WSDL support

10. SOAP::Lite

11. SOAP:Lite question

12. SOAP::Lite and boolean result types

 

 
Powered by phpBB® Forum Software