Okay, thank you both! However, neither suggestion did what I need it to do. I've figured out that the server is not going to unencode anything so the XML needs to be sent in plain text, no encoding. This works:
my $finalXML = $self->getFinalXML();
my $POST_URL = $self->getProcessingURL();
print $finalXML, "\n";
use Net::SSLeay;
my ($page, $response, %reply_headers) =
Net::SSLeay::post_https(
'dev.xmlsite.com',
11800,
'',
Net::SSLeay::make_headers('Content-Type' => 'text/xml'),
"CLRCMRC_XML=$finalXML"
);
foreach my $key (keys %reply_headers) {
print "$key: ", $reply_headers{$key}, "\n";
}
print 'Response: ', $response, "\n";
print 'Page: ', $page, "\n";
...and it's nice because I've got my XML response in a separate variable out of gate: $page. I'd like to do the above using LWP, but I can't figure out how to send content unencoded, ie. plain text. I'm stumped.
dpatrick
- I think
scsh is cool.
Open Sourceror, Perlmonk
http://perlmonk.org/~dpatrick
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.