Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: SOAP and multiple client platforms

by cmilfo (Hermit)
on Jun 13, 2002 at 21:01 UTC ( [id://174346]=note: print w/replies, xml ) Need Help??


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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://174346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found