Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning XML response before method
Message
De
09/12/2016 17:48:40
 
 
À
09/12/2016 15:16:55
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01644778
Message ID:
01644782
Vues:
30
In the main code, in order to bypass the default Xml output that would be served by the Web Service method, I have added this code:
Dim loHttpResponse As System.Web.HttpResponse = Nothing
loHttpResponse = System.Web.HttpContext.Current.Response
loHttpResponse.Clear()
loHttpResponse.ClearContent()
loHttpResponse.ClearHeaders()
loHttpResponse.ContentType = "text/xml"
loHttpResponse.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8")
loHttpResponse.Write(cXml)
loHttpResponse.End()
This takes over the response and sends some data.

But, the client says "Response is not well-formed XML."

If I replace the cXml line with:
loHttpResponse.Write("test")
...I can see the client reacting and saying that this has to be text/xml content.

So, somethings get sent. But, something is not properly received on the other end.

Anyone would know what is missing?
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