Data Access Worldwide Knowledge Base
Article ID 2023 Article Title INFO: psContentTypeSent property was changed in VDF10.0 Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2023 KBase Category VDF10 Date Created 07/14/2004 Last Edit Date 07/14/2004
Article Text
PROBLEM:
I compiled a Visual DataFlex 9.1 application in Visual DataFlex 10.0 without errors and the application in VDF10 is not running correctly. The server is still a 9.1 server
In other words:
Vdf9.1-Client -----> vdf9.1-server works
Vdf10-Client -----> vdf9.1-server fails
The failure is on the Server WO -- it cannot read the data posted by the vdf 9 client.
This is what I have:
Client VDF10:
get HttpPostXmlString shost srequest sXML to sreturnXML
or
get httpPostFromAddressXml shost srequest aXML to areturnXML
Server VDF9.1:
function myfunction address pinXML string smyparameters returns address
boolean bok
handle hoXML
get Create U_cXMLDomDocument to hoXML
get LoadXmlfromaddress of hoXML pInXML to bok // With VDF9.1 it always returns 1; with VDF10 it returns 0. It is not able to loadxml...
pInXML looks to have a good value with VDF9.1 but with VDF10.0 its value looks like $01234567.
What has changed in VDF10.0 that could affect the application?
SOLUTION:
The default value of the property psContentTypeSent was changed in VDF10. In VDF9 it is:
psContentTypeSent "text/xml" // default content type for posted data
In 10 it is:
psContentTypeSent "text/xml; charset=utf-8" // default content type for posted data
If your server is looking for the an exact match on contentType you may get this error. You can easily test this by changing the property in your cXmlHttpTransfer object to:
Set psContentType to "text/xml"
You could also change the server so that it handles both cases.
The psContentTypeSent property contains the content type that is used for posted data. The default tells the server that the posted data is text based XML. You will normally not need to change this.
Contributed By:
John Tuohy
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.