Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a file attachment with SOAP
Message
De
28/12/2003 12:00:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
Sending a file attachment with SOAP
Divers
Thread ID:
00862351
Message ID:
00862351
Vues:
103
I am trying to send a file attachment with SOAP and I am having some difficulties. I am looking to find what I need to fix in this code to make it work:
LOCAL loSerializer,loConnector,loReader,loAttachment,loComposer

loSerializer=CREATEOBJECT('MSSOAP.SoapSerializer30')
loConnector=CREATEOBJECT('MSSOAP.HTTPConnector')
loReader=CREATEOBJECT('MSSOAP.SoapReader30')
loAttachment=CreateObject('MSSOAP.FileAttachment30')
loComposer=CREATEOBJECT('MSSOAP.DimeComposer30')

loConnector.Property('EndPointURL')='http://www...'
loConnector.Property('SoapAction')='http://tempuri.org/...'
loConnector.BeginMessage
loSerializer.InitWithComposer(loConnector.InputStream,loComposer)
loSerializer.startEnvelope

loSerializer.startBody

loSerializer.endBody

loSerializer.endEnvelope

loAttachment.FileName='d:\Visual FoxPro Projects\MyProjects\MyFile.ini'
loSerializer.AddAttachment(loAttachment)
loSerializer.Finished

loConnector.EndMessage

loReader.Load(loConnector.OutputStream)
I am receiving this error on the line loReader.Load():

OLE IDispatch exception code 0 from Server: Server:XML Parser failed at linenumber 1, lineposition 517, reason is: Illegal xml character.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform