Trudge has asked for the wisdom of the Perl Monks concerning the following question:

I've been tasked with taking some form data from one server (Linux) and getting it to another server (.NET). It's been suggested that SOAP would do the job. I'm completely new to SOAP, but have the general idea. I even have working scripts (a client and server) on my local ActiveState / Win2K / Apache box.

The fun starts when I try to talk with the .NET server. Even though my script runs with apparently no errors, the other end is saying nothing is coming through.

Anyone here have experience with this particular scenario? This is really driving me nuts, and taking far too long for my liking.

Replies are listed 'Best First'.
Re: SOAP and .NET
by erroneousBollock (Curate) on Sep 20, 2007 at 06:01 UTC
    SOAP as a transport is best not debugged at all :-)

    The .NET web-service should be publishing a WSDL description of what the service expects. Clients of the service need merely translate the WSDL into "proxy" methods of the service.

    Even though my script runs with apparently no errors, the other end is saying nothing is coming through.
    How exactly is the "other end" saying this? That you're script runs with "no errors" is probably meaningless, as you'd need to explicitly handle any SOAP fault objects that are sent back to the client.

    In the worst case, you can turn on debugging in SOAP::Lite to see what is being sent to and received from the .NET service.

    On the perl client side, I absolutely recommend SOAP::WSDL as it does almost all of the hard work for you; you'll get much more meaningful errors before you see the few exceptions to this.

    SOAP::WSDL is a sub-class of SOAP::Lite, the module used by the vast majority of perl SOAP clients/services.

    -David

      Thanks for the pointers, I'll look at SOAP::WSDL. I've discovered that I have to use SOAP::Lite for my 'client' script, and SOAP::Transport::HTTP for the 'server' script. I have debug on, and in my client log get this:

      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()
      which of course helps me tremendously :)

      The programmers running the .NET side are telling me that nothing is coming through, so until I get the debugging thing working I'm at their mercy.

        I've managed to get some debugging information, but it leaves me no closer to a solution:

        mismatched tag at line 61, column 16, byte 2902:
        <p>
               </ul>
        ====^
        </span>
        at C:/usr/lib/XML/Parser.pm line 187

        Of course looking at the Parser module sheds no light on where / how that HTML code is being generated. Line #187:

        $result = $expat->parse($arg);

        I'm spiralling further away from a solution here and could really use some help.

        My code

        use SOAP::WSDL +trace => qw(dispatch); my $soap = SOAP::WSDL->new(wsdl => 'http://xxx.xxx.xxx/somedoc.asmx'); + # edited $soap -> wsdlinit(); $soap -> servicename('Web Mechanic'); my $transport = $soap -> call('Insert' => ( Firstname => $FirstName )); # previously defined
Re: SOAP and .NET
by artist (Parson) on Sep 20, 2007 at 03:03 UTC
    No expert here on the matter, but you should be able to debug the 'other end'.
    --Artist