[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTTP API Debugging conundrum



   We use the http_url_get procedure to post an xml request to an email
   service (Exact Target), and receive back their response.


   They have a couple different URL's for doing this, depending on what
   kind of process is being requested.


   We've been using one of them for a couple years successfully, and now
   I have a new program trying to use the other one.

   When I run it, the return code from the http_url_get procedure is
   "400", and the text captured in the IFS is "<h1>Bad Request</h1>"


   However, when I put my program in debug, and stop it just before it
   calls http_url_get, I can copy and paste the URL string into a
   browser, and the response from the vendor indicates success, and I
   receive the email I requested.


   When I attempt to debug the HTTP API, it actually ends up returning a
   -1 instead of 400, so I suspect that the fact that I am in debugging
   is actually causing the routine to behave differently.

   Having said that, the response from ReqProc() is "1100", and then the
   response from RespProc() is -1, which gets passed back up the chain to
   the calling program, so this appears to be where it is choking when
   I'm in debug, but I don't know why I get a different response when I
   am not.  When this happens, there is no text captured in the IFS.  My
   doc is there, but it is empty.


   If it helps, here is the URL string I am passing to the http_url_get
   procedure, with the User and Password changed for security.


    http://api.dc1.exacttarget.com/integrate.aspx?qf=xml&xml=<exacttarget
   ><authorization><username>XXXXX</username><password>YYYYY</password></
   authorization><system><action>add</action><system_name>triggeredsend</
   system_name><TriggeredSend
   xmlns="http://exacttarget.com/wsdl/partnerAPI";
   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><TriggeredSendDe
   finition><CustomerKey>71533</CustomerKey></TriggeredSendDefinition><Su
   bscribers><SubscriberKey>gfleming@xxxxxxxxxxxxxxxxxxxx</SubscriberKey>
   <EmailAddress>gfleming@xxxxxxxxxxxxxxxxxxxx</EmailAddress><Attributes>
   <Name>First__Name</Name><Value>Greg</Value></Attributes><Attributes><N
   ame>Last__Name</Name><Value>Fleming</Value></Attributes><Attributes><N
   ame>Company__Name</Name><Value>Fritos R
   Us</Value></Attributes><Attributes><Name>Keycode</Name><Value>J4356</V
   alue></Attributes><Attributes><Name>Account__Number</Name><Value>12345
   67</Value></Attributes><Attributes><Name>Source</Name><Value>GNeil</Va
   lue></Attributes></Subscribers></TriggeredSend></system></exacttarget>


   Judging from the changelog.txt, I think I am on version 1.15 of the
   API.  If you think upgrading to the latest and greatest would help, I
   could try that.  I haven't thus far just because that would mean
   retesting our other programs that already use the API successfully.


   Anything obvious jump out at anyone ?


   Greg Fleming

   Senior Programmer/Analyst

   Everglades Direct, Inc.

   720 International Parkway

   Sunrise, FL 33325

   954.514.2258

   954.851.1201 Fax

   [1]gfleming@xxxxxxxxxxxxxxxxxxxx

References

   1. mailto:gfleming@xxxxxxxxxxxxxxxxxxxx
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------