| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:56 |
ProcedureWS_Android_IOS_HTTPGetResult()
bufResHTTP is Buffer sHTTPResult isstring
bufResHTTP=HTTPGetResult(httpResult)
IFIniOSMode() =TrueORIniOSSimulatorMode() =TrueORIniOSEmulatorMode() =True IFStringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0THEN sHTTPResult=UTF8ToString(bufResHTTP) ELSE sHTTPResult=AnsiToUnicode(bufResHTTP) END ELSE IFInAndroidMode() =TrueORInAndroidSimulatorMode() =TrueORInAndroidEmulatorMode() =True
sHTTPResult=bufResHTTP END
RESULTsHTTPResult > |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:57 |
ProcedureWS_Android_iOs_ReadXml(XML_Retorno isstring,Xml_Atributo isstring)
arrXml_TagResult isarray of strings xposicaoinicial isint=0 Xposicaofinal isint=0 X isint=0 arrXml_Tag isarray of strings
Inicial isint=PositionOccurrence(XML_Retorno,"<"+Xml_Atributo,firstRank,FromBeginning) Final isint=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 isint=Length(XML_Retorno)
LOOP(nTotalxml)
X++ IFxposicaoinicial=0ANDXposicaofinal=0ANDXML_Retorno[[X]] ="<"THEN X++ IFXML_Retorno[[X]] ="/"THEN xposicaoinicial=X+1 END END IFxposicaoinicial>0ANDXML_Retorno[[X]] =">"THEN Xposicaofinal=X END IFXposicaofinal>0ANDxposicaoinicial>0THEN stag isstring=Middle(XML_Retorno,xposicaoinicial,Xposicaofinal-xposicaoinicial) IFstag="NoXml"THEN BREAK END Add(arrXml_Tag,stag) Xposicaofinal=0 xposicaoinicial=0 END
END
IFIniOSMode() =TrueTHEN
NoXml isstring i isint=1 NoXml=XMLExtractString(XML_Retorno,"NoXml",i)
FOR EACH stag OFarrXml_Tag
temp isstring=XMLExtractString(NoXml,stag) Add(arrXml_TagResult,temp)
END
ELSE IFInAndroidMode() =True
XmlDoc isXMLDocument XmlDoc=XMLOpen(XML_Retorno,fromString) NoXml isxmlNode
FOR EACH NoXml OF XmlDoc.Xml.Recorte on NoXml
FOR EACHsTag OFarrXml_Tag
Add(arrXml_TagResult,NoXml..ChildNode[sTag])
END
END
END
RESULTarrXml_TagResult > |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 18:58 |
ok=HTTPRequest("http://"+IpSaladaFruta01+"/soap/IRtPlusSSDM","","",Xml_SEND,"text/xml","","")
IFok=True
XML_Retorno=WS_Android_IOS_HTTPGetResult()
XML_Retorno=Capitalize(WS_RemoveAcentos(XML_Retorno))
IFDebugSN="S"THEN Info("/mnt/sdcard/TaxiFv/Arquivos/RetornoPosicaoTaxi.TXT",XML_Retorno) IFInAndroidMode() =True IFInSimulatorMode() =False fSaveBuffer("/mnt/sdcard/TaxiFv/Arquivos/RetornoPosicaoTaxi.TXT",XML_Retorno) ELSE fSaveBuffer("c:\RetornoPosicaoTaxi.TXT",XML_Retorno) END END END END > |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 19:13 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 19:37 |
> |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 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 657 messages Popularité : +175 (223 votes) |
|
Posté le 18 novembre 2014 - 20:14 |
"Describing the current configuration" |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 04 décembre 2014 - 23:48 |
| |
| |
| | | |
|
| | |
| |
Posté le 05 décembre 2014 - 08:48 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 09 décembre 2014 - 17:56 |
IFStringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0THEN sHTTPResult=UTF8ToString(bufResHTTP) ELSE sHTTPResult=AnsiToUnicode(bufResHTTP) END > |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 09 décembre 2014 - 18:01 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 29 janvier 2015 - 12:52 |
ProcedureWS_Android_IOS_HTTPGetResult()
bufResHTTP is Buffer sHTTPResult isstring
bufResHTTP=HTTPGetResult(httpResult)
IFIniOSMode() =TrueORIniOSSimulatorMode() =TrueORIniOSEmulatorMode() =True IFStringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0THEN sHTTPResult=UTF8ToString(bufResHTTP) ELSE sHTTPResult=AnsiToUnicode(bufResHTTP) END ELSE IFInAndroidMode() =TrueORInAndroidSimulatorMode() =TrueORInAndroidEmulatorMode()=True
sHTTPResult=bufResHTTP END
RESULTsHTTPResult > |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 25 mai 2015 - 21:08 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 25 mai 2015 - 21:09 |
> |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 messages Popularité : +175 (223 votes) |
|
Posté le 26 mai 2015 - 19:19 |
MyUnicodeString is UNICODEstring sLine isstring="" sTextFileUnicode isstring="c:\tmp\00010101.txt" mLinha isstring
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 isboolean FileID isint=fCreate(DirPadrao+mArquivo,foAnsi) IFFileID=-1THEN Info("Erro ao criar arquivo.") xFlagOk=False RETURN END
... ...
EnviarArquivo isboolean=FTPSend(MinhaConexao,DirPadrao+mArquivo,CompleteDir(xPastaPedidos),"",ftpASCIIMode) IFEnviarArquivo=FalseTHEN 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 657 messages Popularité : +175 (223 votes) |
|
Posté le 26 mai 2015 - 19:20 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 657 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 >______________________________________________ |
| |
| |
| | | |
|
| | |