in reply to SOAP and multiple client platforms

I've only used SOAP::Lite on one project. An instance of the monitoring tool we wrote is installed on each server. The monitoring tool is written in Perl and uses SOAP::Transport::HTTP, acting as the SOAP server. There is one multi-threaded beast written in Java. This Java program requests from each of the monitoring tools statistics, files, etc.

All communication is over HTTPS (which is a bear to debug). Might I add that we did initial development over HTTP. A good packet sniffer will help a lot; Ethereal was our *most* valuable development tool! And, I might add that if you plan to send *any* binary data at all, use MIME::Base64 to encode it first (we used Digest::MD5 to checksum to data before encoding it -- the encoding algorithm checks but just in case).

The big idea with SOAP is to pass a familiar data structure to the SOAP library, which serializes and sends the data. Now, the other party should receive the data and deserialize it into a data structure the program can understand.

We never successfully got the Java program to send its requests as HashTables, but we did get the Java program to receive the data as a HashTable (sent from Perl as a hash, received by Java as a HashTable).

That was our experience. Some of what I read on the soaplite news group mentioned above was that certain data structures are still kind of fuzzy. Now, what was meant by that (i.e. Perl's SOAP library is at fault vs. Java's SOAP library is at fault), I don't know. But, if I remember correctly, when Perl deserialized the Java request (sent as a HashTable) it came out as an array.

Just some of my experiences.
Casey

Replies are listed 'Best First'.
Re: Re: SOAP and multiple client platforms
by one4k4 (Hermit) on Jun 14, 2002 at 18:19 UTC
    I've got things working with the code snippet above, and I'm onto a new "problem":
    my $soap_request = <<END; POST /insuranceClaims HTTP/1.1 Host: 10.7.2.33 Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml +; start="<cid:foo4\@bar.net>" Content-Length: 1024 SOAPAction: http://10.7.2.33:2738/Hello Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <cid:foo4\@bar.net> Content-Location: http://10.7.2.33:2738/Hello <?xml version='1.0' ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/env +elope/"> <SOAP-ENV:Body> <ns1:hi> <upload_file href="http://10.7.2.33:2738/upload_file.txt"/> <name>Thomas</name> </ns1:hi> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <http://10.7.2.33:2738/upload_file.txt> Content-Location :http://10.7.2.33:2738/upload_file.txt ...binary TIFF image... --MIME_boundary-- END
    This time I'm not using SOAP::Lite because of it's lack for multipart MIME messages/Attachments. What that has done, is helped me learn a lot more about this stuff. ;)

    It's just that now SOAP replies with "Cannot find 'start' parameter in multipart MIME message". Bah.

    if (!$one_thing){$it=$another";}

    _14k4 - perlmonks@poorheart.com (www.poorheart.com)