I'm running into a wall (or more likely, a proxy) while trying to connect to a wsdl service via web call. I suspect the company proxy is not handling the request properly but I'm not sure how to help it along.
I'd like to avoid using company specific info, so the below URLs will not work. But know that when I request the specified URL from a browser, I get back a proper XML response. From the script, I get a 400 bad request error.
Results:use strict; use LWP::UserAgent; my $g = LWP::UserAgent->new(show_progress => 1); $g->proxy(['http','ftp','https'], 'http://proxy.company.com:8080'); my $gr = HTTP::Request->new(POST => 'https://remote.othercomp.com/Sess +ionManagement/PublicSessionManagementService.svc?wsdl'); $gr->header('Content-Length' => '0'); my $gs = $g->request($gr); print $gs->status_line, "\n"; print $gs->content, "------- end content -------\n";
I've tried doing a normal GET request to Google.com and gotten back a good response and the appropriate content.** POST https://wsnet.sendwordnow.com/SessionManagement/2010/05/Public +SessionManagementService.svc?wsdl ==> 400 Bad Request (1s) 400 Bad Request ------- end content -------
any help is much appreciated.
In reply to LWP 400 Bad Request on POST by dsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |