Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning XML response before method
Message
From
09/12/2016 17:48:40
 
 
To
09/12/2016 15:16:55
General information
Forum:
ASP.NET
Category:
Web Services
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01644778
Message ID:
01644782
Views:
29
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform