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

manual xml soap call works, but not stubmaker code.

Expand Messages
  • Scott Edwards
    SugarCRM has a set_entry method via SOAP I m attempting to use. I ve made a working xml post by hand, but I m unsure how to get my SOAP::Lite object to post
    Message 1 of 2 , Jun 22 4:20 PM
    • 0 Attachment
      SugarCRM has a set_entry method via SOAP I'm attempting to use. I've made a
      working xml post by hand, but I'm unsure how to get my SOAP::Lite object to
      post it in a similar fashion. Idealy, I'd like to pass a hash or hashref for
      the third paramater, and it'll know what to do.

      A sample working post, and dummy wsdl (using example.com) is available at
      http://supaplex.aros.net/sugarcrm/.

      My previous set_entry test snippets only create a new blank contact with no
      data.

      My /broken/ samples:

      sub set_lead
      {
      my $session=login ($user,$masterhash);

      my %d;
      $d{id}="92fcbe58-31b7-597f-0f08-4499c1c7ab3c";
      $d{title}="Mr";
      $d{first_name}="WTF";
      $d{last_name}="last123123";
      return sugarsoap->set_entry($session,'Leads',\%d);
      }

      or

      sub set_lead
      {
      my $session=login ($user,$masterhash);

      my %d;
      $d{id}="92fcbe58-31b7-597f-0f08-4499c1c7ab3c";
      $d{title}="Mr";
      $d{first_name}="WTF";
      $d{last_name}="last123123";
      print "Logged in [$session]\n";
      my @d;
      foreach $_ (keys %d)
      {
      my @e=($_,$d{$_});
      push (@d,\@e);
      }
      return sugarsoap->set_entry($session,'Leads',\@d);
      }

      If anyone can illustrate what I'm doing wrong, I'd greatly appriciate it. And
      if it's a limitation, let me know that to. Idealy the xml output should be
      similar (but exact hopefully isn't neccessary) to the sample posted on the
      site I provided.

      Thanks.

      --
      Scott Edwards - Systems Administrator
      ArosNet Internet Services - http://www.aros.net
      28 South 400 East; Salt Lake City, UT 84111-1804; 888.532.AROS
      free-self-bIackIisting@...
    • Scott Edwards
      http://www.majordojo.com/soaplite/docs/SOAP/Data.html#COMPLEX_TYPES solved all of my questions. I was able to troubleshoot faster by using a tcp endpoint off
      Message 2 of 2 , Jun 23 1:54 PM
      • 0 Attachment
        http://www.majordojo.com/soaplite/docs/SOAP/Data.html#COMPLEX_TYPES
        solved all of my questions. I was able to troubleshoot faster by
        using a tcp endpoint off netcat. I then captured and compared the
        response in vim against a known good submission. (so I could search
        keys etc). The initial code works, and I expect future code to work
        in a similar fashion.

        Thanks!
      Your message has been successfully submitted and would be delivered to recipients shortly.