soaplite SOAPAction header problem

Discussion in 'Perl Misc' started by drossign, Aug 16, 2005.

  1. drossign

    drossign Guest

    Hello,
    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
    "document/urn:crmondemand/ws/lead/10/2004#LeadInsert".

    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.

    Thanks,
    Dave

    Sample Code:

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

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

    my $authurl = "https://secure.crmondemand.com/Services/Integration";
    my $auth = LWP::UserAgent->new;
    $auth->timeout(10);
    $auth->cookie_jar;
    my $sessionID = "";

    ##Begin Login
    ##End Login

    ##Begin SOAP Call
    my $soapurl = $authurl . "?JSESSIONID=" . $sessionID;
    my $xml =
    "<LeadWS_LeadInsert_Input><ListOfLead><Lead><CampaignID>1-6ROFZO</CampaignID><LeadFirstName>David</LeadFirstName><LeadLastName>Rossignol</LeadLastName><ReassignAccount>y</ReassignAccount><ReassignLeadOwner>y</ReassignLeadOwner></Lead></ListOfLead></LeadWS_LeadInsert_Input>";
    my $soap = SOAP::Data->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
    drossign, Aug 16, 2005
    #1
    1. Advertising

  2. drossign

    Guest

    Hey,

    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/".

    So:

    my $soapCall = SOAP::Lite
    ->xmlschema('http://www.w3.org/2001/XMLSchema')
    -> uri('urn:crmondemand/ws/lead/10/2004')
    -> proxy($soapurl);
    , Aug 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abstract
    Replies:
    1
    Views:
    970
    Mike Schilling
    Oct 19, 2005
  2. =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=

    Server did not recognize the value of HTTP Header SOAPAction

    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=, May 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    28,700
    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=
    May 25, 2007
  3. Juan Rodriguez

    Server did not recognize the value of HTTP Header SOAPAction

    Juan Rodriguez, Aug 28, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    156
    Juan Rodriguez
    Aug 28, 2003
  4. Hazzard
    Replies:
    3
    Views:
    210
    Hazzard
    Sep 13, 2003
  5. Replies:
    0
    Views:
    160
Loading...

Share This Page