Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send binary file to .NET web service
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01576023
Message ID:
01576090
Vues:
54
Hi Steve,

Yup, the WSDL generator doesn't support any support for SOAP related file transfer protocols, because they were officially never part of the SOAP 1.x spec. The WSDL generator just works with plain SOAP 1.x services not any of the adjunct standards or WS*. The SOAP Toolkit sort of supports DIME if I recall but it's a bear to use from VFP.

That said you have a few other options for binary data. In your Web Service you can create service methods that accept byte[] data and the proxy generator should handle that. The data will end up in the XML envelope as hex encoded data which works fine for reasonably sized files. To pass that you can just use FileToStr() or any other way to grab the binary data in VFP and then CAST() to BLOB.

If files are larger though, encoding overhead can be a problem in which case I'd suggest just implementing a separate REST based service that you can do an HTTP file upload to. You can use the wwHttp class to do a HTTP file upload and handle that on the backend (if it's .NET any handler endpoint will do like HttpHandler, ASPX or .cshtml page, or MVC controller method will work).

If you have further questions you can also post them on the West Wind Message Board - I see those messages more frequently than over here.

Hope this helps,

+++ Rick ---


>Thanks, Craig. I looked at that last night, but don't see that it can handle a file transfer. I guess I would have to know how to setup the asp.net side in such a way that the wsdlgenerator might translate to an appropriate type for VFP...?
>
>
>>You might want to try http://www.west-wind.com/wsdlgenerator/
>>
>>
>>>Here is what I have so far...obviously, the system characters in a PDF are causing this to fail...
>>>
>>>oSync = CREATEOBJECT("MSSoap.SoapClient30")
>>>oSync.MSSoapInit("http://localhost:53088/scale_sync.asmx?WSDL")
>>>...
>>>l_result = oSync.PDFxfer(cUserName,cPwd,"Send",ALLTRIM(pdf_local.cname),FREAD(nPDFHandle,nSize))
>>>
>>>The final parameter is the content of the pdf and the only parameter I need to troubleshoot.
>>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform