| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:56 |
Procedure WS_Android_IOS_HTTPGetResult()
bufResHTTP is Buffer sHTTPResult is string
bufResHTTP = HTTPGetResult(httpResult)
IF IniOSMode() = True OR IniOSSimulatorMode() = True OR IniOSEmulatorMode() = True IF StringCount(bufResHTTP, “ISO-8859-1”, IgnoreCase) = 0 THEN sHTTPResult = UTF8ToString(bufResHTTP) ELSE sHTTPResult = AnsiToUnicode(bufResHTTP) END ELSE IF InAndroidMode() = True OR InAndroidSimulatorMode() = True OR InAndroidEmulatorMode() = True
sHTTPResult = bufResHTTP END
RESULT sHTTPResult |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:57 |
Procedure WS_Android_iOs_ReadXml(XML_Retorno is string, Xml_Atributo is string )
arrXml_TagResult is array of strings xposicaoinicial is int = 0 Xposicaofinal is int = 0 X is int = 0 arrXml_Tag is array of strings
Inicial is int = PositionOccurrence(XML_Retorno,"<"+Xml_Atributo,firstRank,FromBeginning) Final is int = PositionOccurrence(XML_Retorno,"</"+Xml_Atributo+">",lastRank,FromEnd) +Length("</"+Xml_Atributo+">") XML_Retorno = Middle(XML_Retorno,Inicial,Final - Inicial) XML_Retorno = Replace(XML_Retorno,Xml_Atributo,"NoXml") XML_Retorno = "<Xml><Recorte>"+XML_Retorno+"</Recorte></Xml>"
nTotalxml is int = Length(XML_Retorno)
LOOP (nTotalxml)
X++ IFxposicaoinicial = 0 AND Xposicaofinal = 0 AND XML_Retorno[[X]] = "<" THEN X++ IF XML_Retorno[[X]] = "/" THEN xposicaoinicial = X + 1 END END IF xposicaoinicial > 0 AND XML_Retorno[[X]] = ">" THEN Xposicaofinal = X END IF Xposicaofinal > 0 AND xposicaoinicial > 0 THEN stag is string = Middle(XML_Retorno,xposicaoinicial,Xposicaofinal - xposicaoinicial) IF stag="NoXml" THEN BREAK END Add(arrXml_Tag, stag) Xposicaofinal = 0 xposicaoinicial = 0 END
END
IF IniOSMode() = True THEN
NoXml is string i is int = 1 NoXml = XMLExtractString(XML_Retorno,"NoXml",i)
FOR EACH stag OF arrXml_Tag
temp is string = XMLExtractString(NoXml,stag) Add(arrXml_TagResult, temp )
END
ELSE IF InAndroidMode() = True
XmlDoc is XMLDocument XmlDoc = XMLOpen(XML_Retorno, fromString) NoXml is xmlNode
FOR EACH NoXml OF XmlDoc.Xml.Recorte on NoXml
FOR EACH sTag OF arrXml_Tag
Add(arrXml_TagResult,NoXml..ChildNode[sTag])
END
END
END
RESULT arrXml_TagResult |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:58 |
ok = HTTPRequest("http://"+IpSaladaFruta01+"/soap/IRtPlusSSDM","", "", Xml_SEND, "text/xml","","")
IF ok = True
XML_Retorno = WS_Android_IOS_HTTPGetResult()
XML_Retorno = Capitalize(WS_RemoveAcentos(XML_Retorno))
IF DebugSN = "S" THEN Info("/mnt/sdcard/TaxiFv/Arquivos/RetornoPosicaoTaxi.TXT", XML_Retorno) IF InAndroidMode() = True IF InSimulatorMode() = False fSaveBuffer("/mnt/sdcard/TaxiFv/Arquivos/RetornoPosicaoTaxi.TXT", XML_Retorno) ELSE fSaveBuffer("c:\RetornoPosicaoTaxi.TXT", XML_Retorno) END END END END |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 19:13 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 19:37 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 19:40 |
OBS.:
The Android and iOS project while using this configuration is that the global definition of the project and the button: "Describing the current configuration" which is at the bottom of the screen. |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 20:14 |
"Describing the current configuration" |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 04 décembre 2014 - 23:48 |
| |
| |
| | | |
|
| | |
| |
Posté le 05 décembre 2014 - 08:48 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 09 décembre 2014 - 17:56 |
IF StringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0 THEN sHTTPResult=UTF8ToString(bufResHTTP) ELSE sHTTPResult=AnsiToUnicode(bufResHTTP) END |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 09 décembre 2014 - 18:01 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 29 janvier 2015 - 12:52 |
Procedure WS_Android_IOS_HTTPGetResult()
bufResHTTP is Buffer sHTTPResult is string
bufResHTTP = HTTPGetResult(httpResult)
IF IniOSMode() = True OR IniOSSimulatorMode() =True OR IniOSEmulatorMode() = True IF StringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0 THEN sHTTPResult = UTF8ToString(bufResHTTP) ELSE sHTTPResult = AnsiToUnicode(bufResHTTP) END ELSE IF InAndroidMode() =True OR InAndroidSimulatorMode() =True OR InAndroidEmulatorMode() = True
sHTTPResult = bufResHTTP END
RESULT sHTTPResult |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 25 mai 2015 - 21:08 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 25 mai 2015 - 21:09 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 26 mai 2015 - 19:19 |
MyUnicodeString is UNICODE string sLine is string = "" sTextFileUnicode is string = "c:\tmp\00010101.txt" mLinha is string
MyUnicodeString = fLoadText(sTextFileUnicode,foAnsi)
sLine = UnicodeToAnsi(MyUnicodeString,charsetAnsi)
ListDeleteAll(ListBox1) ListAdd(ListBox1,sLine)
FOR EACH ROW OF ListBox1 mLinha = ListBox1..DisplayedValue Trace(mLinha) END
xFLagOk is boolean FileID is int = fCreate(DirPadrao+mArquivo,foAnsi) IF FileID=-1 THEN Info("Erro ao criar arquivo.") xFlagOk=False RETURN END
... ...
EnviarArquivo is boolean=FTPSend(MinhaConexao,DirPadrao+mArquivo,CompleteDir(xPastaPedidos),"",ftpASCIIMode) IF EnviarArquivo=False THEN Error("Erro ao enviar arquivo para o FTP.",ErrorInfo()) Info("Arquivo não foi enviado.","Tente enviá-lo novamente.") xFlagOk=False RETURN END
|
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 26 mai 2015 - 19:20 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 19 septembre 2015 - 21:25 |
OBS. : E se ainda tiver problemas use antes de qualquer codigo esse comando:
ChangeCharset(charsetOccidental)
-- Adriano Jose Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com ______________________________________________ |
| |
| |
| | | |
|
| | |