Consuming a SOAP Rails Webservice doesn't work in Delphi 2009 but was Ok in Delphi 2006 -


I have a soap webservice written in RubyOnRails and clients written in Delphi. The client and server were successful by using Delphi 2006, but compiled with the new Delphi 2009, the rail server "crashed".

This is a request (generated by THTTPRIO):

   gtc: string '& gt; 1VK3K-7N45K-4V76W-JCS2F-NC125 & lt; / COUPON_CODE & gt; & Lt; / NS1: IsValidCouponCode & gt; & Lt; / SOAP-ENV: Body & gt; & Lt; / SOAP-ENV: envelope & gt; Internal Protocol Error: Bad encoding name "UTF-8" backrace: / usr / lib /  

Ruby / 1.8 / rexml / encoding. RB: 31: These encoding = '/usr/lib/ruby/1.8/rexml/source.rb:54:in` encoding =' /usr/lib/ruby/1.8/xsd/ Xmlparser / rexmlparser.rb: 24: ` `DOPAS / URL / LIB / RUB / 1.8 / SOAP / Parser. RB: 92: IN 'Pars' / URL / Lib / RBI / 1.8 / SAP / Processor. In RB 39: In 'Unmarshal' [...]

So it is clear that some Delphi is different in 2009 with "UTF-8" encoding, but I do not know That's how to change it. /p>

I found a solution After comparing originally requested requests (Delphi 2006 only a few Delphi 2006: Content-Type: Text / xml
Delphi 2009: Content-Type: Text / Text / xml / Xml; Charset = "utf-8"

Solution:

  RIO.HTTPWebNode.UseUTF8InHeader: = Incorrect;  

The default value for this property was changed from Delphi 2006 to Delphi 200 9

Conclusion: Ruby (on Rail) looks like a bug. It works with both Delphi-versions, in which there is a local installation of a webservice on the Windows machine. There was only a production machine problem running Linux.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -