[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Ftpapi Digest, Vol 113, Issue 20
Thank you for that information. It looks like the original XML that I am trying to retrieve does not have the <?xml version=1.0"...
But if I can get that part to work the next URL call give me back that information (well just the first part) as shown below.
The URL is:
https://xxxendservicewebapp.xxxwebsites.net/api/EndServiceMessage/GetMessage?id=8073fc27-93d4-42c6-9fe6-a68629785ef5
When I put that into Firefox I get back:
(also I see some of the XML is not correct, example is <Comments />) So I am not sure if that is why I am not able to have the program download it.
<string><?xml version="1.0" ?>
<EndService>
<Service>
<RouteID>6264</RouteID>
<EmployeeID>Sam@xxxxxxx</EmployeeID>
<ServiceID>8073fc27-93d4-42c6-9fe6-a68629785ef5</ServiceID>
<ServiceName>152606</ServiceName>
<GMTOffsetInMinutes>330</GMTOffsetInMinutes>
<ServiceStart>2016-02-29T10:11:25</ServiceStart>
<ServiceEnd>2016-02-29T10:24:08</ServiceEnd>
<NextServiceStart />
<TotalAmount>0.00</TotalAmount>
<Comments />
<SourceSystemModifyTS>2016-02-29T10:24:08</SourceSystemModifyTS>
<ServiceAddressID>S60012005121937626000</ServiceAddressID>
<ReasonID />
<LanguageId>EN</LanguageId>
<ServiceAddressSurveyID />
<TaxAmount />
<WorkOrder>
<WorkOrderID>ac4c3400-66db-4790-86b5-8e895be0f76c</WorkOrderID>
<WorkOrderName>152606</WorkOrderName>
<VisitTypeID>17</VisitTypeID>
<MobileCreateFlag>true</MobileCreateFlag>
</WorkOrder>
<SourceSystemModifyTS>2016-02-29T10:24:08</SourceSystemModifyTS>
</ServiceSignOff>
<ServiceSubTypes>
<ServiceSubType>
<TypeID>1</TypeID>
<SubTypeID>A</SubTypeID>
<CallID />
<PricePerService />
<ServiceQuantity />
<PriceChangeFlag />
<PriceChangeReason />
<SourceSystemModifyTS />
</ServiceSubType>
</ServiceSubTypes>
</Service>
</EndService></string>
When I copy that same URL and put it in the program I get back:
XML parse failed at line 1, col 17: not well-formed (invalid token)
I guess my new question is - are then sending me messed up XML and that is why the program cannot load/display it in any way? And if that is the case, why can I see the XML by using Firefox with no issues? For the HTTP API programs to work, does the XML need to be a true XML document with the <?xml version="1.0" encoding="ISO-8859-1" ?> at the top?
Can you please tell me how to turn on the debug log? When I was in the program I did see it going to write a debug log, but skipped it because it was not turned on. Where do you go to turn it on?
Thanks again,
John Baeten
Message: 1
Date: Wed, 23 Mar 2016 17:27:35 +0000
From: "Baeten, John" <John.Baeten@xxxxxxxxxx>
To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Question on using the HTTPAPI to receive a GUID (Charles
Wilt)
Message-ID:
<BLUPR0601MB0962B5C2DAEA135D1853676A87810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
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)
https://xxxbendservicewebapp.xxxwebsites.net/api/EndServiceMessage/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 ='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
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Wednesday, March 23, 2016 8:20 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 113, Issue 19
Send Ftpapi mailing list submissions to
ftpapi@xxxxxxxxxxxxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
You can reach the person managing the list at ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific than "Re: Contents of Ftpapi digest..."
Today's Topics:
1. AW: FTP API Transfer Hanging (Luecke, Dirk)
2. Re: FTP API Transfer Hanging (Chris Edmondson)
3. Re: XML Error (Casey Antczak)
4. Re: Question on using the HTTPAPI to receive a GUID (Charles Wilt)
----------------------------------------------------------------------
Message: 1
Date: Wed, 23 Mar 2016 11:27:12 +0100
From: "Luecke, Dirk" <dirk.luecke@xxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: AW: FTP API Transfer Hanging
Message-ID: <902B3FEFB5B00A42A26E030C4B8086B7500D4BA225@wortma16>
Content-Type: text/plain; charset="iso-8859-1"
This must be a rare event. We had similar problems. They occur less than once a year and we do a lot of ftp. Job hangs forever. So if there is a solution, then I would like to know it too.
Best regards
Dirk
-----Urspr?ngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Udesen, Peder
Gesendet: Mittwoch, 23. M?rz 2016 10:25
An: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Betreff: SV: FTP API Transfer Hanging
I'm experiencing the same issue when using PUT
Just like Davids example for the call stack it is hanging in the accept procedure waiting forever.
I still haven't found any reason for this. It happens for servers that are inside and outside our firewall.
And it doesn't appear every time. For days or weeks there are no problems. Then suddenly it hangs.
Perhaps specifying a value for timeout in the FTP_CONN would solve the immediate problem, not removing the cause.
If you find out what causes it please let me know.
Kind regards
Peder
-----Oprindelig meddelelse-----
Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] P? vegne af David Lounsbrough
Sendt: 22. marts 2016 15:31
Til: 'HTTPAPI and FTPAPI Projects'
Emne: FTP API Transfer Hanging
We are continuing to experience hanging transfers with the FTP API. I can't see anything that looks suspicious coming out of the job log, but I've attached the log and the call stack from the latest failure. The last entry in the log shows where the process is hanging. If this is network related, is there a way we can set a timeout for the transfer? Currently when we have a problem, the job just sits indefinitely waiting for the transfer to complete. Is there a way we can make the FTP API timeout after say 10 minutes so that we can then handle the failure programmatically?
Thanks.
This email and any files transmitted with it may be confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
------------------------------
Message: 2
Date: Wed, 23 Mar 2016 04:31:47 -0700
From: Chris Edmondson <chris@xxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: FTP API Transfer Hanging
Message-ID:
<CABVy8=swuWeYZMjsbBQAVAxRwJTf2SVjrm50k4ML0gHjRQtdgg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"
We had a similar issue with an EDI vendor's FTP connections. It turned out the FTP server URL they provided us would load balance between 4 or 5 different actual FTP servers. After capturing the traffic for a few weeks we discovered the hang always happened with one particular FTP server. The vendor swore all the servers were the same. Since they had no way to tell their system to omit a server from load balancing for a specific customer (us), they gave us the individual URLs for each server and let us decide.
We programmed to always go to the same server and have not seen a recurrence of the problem for several years now.
I have no idea why that particular FTP server would trigger the hang, nor why it worked properly 95% of the time.
On Wed, Mar 23, 2016 at 2:24 AM, Udesen, Peder <Peder.Udesen@xxxxxxxxxxxxxxx
> wrote:
> I'm experiencing the same issue when using PUT
>
> Just like Davids example for the call stack it is hanging in the
> accept procedure waiting forever.
> I still haven't found any reason for this. It happens for servers that
> are inside and outside our firewall.
> And it doesn't appear every time. For days or weeks there are no problems.
> Then suddenly it hangs.
>
> Perhaps specifying a value for timeout in the FTP_CONN would solve the
> immediate problem, not removing the cause.
>
> If you find out what causes it please let me know.
>
> Kind regards
> Peder
>
>
>
> -----Oprindelig meddelelse-----
> Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] P? vegne af David Lounsbrough
> Sendt: 22. marts 2016 15:31
> Til: 'HTTPAPI and FTPAPI Projects'
> Emne: FTP API Transfer Hanging
>
> We are continuing to experience hanging transfers with the FTP API. I
> can't see anything that looks suspicious coming out of the job log,
> but I've attached the log and the call stack from the latest failure.
> The last entry in the log shows where the process is hanging. If this
> is network related, is there a way we can set a timeout for the
> transfer? Currently when we have a problem, the job just sits
> indefinitely waiting for the transfer to complete. Is there a way we
> can make the FTP API timeout after say 10 minutes so that we can then handle the failure programmatically?
>
> Thanks.
>
>
> This email and any files transmitted with it may be confidential and
> intended solely for the use of the individual or entity to which they
> are addressed. If you have received this email in error please notify
> the sender.
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
>
--
Chris Edmondson
509.670.6817
-------------- next part --------------
We had a similar issue with an EDI vendor's FTP connections. It turned
out the FTP server URL they provided us would load balance between 4 or
5 different actual FTP servers. After capturing the traffic for a few
weeks we discovered the hang always happened with one particular FTP
server. The vendor swore all the servers were the same. Since they had
no way to tell their system to omit a server from load balancing for a
specific customer (us), they gave us the individual URLs for each
server and let us decide. We programmed to always go to the same server
and have not seen a recurrence of the problem for several years now.
I have no idea why that particular FTP server would trigger the hang,
nor why it worked properly 95% of the time.
On Wed, Mar 23, 2016 at 2:24 AM, Udesen, Peder
<[1]Peder.Udesen@xxxxxxxxxxxxxxx> wrote:
I'm experiencing the same issue when using PUT
Just like Davids example for the call stack it is hanging in the
accept procedure waiting forever.
I still haven't found any reason for this. It happens for servers
that are inside and outside our firewall.
And it doesn't appear every time. For days or weeks there are no
problems. Then suddenly it hangs.
Perhaps specifying a value for timeout in the FTP_CONN would solve
the immediate problem, not removing the cause.
If you find out what causes it please let me know.
Kind regards
Peder
-----Oprindelig meddelelse-----
Fra: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] P? vegne af David
Lounsbrough
Sendt: 22. marts 2016 15:31
Til: 'HTTPAPI and FTPAPI Projects'
Emne: FTP API Transfer Hanging
We are continuing to experience hanging transfers with the FTP API.
I can't see anything that looks suspicious coming out of the job
log, but I've attached the log and the call stack from the latest
failure. The last entry in the log shows where the process is
hanging. If this is network related, is there a way we can set a
timeout for the transfer? Currently when we have a problem, the job
just sits indefinitely waiting for the transfer to complete. Is
there a way we can make the FTP API timeout after say 10 minutes so
that we can then handle the failure programmatically?
Thanks.
This email and any files transmitted with it may be confidential and
intended solely for the use of the individual or entity to which
they are addressed. If you have received this email in error please
notify the sender.
--------------------------------------------------------------------
---
This is the FTPAPI mailing list.? To unsubscribe, please go to:
[4]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
--
Chris Edmondson
509.670.6817
References
1. mailto:Peder.Udesen@xxxxxxxxxxxxxxx
2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
4. http://www.scottklement.com/mailman/listinfo/ftpapi
------------------------------
Message: 3
Date: Wed, 23 Mar 2016 08:50:25 -0400
From: Casey Antczak <cantczak@xxxxxxxxxxxxxx>
To: "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: XML Error
Message-ID:
<282ADA34B067594180F051929DECB32E02DE17BF4912@xxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
I would like to thank everyone for their help. I did end up finding the issue had to do with the soapaction piece. I completely left it out of my program (rookie mistake). Thanks again, everyone!
Casey Antczak | Account Manager
O: 800-524-1038 x 355 | cantczak@xxxxxxxxxxxxxx<mailto:cantczak@xxxxxxxxxxxxxx>
HCS | Clinical. Financial. Integrated.
www.hcsinteractant.com<http://www.hcsinteractant.com/>
Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
-------------- next part --------------
I would like to thank everyone for their help. I did end up finding the
issue had to do with the soapaction piece. I completely left it out of
my program (rookie mistake). Thanks again, everyone!
Casey Antczak | Account Manager
O: 800-524-1038 x 355 | [1]cantczak@xxxxxxxxxxxxxx
HCS | Clinical. Financial. Integrated.
[2]www.hcsinteractant.com
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, you should destroy this
message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email
for messages of this kind. Opinions, conclusions and other information
in this message that do not relate to the official business of my firm
shall be understood as neither given nor endorsed by it.
References
1. mailto:cantczak@xxxxxxxxxxxxxx
2. http://www.hcsinteractant.com/
------------------------------
Message: 4
Date: Wed, 23 Mar 2016 09:19:29 -0400
From: Charles Wilt <charles.wilt@xxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Question on using the HTTPAPI to receive a GUID
Message-ID:
<CAJ=Tnc6YZh9mRVH-r7vuYkP6V7He-NZ_fw46+1oi01i=7-_mjg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"
Note: in the most recent releases of HTTP API, the webforms_xxxx() procs have been renamed http_url_encoder_xxxxx(); simply leave out the /DEFINE WEBFORMS in your code. The procedures were originally designed (named) to fill in webforms designed for human interaction. As opposed to a true web service.
Do you have an example of what your request is supposed to look like? How does it compare to what you are sending?
In the data you show, it appears you've duplicated part of the URI ?
uri =
'https://ecolabservicewebapp.azurewebsites.net/api/EndService'
'Message/GetMessages?StartTime=StartTime=2016-03-21T19%3A20%3'
'A02-05%3A00&InstanceId=uk*&*
*InstanceId=StartTime=2016-03-21T19''%3A20%3A02-05%3A00&*
?With a rest service, you should be able to copy the example URI ?into a browser and get a valid response.
Charles
On Tue, Mar 22, 2016 at 8:44 PM, Baeten, John <John.Baeten@xxxxxxxxxx>
wrote:
> Thank you Charles for the extra information regarding the GUID. I did
> understand some things about it, but from what I am understanding once
> I am able to get the XML parsed out into the iSeries I will be using
> that value to send to the next URL that will be giving me the actual
> data back in XML format. The GUID XML will have 0 to x+ nodes
> depending on how many different sets of XML I will be needing to download in the next step.
>
> Scott,
>
> Thank you for your comment also. I was also hoping this would be an
> easy process of receiving the XML that would contain the GUID that I
> will need to use in the following URL call to actually get the XML
> data. There really is no documentation relating to the process yet,
> as another part of our company is working on the SQL server side and I
> am just working on getting data to them, hopefully and back again.
>
> The XML that I will be receiving looks like this:
>
> <ArrayOfguid><guid>07ceac4b-52be-4f03-be21-32b77b92301d</guid></ArrayO
> fguid>
>
> I might have had trouble with the example from the LIBHTTP library
> because as I found out today in talking to the group that created it
> the URL is now broken and is not returning the correct XML. The
> method I need to use is to call a REST web service. The example of
> the program I found that I think closely resembles what I need to do
> from the library LIBHTTP examples is EXAMPLE12- Example of working
> with cookies, the other choice was EXAMPLE13-Example of Download
> Currency Exchange Rates (REST). I did choose
> EXAMPLE12 because in my URL string I also needed to send it a
> timestamp and other code that is used to get me the correct GUID XML.
> Which in this example also sends data to the URL as ?query=.
>
> Again, I do not know if my change to the program works or does not
> work because the URL is currently broken. I am wondering if I am on
> the correct track of using an existing example program to change to do
> what I need to happen. From the example I did not know if I need to
> keep (but I did and
> changed):
>
> form = webform_open();
> webform_setVar(form: 'StartTime': %Trim(wrkts));
> webform_setVar(form: 'InstanceId': 'uk'); uri =
> 'https://xxxservicewebapp.xxxwebsites.net/api/+
> EndServiceMessage/GetMessages+
> ?StartTime=' + webform_getData(Form)+
> '&InstanceId=' + webform_getData(Form); webform_close(form);
>
> when I run this part of the program it creates:
> ??
> uri =
> 'https://ecolabservicewebapp.azurewebsites.net/api/EndService'
> 'Message/GetMessages?StartTime=StartTime=2016-03-21T19%3A20%3'
> 'A02-05%3A00&InstanceId=uk&InstanceId=StartTime=2016-03-21T19'
> '%3A20%3A02-05%3A00&InstanceId=uk '
>
> And I get the following error after it runs:
> rc = http_url_get_xml( uri: *null: %paddr(parseXML): *null); if (rc <>
> 1);
> http_crash();
> endif;
>
> HTTP/1.1 500 Internal Server Error
>
>
> The program has not run correctly yet, so for the parsing of the XML I
> have not been able to start that as I do not know what the results
> will give me back for the path and also the name field values. I have
> left it as the way the example program has it set up (I do understand
> this is the wrong data it is looking for). While in debugging the
> program the PATH = '/html/head' and '/html'. Then the program errors with the above error.
>
> I guess to sum this all up, I am very new at consuming web services
> and I would like to know based on the example program that I am using
> and also the changes I have made to it if I am on the correct track to
> solve this programming issue. Web services seem very interesting and
> this is the first time I have ever seen/used them.
>
> Again, any help would be greatly appreciated in working with the
> example program to complete this part of the project that I am working on.
>
> Thanks,
>
> John
>
>
-------------- next part --------------
Note: in the most recent releases of HTTP API, the webforms_xxxx()
procs have been renamed? http_url_encoder_xxxxx(); simply leave out the
/DEFINE WEBFORMS in your code.? The procedures were originally
designed (named) to fill in webforms designed for human interaction.?
As opposed to a true web service.
Do you have an example of what your request is supposed to look like??
How does it compare to what you are sending?
In the data you show, it appears you've duplicated part of the URI
?
uri =
'[1]https://ecolabservicewebapp.azurewebsites.net/api/EndService'
'Message/GetMessages?StartTime=StartTime=2016-03-21T19%3A20%3'
'A02-05%3A00&InstanceId=uk&InstanceId=StartTime=2016-03-21T19'
'%3A20%3A02-05%3A00&
?With a rest service, you should be able to copy the example URI ?into
a browser and get a valid response.
Charles
On Tue, Mar 22, 2016 at 8:44 PM, Baeten, John
<[2]John.Baeten@xxxxxxxxxx> wrote:
Thank you Charles for the extra information regarding the GUID.? I
did understand some things about it, but from what I am
understanding once I am able to get the XML parsed out into the
iSeries I will be using that value to send to the next URL that will
be giving me the actual data back in XML format.? The GUID XML will
have 0 to x+ nodes depending on how many different sets of XML I
will be needing to download in the next step.
Scott,
Thank you for your comment also.? I was also hoping this would be
an easy process of receiving the XML that would contain the GUID
that I will need to use in the following URL call to actually get
the XML data.? There really is no documentation relating to the
process yet, as another part of our company is working on the SQL
server side and I am just working on getting data to them, hopefully
and back again.
The XML that I will be receiving looks like this:
<ArrayOfguid><guid>07ceac4b-52be-4f03-be21-32b77b92301d</guid></Arra
yOfguid>
I might have had trouble with the example from the LIBHTTP library
because as I found out today in talking to the group that created it
the URL is now broken and is not returning the correct XML.? The
method I need to use is to call a REST web service.? The example of
the program I found that I think closely resembles what I need to do
from the library LIBHTTP examples is EXAMPLE12- Example of working
with cookies, the other choice was EXAMPLE13-Example of Download
Currency Exchange Rates (REST).? I did choose EXAMPLE12 because in
my URL string I also needed to send it a timestamp and other code
that is used to get me the correct GUID XML.? Which in this example
also sends data to the URL as ?query=.
Again, I do not know if my change to the program works or does not
work because the URL is currently broken.? I am wondering if I am
on the correct track of using an existing example program to change
to do what I need to happen.? From the example I did not know if I
need to keep (but I did and changed):
form = webform_open();
webform_setVar(form: 'StartTime': %Trim(wrkts));
webform_setVar(form: 'InstanceId': 'uk');
uri = '[3]https://xxxservicewebapp.xxxwebsites.net/api/+
? ? ? ? EndServiceMessage/GetMessages+
? ? ? ? ?StartTime=' + webform_getData(Form)+
? ? ? ? '&InstanceId=' + webform_getData(Form);
webform_close(form);
when I run this part of the program it creates:
??
uri =
'[4]https://ecolabservicewebapp.azurewebsites.net/api/EndService'
'Message/GetMessages?StartTime=StartTime=2016-03-21T19%3A20%3'
'A02-05%3A00&InstanceId=uk&InstanceId=StartTime=2016-03-21T19'
'%3A20%3A02-05%3A00&InstanceId=uk? ? ? ? ? ? ? ? ? ? ? ?
? ? '
And I get the following error after it runs:
rc = http_url_get_xml( uri: *null: %paddr(parseXML): *null);
if (rc <> 1);
? ? ? http_crash();
endif;
HTTP/1.1 500 Internal Server Error
The program has not run correctly yet, so for the parsing of the XML
I have not been able to start that as I do not know what the results
will give me back for the path and also the name field values.? I
have left it as the way the example program has it set up (I do
understand this is the wrong data it is looking for).? While in
debugging the program the PATH = '/html/head' and '/html'.? Then
the program errors with the above error.
I guess to sum this all up, I am very new at consuming web services
and I would like to know based on the example program that I am
using and also the changes I have made to it if I am on the correct
track to solve this programming issue.? Web services seem very
interesting and this is the first time I have ever seen/used them.
Again, any help would be greatly appreciated in working with the
example program to complete this part of the project that I am
working on.
Thanks,
John
References
1. https://ecolabservicewebapp.azurewebsites.net/api/EndService
2. mailto:John.Baeten@xxxxxxxxxx
3. https://xxxservicewebapp.xxxwebsites.net/api/+
4. https://ecolabservicewebapp.azurewebsites.net/api/EndService
------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list digest. To unsubscribe, go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
End of Ftpapi Digest, Vol 113, Issue 19
***************************************
CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain proprietary and privileged information for the use of the designated recipients named above. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list digest. To unsubscribe, go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
End of Ftpapi Digest, Vol 113, Issue 20
***************************************
CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain proprietary and privileged information for the use of the designated recipients named above. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------