http://qs321.pair.com?node_id=1099983


in reply to I don't understand how to send SOAP data using LWP's user agent

What do the server logs say? Often a SOAP server will require a SOAPAction HTTP header be sent along with the POST body. See http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528.

To answer your second question, try dumping the POST data with

$q->param('POSTDATA');
See http://search.cpan.org/~lds/CGI.pm-3.43/CGI.pm#HANDLING_NON-URLENCODED_ARGUMENTS

Disclaimer: I've written a number of SOAP clients and servers, but none in Perl for many years.

  • Comment on Re: I don't understand how to send SOAP data using LWP's user agent
  • Download Code

Replies are listed 'Best First'.
Re^2: I don't understand how to send SOAP data using LWP's user agent
by ted.byers (Monk) on Sep 10, 2014 at 19:26 UTC

    Thanks.

    Alas, I do not have access to the server logs. I did not create this server, and do not have access to it's code. What I have learned is that the guys responsible have coded it in Java, as a servlet. It does not handle errors well (key java exception data is passed to the client rather than processed server side; with only suitably sanitized but useful error messages being sent to the client). I regard passing a full stack trace to a client as poor practice; but that's just me I suppose.

    I will have to look into the SOAPAction HTTP header. At present, I only set the content type header as text/xml

    I will definitely take a look at use of $q->param('POSTDATS'); to get data that was not collected from a form.

    Thanks again

    Ted