in reply to Post XML
It's hard to tell (since the issue is really on the server side). But it sounds like either the server wants the data to be form-data (labelRequestXML=<longstringofxml>) or it's doing different processing based on the the content-type. You can try setting the type:
or if it wants form data#!/usr/bin/perl use strict; use warnings; use LWP 5.64; my $browser = LWP::UserAgent->new; my $xml= qq[<?xml version="1.0" encoding="utf-8" ?> .... snip .... ]; my $url = 'https://www.envmgr.com/LabelService/EwsLabelService.asmx/Ge +tPostageLabelXML'; my $response = $browser->post( $url, Content_Type => 'text/xml', Content => $xml ); print $response->content;
my $response = $browser->post( $url, Content => [ labelRequestXML => $xml ] );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Post XML
by joshuahess (Novice) on Dec 07, 2007 at 01:20 UTC |