Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing long string error...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00758813
Message ID:
00762289
Vues:
13
>Thanks Michel. BTW do you know where I may find an article with samples on how to send soap messages with atachments ?

I'm not sure if there is a simpler way to do it but using SOAP low level, you can do it using this approach:
loConnector=CreateObject('MSSOAP.HttpConnector30')
loComposer=CreateObject('MSSOAP.DimeComposer30')
loSerializer=CreateObject('MSSOAP.SoapSerializer30')
loFileAttachment=CreateObject('MSSOAP.FileAttachment30')

loFileAttachment.FileName='d:\MyPicture.jpg'
loSerializer.InitWithComposer(loConnector.InputStream,loComposer)

loSerializer.StartEnvelope
loSerializer.StartBody

loSerializer.StartElement('Picture')
loSerializer.AddAttachmentAndReference(loFileAttachment)
loSerializer.EndElement

loSerializer.EndBody
loSerializer.EndEnvelope

loSerializer.Finished
This code is only a scenario on how you can accomplish it. It's not test and you would need to adjust things such as defining the loConnector properties and such.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform