Loading ...
Sorry, an error occurred while loading the content.

SOAPAction header problem

Expand Messages
  • drossign
    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
    Message 1 of 1 , Aug 16, 2005
    • 0 Attachment
      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><Campa
      ignID>1-6ROFZO</CampaignID><LeadFirstName>David</L
      eadFirstName><LeadLastName>Rossignol</LeadLastName
      ><ReassignAccount>y</ReassignAccount><ReassignLead
      Owner>y</ReassignLeadOwner></Lead></ListOfLead></L
      eadWS_LeadInsert_Input>";
      my $soap = SOAP::Data->type(xml => $xml);

      print "\n\n" . $soapurl . "\n\n";

      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
    Your message has been successfully submitted and would be delivered to recipients shortly.