Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: temp_FIAP temp_FIAP_fetch tepco_demand BlueUSB_f_IEEE1888 ... more
Diff: fiap.cpp
- Revision:
- 4:edbcc1833b58
- Parent:
- 3:7b144e1a52db
- Child:
- 5:f0b636449aa3
--- a/fiap.cpp Mon Aug 20 12:47:43 2012 +0000
+++ b/fiap.cpp Mon Aug 20 12:52:50 2012 +0000
@@ -86,9 +86,9 @@
char rstr[800];
HTTPText stream(rstr,800);
//stream.readNext((byte*)outBuffer,1500);
- printf("post.start \n\r");
+ if (debug_mode)printf("post.start \n\r");
HTTPResult r = http.postXML(_fiap_storage,"http://soap.fiap.org/query",InData,&stream);
- printf("post.end \n\r");
+ if (debug_mode) printf("post.end \n\r");
if(!r) {
if (debug_mode)printf("Success \n");
} else {
@@ -141,7 +141,7 @@
SP_XmlElementNode * fiapError = transport.getChild("header").getChild("error").toElement();
int yy,mo,dd,hh,mm,ss;
char str[50];
- printf ("%s \n",transport.toElement()->getName());
+ if (debug_mode) printf ("%s \n",transport.toElement()->getName());
if (fiapError==NULL) {
SP_XmlElementNode * values =transport.getChild("body").toElement();
points=(SP_XmlNodeList *)values->getChildren() ;
@@ -209,9 +209,9 @@
HTTPText InData(_soap_text);
HTTPText stream(rstr,800);
// stream.readNext((byte*)outBuffer,strlen(outBuffer));
- printf("post.start \n\r");
+ if (debug_mode)printf("post.start \n\r");
HTTPResult r = http.postXML(_fiap_storage,"http://soap.fiap.org/query",InData,&stream);
- printf("post.end \n\r");
+ if (debug_mode)printf("post.end \n\r");
if(!r) {
if (debug_mode)printf("Success \n");
} else {
@@ -258,15 +258,15 @@
SP_XmlDomParser parser;
// if (debug_mode)printf("stream readlen = %d \n\r",stream.readLen());
// outBuffer[stream.readLen()]=0;
- printf("check0\n\r");
+ if (debug_mode)printf("check0\n\r");
parser.append(rstr,strlen(rstr));
- printf("check1\n\r");
+ if (debug_mode)printf("check1\n\r");
SP_XmlHandle rootHandle(parser.getDocument()->getRootElement());
SP_XmlHandle transport = rootHandle.getChild(0).getChild(0).getChild(0);
SP_XmlElementNode * fiapError = transport.getChild("header").getChild("error").toElement();
int yy,mo,dd,hh,mm,ss;
char str[50];
- printf ("%s \n\r",transport.toElement()->getName());
+ if (debug_mode)printf ("%s \n\r",transport.toElement()->getName());
if (fiapError==NULL) {
SP_XmlElementNode * values =transport.getChild("body").toElement();
points=(SP_XmlNodeList *)values->getChildren() ;