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

Re: Question on using the HTTPAPI to receive a GUID (Charles Wilt)



   What does your HTTP API log look like?
   I suspect the service is sending back XML, but not a true XML document.
   �   A true XML document starts out:�<?xml version="1.0"
   encoding="ISO-8859-1" ?>
   The debug log will show you exactly what is coming back.
   You might also try using�http_url_get() and storing the reply in a
   file in the IFS so you can look at it.
   Charles
   On Wed, Mar 23, 2016 at 1:27 PM, Baeten, John
   <[1]John.Baeten@xxxxxxxxxx> wrote:

     Charles,
     As I am showing I am very new to the use of HTTP API.� I can say
     that we have recently downloaded the save file to see if this will
     work on our system to send and receive XML documents from a web
     service.� So I think we have the most current version.� But the
     example programs still use the webforms part.
     I did follow your suggestion and removed /DEFINE WEBFORMS parts from
     the example program to see if my changes will work.� Unfortunately
     they are still not working.
     I was also told that the HTTP API process might be trying to
     download the response in JSON format which might be the issue.�     Again, I don't know if it is or is not - and not really sure how the
     whole process works.� At the bottom I showed the errors I found
     when I stepped thought the full program to try and understand what
     is happening in the back ground.. but that didn't help me much.
     They have told me the URL is now working, and it has changed a
     little bit to:
     (Where I will need to fill in the startDateTime and the InstanceID)
     [2]https://xxxbendservicewebapp.xxxwebsites.net/api/EndServiceMessag
     e/GetMessageGUIDS?startDateTime=2016-03-22T10:56:09-05:00&InstanceId
     =US
     When I put this into a web browser I get the following:
     <ArrayOfstring>
     � <string>00000000-0000-0000-0000-000000000000</string>
     � <string>8073fc27-93d4-42c6-9fe6-a68629785ef5</string>
     </ArrayOfstring>
     When I copy this URL and just have the program run it (so it is
     exact):
     uri ='[3]https://xxxendservicewebapp.xxxwebsites.net/api/+
     � � � EndServiceMessage/GetMessageGUIDS?startDateTime=+
     � � � 2016-03-21T18:32:04-05:00&instanceID=US';
     rc = http_url_get_xml( uri: *null: %paddr(parseXML): *null);
     if (rc <> 1);
     � � �http_crash();
     endif;
     I get the error:
     XML parse failed at line 1, col 0: syntax error
     I am not sure how to go about seeing what is the XML it retrieved
     back in the first place.� I have stepped through the program in
     debug mode to follow what it is doing.
     http_url_get_xml
     http_url_get_raw
     http_persist_open
     http_long_ParseURL
     http_select_commdriver
     CommSSL_Resolve
     commTcp_Resolve
     DNS_Info
     Resolve
     CommSSL_Connect
     CommSSL_Upgrade
     In the program CommSSL_Upgrade, I do get error message (GSKit) I/O:
     Broken pipe.� At that part of the program my RC = 406.
     It returns back a -1 from program http_url_get_raw to program
     http_url_get_xml.
     ParseXML
     Error when my example program finished
     SSL Handshake: (GSKit) I/O: Broken pipe.
     When I run it again without stepping though the whole program I get
     the error:
     XML parse failed at line 1, col 0: syntax error
     John Baeten

References

   1. mailto:John.Baeten@xxxxxxxxxx
   2. https://xxxbendservicewebapp.xxxwebsites.net/api/EndServiceMessage/GetMessageGUIDS?startDateTime=2016-03-22T10:56:09-05:00&InstanceId=US
   3. https://xxxendservicewebapp.xxxwebsites.net/api/+
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------