Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > soaplite SOAPAction header problem

Thread Tools

soaplite SOAPAction header problem

Posts: n/a
I'm trying to make a soap call to a server but the server responds with
"The HTTP request did not contain a valid SOAPAction header. The value
of the header was

The server is looking for
"document/urn:crmondemand/ws/lead/10/2004:LeadInsert". I'm not sure if
I'm just making the call correctly or if there is some other problem.
Some code is below. If there's any other information you need or if you
have any questions about what I'm doing please let me know.


Sample Code:

#!/usr/local/bin/perl -w

use LWP::UserAgent;
use SOAP::Lite;# +trace => all; # Uncomment to show SOAP debugging
use Data:umper;
use strict;

my $authurl = "";
my $auth = LWP::UserAgent->new;
my $sessionID = "";

##Begin Login
##End Login

##Begin SOAP Call
my $soapurl = $authurl . "?JSESSIONID=" . $sessionID;
my $xml =
"<LeadWS_LeadInsert_Input><ListOfLead><Lead><Campa ignID>1-6ROFZO</CampaignID><LeadFirstName>David</LeadFirstName><LeadLastName>Rossignol</LeadLastName><ReassignAccount>y</ReassignAccount><ReassignLeadOwner>y</ReassignLeadOwner></Lead></ListOfLead></LeadWS_LeadInsert_Input>";
my $soap = SOAP:ata->type(xml => $xml);

my $soapCall = SOAP::Lite
-> uri('document/urn:crmondemand/ws/lead/10/2004')
-> proxy($soapurl);

my $result = $soapCall
-> LeadInsert($soap);

unless ($result->fault) {
print "Begin result...\n" . $result->result() . "\n...End result\n";
} else {
print "Begin Error...\n" . join(', ', $result->faultcode,
$result->faultstring) . "\n";
print Dumper($result->faultdetail);
print "...End Error\n";
##End SOAP Call

##Begin Logoff
##End Logoff

Reply With Quote
Posts: n/a

I think that your URI may be off. Usually this is used to tell which
service you are trying to fire up. Try dropping the "document/".


my $soapCall = SOAP::Lite
-> uri('urn:crmondemand/ws/lead/10/2004')
-> proxy($soapurl);

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server did not recognize the value of HTTP Header SOAPAction =?Utf-8?B?TWlndWVsIElzaWRvcm8=?= ASP .Net 2 05-25-2007 10:41 PM
soaplite XML 0 08-01-2006 02:25 AM
SOAPAction Header Deprecated - how to Distinguish SOAP from HTTP request? Abstract Java 1 10-19-2005 12:06 AM
soaplite missing namespace in my soap envelop Perl Misc 0 10-18-2005 07:01 PM
Server did not recognize the value of HTTP Header SOAPAction Juan Rodriguez ASP .Net Web Services 0 08-28-2003 02:44 PM