Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a file attachment with SOAP
Message
From
28/12/2003 12:00:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Sending a file attachment with SOAP
Miscellaneous
Thread ID:
00862351
Message ID:
00862351
Views:
105
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
Next
Reply
Map
View

Click here to load this message in the networking platform