# Changing SOAP RPC/Encoded to Document/Literal format

**URL:** <https://www.ruby-forum.com/t/changing-soap-rpc-encoded-to-document-literal-format/119584>\
**Category:** Ruby\
**Created:** [November 8, 2007, 6:40am UTC](https://www.ruby-forum.com/t/changing-soap-rpc-encoded-to-document-literal-format/119584 "2007-11-08T06:40:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![htn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/7ab992/32.png) [@htn](https://www.ruby-forum.com/u/htn)\
**Post date:** [November 8, 2007, 6:40am UTC](https://www.ruby-forum.com/t/changing-soap-rpc-encoded-to-document-literal-format/119584/1 "2007-11-08T06:40:22Z")

</div>

Dear All,

I am very new to RoR here and would like to know how to switch our  
application over from the default RPC/Encoded to Document/Literal SOAP  
format.

The example in soap4r-1.5.8 …\sample\howto\documentliteral appears to  
use the static “echo.wsdl” file. This file appears to have the settings  
for style=“document” and use=“literal”. I guess this is where to  
specify RPC/Encoded and Document/Literal format. The section of the  
code I am referring to is included below.

However, in our application we use dynamic wsdl and can not set these  
settings. Would anyone know how to make RoR/SOAP4R to generate the  
services in Document/Literal format? Any help is welcome and  
appreciated.

Thanks  
HTN

From echo.wsdl:  
“…  
  
\<soap:binding  
transport=“[http://schemas.xmlsoap.org/soap/http](http://schemas.xmlsoap.org/soap/http)”  
style=“document” /\>  
  
\<soap:operation soapAction=“urn:com.example:echo” style=“document”  
/\>  
\<soap:body use=“literal” /\>  
\<soap:body use=“literal” /\>  
  
  
…”
