|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Iniciado por guest, 10,nov. 2014 00:01 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 10,noviembre 2014 - 00:01 |
Hi all, I'm creating a webservice that will receive xml file and return other xml file with, among other informations, a base64 pdf file.
In the Test Page everything works fine, but when creating a simple page to consume that webservice, the system hangs. I've found that it depends on the content of the output xml file.
I created a very simple webservice and webservice call just to explain the problem.
WEBSERVICE: PROCEDURE fTeste(sParam is string):string //sParam: not used sXml is string= fLoadText("C:\OUT.XML") sXml=XMLExtractString(sXml,"Document") RESULT sXml WEBSERVICE CALL: pIn is TO fTeste pOut is TO fTesteResponse pIn.sParam="" pOut=fTeste(pIn) Info(pOut.fTesteResult) Even removing the attribute contentType="application/pdf", the system hangs.
OUT.XML (the original file has 262KB). I removed part of the file content. <?xml version="1.0" encoding="utf-8" ?> 09-11-2014 19:34:43C:\Docs\20141109193442828.xmlJVBERi0xLjMNCiX/////MTI0MA0KMSAwIG9iag0KPDwNCi9UeXBlIC9DYXRhbG9nDQovUGFnZXMg NCAwIFINCi9PdXRsaW5lcyAyIDAgUg0KPj4NCmVuZG9iag0KMiAwIG9iag0KPDwNCi9UeXBlIC9P dXRsaW5lcw0KL0NvdW50IDANCj4+DQplbmRvYmoNCjMgMCBvYmoNClsvUERGIC9UZXh0IC9JbWFn ZUNdDQplbmRvYmoNCjQgMCBvYmoNCjw8DQovVHlwZSAvUGFnZXMNCi9Db3VudCAxDQovS2lkcyBb NDEgMCBSXQ0KPj4NCmVuZG9iag0KNSAwIG9iag0KPDwNCi9UeXBlIC9Gb250DQovU3VidHlwZSAv VHlwZTANCi9OYW1lIC9GMQ0KL0Jhc2VGb250IC9mb24wDQovRW5jb2RpbmcgL0lkZW50aXR5LUgN FFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9kNCmVuZHN0cmVh bQ0KZW5kb2JqDQp4cmVmDQowIDQ1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QowMDAwMDg5MDc4IDAwMDAwIG4NCjAwMDAwODkxMDEgMDAwMDAgbg0KMDAwMDA5Mzg1NiAw MDAwMCBuDQowMDAwMDk0MDgxIDAwMDAwIG4NCjAwMDAwOTc2OTQgMDAwMDAgbg0KMDAwMDE3Nzg0 OSAwMDAwMCBuDQp0cmFpbGVyDQo8PA0KL1NpemUgNDUNCi9Sb290IDEgMCBSDQovSURbDQooKSgp XQ0KPj4NCnN0YXJ0eHJlZg0KMTk3MDYwDQolJUVPRg0KAA==
Thanks in advance MC |
| |
| |
| | | |
|
| | |
| |
| Publicado el 11,noviembre 2014 - 11:19 |
Hi,
I Work with webservices in Windev/Webdev and result string should just give you a string.
1. Is there a limit on the string size you can send via WebService (I think it is set somwhere in ISS) 2. Why the XMLExtractString command why not send everything and do the XMLExtractString when file is receivied. 3. Perhaps unicodetoansi / UTF8ToAnsi needs to be executed agains the string ? (Or xmltotext)
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 11,noviembre 2014 - 11:58 |
Hi Miguel
"the system hangs"... Which one? The client? The webservice?
In any case, your problem MAY come from the included file, as there are some size constraints in a SOAP based webservice.
You can remove those size limit by using instead a REST type api in POST mode. That is done by using an awp page as webservice.
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
NEW: WXReplication, your open source replication system is available on my web site!!! WXShowroom.com: Show your projects! More information on http://www.fabriceharari.com
On 11/9/2014 5:01 PM, Miguel C. wrote:
Hi all, I'm creating a webservice that will receive xml file and return other xml file with, among other informations, a base64 pdf file.
In the Test Page everything works fine, but when creating a simple page to consume that webservice, the system hangs. I've found that it depends on the content of the output xml file.
I created a very simple webservice and webservice call just to explain the problem.
WEBSERVICE: PROCEDURE fTeste(sParam is string):string //sParam: not used sXml is string= fLoadText("C:\OUT.XML") sXml=XMLExtractString(sXml,"Document") RESULT sXml WEBSERVICE CALL: pIn is TO fTeste pOut is TO fTesteResponse pIn.sParam="" pOut=fTeste(pIn) Info(pOut.fTesteResult) Even removing the attribute contentType="application/pdf", the system hangs.
OUT.XML (the original file has 262KB). I removed part of the file content. <?xml version="1.0" encoding="utf-8" ?> 09-11-2014 19:34:43C:\Docs\20141109193442828.xmlJVBERi0xLjMNCiX/////MTI0MA0KMSAwIG9iag0KPDwNCi9UeXBlIC9DYXRhbG9nDQovUGFnZXMg
NCAwIFINCi9PdXRsaW5lcyAyIDAgUg0KPj4NCmVuZG9iag0KMiAwIG9iag0KPDwNCi9UeXBlIC9P
dXRsaW5lcw0KL0NvdW50IDANCj4+DQplbmRvYmoNCjMgMCBvYmoNClsvUERGIC9UZXh0IC9JbWFn
ZUNdDQplbmRvYmoNCjQgMCBvYmoNCjw8DQovVHlwZSAvUGFnZXMNCi9Db3VudCAxDQovS2lkcyBb
NDEgMCBSXQ0KPj4NCmVuZG9iag0KNSAwIG9iag0KPDwNCi9UeXBlIC9Gb250DQovU3VidHlwZSAv
VHlwZTANCi9OYW1lIC9GMQ0KL0Jhc2VGb250IC9mb24wDQovRW5jb2RpbmcgL0lkZW50aXR5LUgN
FFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9kNCmVuZHN0cmVh
bQ0KZW5kb2JqDQp4cmVmDQowIDQ1DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMjEgMDAw
MDAgbg0KMDAwMDAwMDA5MyAwMDAwMCBuDQowMDAwMDAwMTQ1IDAwMDAwIG4NCjAwMDAwMDAxODQg
MDAwMDAgbg0KMDAwMDAwMDI0OSAwMDAwMCBuDQowMDAwMDAwMzk4IDAwMDAwIG4NCjAwMDAwMDA4
NzYgMDAwMDAgbg0KMDAwMDAwMTE2OCAwMDAwMCBuDQowMDAwMDAxODk3IDAwMDAwIG4NCjAwMDAw
MDE5MTkgMDAwMDAgbg0KMDAwMDAyMzk4OCAwMDAwMCBuDQowMDAwMDI0MTQwIDAwMDAwIG4NCjAw
MDAwMjQ0NTQgMDAwMDAgbg0KMDAwMDAyNDc0NyAwMDAwMCBuDQowMDAwMDI1NDU1IDAwMDAwIG4N
CjAwMDAwMjU0NzggMDAwMDAgbg0KMDAwMDAzODU2NCAwMDAwMCBuDQowMDAwMDM4NzE2IDAwMDAw
IG4NCjAwMDAwMzkxMjIgMDAwMDAgbg0KMDAwMDAzOTQxNCAwMDAwMCBuDQowMDAwMDQwMjM3IDAw
MDAwIG4NCjAwMDAwNDAyNjAgMDAwMDAgbg0KMDAwMDA1NjQ2OCAwMDAwMCBuDQowMDAwMDU2NjIw
IDAwMDAwIG4NCjAwMDAwNTcxMjkgMDAwMDAgbg0KMDAwMDA1NzQyMSAwMDAwMCBuDQowMDAwMDU4
MjIxIDAwMDAwIG4NCjAwMDAwNTgyNDQgMDAwMDAgbg0KMDAwMDA4MDIzOSAwMDAwMCBuDQowMDAw
MDgwMzkzIDAwMDAwIG4NCjAwMDAwODA2NzAgMDAwMDAgbg0KMDAwMDA4MDk2MiAwMDAwMCBuDQow
MDAwMDgxNjk1IDAwMDAwIG4NCjAwMDAwODE3MTggMDAwMDAgbg0KMDAwMDA4NzkwMiAwMDAwMCBu
DQowMDAwMDg4MDU2IDAwMDAwIG4NCjAwMDAwODgyODUgMDAwMDAgbg0KMDAwMDA4ODU3NiAwMDAw
MCBuDQowMDAwMDg5MDc4IDAwMDAwIG4NCjAwMDAwODkxMDEgMDAwMDAgbg0KMDAwMDA5Mzg1NiAw
MDAwMCBuDQowMDAwMDk0MDgxIDAwMDAwIG4NCjAwMDAwOTc2OTQgMDAwMDAgbg0KMDAwMDE3Nzg0
OSAwMDAwMCBuDQp0cmFpbGVyDQo8PA0KL1NpemUgNDUNCi9Sb290IDEgMCBSDQovSURbDQooKSgp
XQ0KPj4NCnN0YXJ0eHJlZg0KMTk3MDYwDQolJUVPRg0KAA==
Thanks in advance MC |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,noviembre 2014 - 00:20 |
Hi,
1. The files are small. 2. Because, the original file as the declaration on top <?xml version="1.0" encoding="utf-8" ?> And because the http response already has the declaration, I must include only the "data" from the file. 3. I've tried some options, but my development machine hangs on each try... 10 minutes to reboot an load all development tools again... and again... and again...
I've installed SOAP Gui and finally I can call the webservice both locally and remotly. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,noviembre 2014 - 10:25 |
Hi,
Well I tried this, since it`s only a 5 min test.
Webservice code: PROCEDURE GetXMLFile() s is string HExportXML(CallDate,DWDIR+"\ est.xml") //Export the calldate table to XML s = fLoadText(DWDIR+"\ est.xml") RESULT s //Send to client Client Code on a button: s is string = GetXMLFile() Info(s) fSaveText(fExeDir()+"\ est.xml",s) ShellExecute(fExeDir()+"\ est.xml") If you like you can try it yourself, the description file is at: <a class="ExternalLink" rel="nofollow" target="_blank" href="http://46.165.204.155/WS18_WEB/awws/WS18.awws?wsdl">http://46.165.204.155/WS18_WEB/awws/WS18.awws…</a>
Image from the info(s) statement: |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2014 - 14:23 |
Tor-Bjarne,
Didn't tested yet, but the problem may be in the encoding. When not mentioned "string" is "unicode string" and the OUT.XML file is in UTF-8 (thank you Fabrice...).
As I said, not testes yet, but I will... |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|