You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use your Savon Gem 0.9.2 to interact with a Web Service. The Web Service expects an envelope with an XML header stating a UTF-16 enconding as follows:
I've been debugging the Gem Code in Request.rb and XML.rb but I cannot find the line that sets the XML header info to UTF-8.
There is a line in Request.rb that has hardcoded values for UTF-8, however, even when I change those to UTF-16 the request still comes out as UTF-8:
# Content-Types by SOAP version.ContentType={1=>"text/xml;charset=UTF-8",2=>"application/soap+xml;charset=UTF-8"}
This might be the HTTP header instead of the XML header.
You've also recommended calling "instruct!" with arguments to change the contents of the XML Header Line, however, that did not work correctly for me when I tried it. The line had formatting issues.
Further investigation on my part goes down as deep as the "Builder" gem since it seems to be the place where this Header line is being generated.
So, I'm hoping you can provide a fix for this since it could affect other gems.
Thanks for your help,
Hector Echegoyen
The text was updated successfully, but these errors were encountered:
merged pull request 211 which is supposed to fix your problem and released savon v0.9.7. now that i think about it, i'm not sure if you want to make the change to the xml instruct tag and construct the complete xml (including the envelope) manually.
I'm trying to use your Savon Gem 0.9.2 to interact with a Web Service. The Web Service expects an envelope with an XML header stating a UTF-16 enconding as follows:
The following link recommends setting the ["Content-Type"] header to a value specifying UTF-16 but the request envelope always comes out as UTF-8:
http://stackoverflow.com/questions/5734961/soap-custom-xml-in-ruby-with-savon
I've been debugging the Gem Code in Request.rb and XML.rb but I cannot find the line that sets the XML header info to UTF-8.
There is a line in Request.rb that has hardcoded values for UTF-8, however, even when I change those to UTF-16 the request still comes out as UTF-8:
This might be the HTTP header instead of the XML header.
You've also recommended calling "instruct!" with arguments to change the contents of the XML Header Line, however, that did not work correctly for me when I tried it. The line had formatting issues.
Further investigation on my part goes down as deep as the "Builder" gem since it seems to be the place where this Header line is being generated.
So, I'm hoping you can provide a fix for this since it could affect other gems.
Thanks for your help,
Hector Echegoyen
The text was updated successfully, but these errors were encountered: