Loading ...
Sorry, an error occurred while loading the content.

.NET Client to SOAP::Transport::HTTP::Cgi

Expand Messages
  • Dave Barter
    I am having problems creating a server service that can be called from .NET I have coded a simple server as follows:- *************** use
    Message 1 of 2 , Feb 10, 2006
    • 0 Attachment
      I am having problems creating a server service that can be called
      from .NET

      I have coded a simple server as follows:-

      ***************
      use SOAP::Transport::HTTP;
      SOAP::Transport::HTTP::CGI
      -> dispatch_to('SXS', 'IMDGETALL')
      -> handle;
      package SXS;

      sub IMDGETALL {
      return "<imdutil><Data>DAVE</Data></imdutil>";
      }
      ****************

      Nice and easy so far. I then coded a test client in perl that sent
      the following:-

      <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body><namesp1:IMDGETALL xsi:nil="true"
      xmlns:namesp1="http://www.soaplite.com/SXS" />
      </soap:Body>
      </soap:Envelope>

      It worked as expected and the XML snippet in IMDGETALL was printed.

      I then created a WSDL and passed this to some code someone else has
      written in .NET. That code sent the following:-

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body><IMDGETALL xmlns="http://www.soaplite.com/SXS" />
      </soap:Body>
      </soap:Envelope>

      Which looks fine to me? But, SOAP::Lite crashes and I see no error in
      the httpd error logs.

      I put some debug statements into Lite.pm and tracked the crash down
      to:-

      $self->on_action->(my $action = $self->action, $method_uri,
      $method_name);

      Which is in SOAP:Server

      This call works with the first message because $action is set
      to "http://www.soaplite.com/SXS#IMDGETALL" but fails with the second
      as $action is set to "http://localhost/cgi-bin/soap-test.pl"

      Can anyone explain to me why the $action variable is not properly set
      in the second case and whether I can fix it. I can change the WSDL or
      the perl server or Lite.pm but NOT the .NET code.

      Any help greatly appreciated.
      Thanks
      Dave
    • Gareth
      Not sure if this is relevant but the package SOAP::Lite::Simple points out differences between .NET and what it calls real SOAP implementations. Ref. CPAN
      Message 2 of 2 , Feb 11, 2006
      • 0 Attachment
        Not sure if this is relevant but the package SOAP::Lite::Simple points
        out differences between .NET and what it calls 'real' SOAP
        implementations. Ref. CPAN docs.
      Your message has been successfully submitted and would be delivered to recipients shortly.