# See raw xml in soap4r

**URL:** <https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981>\
**Category:** Ruby\
**Created:** [July 20, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981 "2007-07-20T21:27:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nappin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f475e1/32.png) [@nappin](https://www.ruby-forum.com/u/nappin)\
**Post date:** [July 20, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981/1 "2007-07-20T21:27:17Z")

</div>

Hi,

Is there any way with soap4r to see the raw xml of the response without  
turning on the debug mode?

For me at least, my soap scripts work correctly 99% of the time, however  
occasionally they raise exceptions and it would be handy on these cases  
to see the raw xml that is causing the problem. Is there any method I  
can call on the main soap response object to dump the raw xml its using?  
It would be handy to print this out along with the exception in some  
cases.

Thanks,  
Ray

---

<div class="post-metadata">

**Author:** ![nappin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f475e1/32.png) [@nappin](https://www.ruby-forum.com/u/nappin)\
**Post date:** [July 22, 2007, 8:08am UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981/2 "2007-07-22T08:08:53Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi,

Raymond O’Connor wrote:

> Is there any way with soap4r to see the raw xml of the response without  
> turning on the debug mode?

aDriver.wiredump\_dev = STDERR

dumps request/response wiredump to STDERR.

aDriver.wiredump\_dev = str = ‘’  
[…]  
aLogger.info(str)

dumps it to a logfile.

aDriver.wiredump\_file\_base = “/home/nahi/tmp/foo”

writes request/response wiredumps as a specified file.

// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRqL0Fh9L2jg5EEGlAQKt5wgAjRyPaGkqb8OET7MPmu7DYGrG/3nAL8tO  
1p3a7QEhbGIHkTV6hoEnCmFYPIX+u40RhdYxK/qhgLlfbhJXM3ylZyA6GfHn9GWx  
eL/Y7i8UhKs6fdcS9eTt0cin8gUUtQVVOt0yHsjEdQC7tI7ljFnRbMQ/wP/1e9Ll  
CLcEfBTxYQIl7JlDzvojPQLRVgC+fTvSyth4bPwmt6itKULOXHsThaS4Hq4g9xij  
wpmXgFdYJGGG8pBcoHOfsaA21y4JIaMcYxhPC+udDWxYwc6QoNITivuTFmBoHISn  
ynpDSxJtvS9Kh7JBm7V19AckJLa+CnGjVNx4NWoEKe7FPN1CKUeLwg==  
=Mw/Q  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![nappin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f475e1/32.png) [@nappin](https://www.ruby-forum.com/u/nappin)\
**Post date:** [July 23, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981/3 "2007-07-23T22:43:45Z")

</div>

Hi  
Thanks for the response, is there a way to turn it on after the request?  
I don’t want to log every request/response as this program makes tens of  
thousands of requests daily. Is there a way just to see the  
request/response if an error occurred?

thanks,  
Ray

NAKAMURA, Hiroshi wrote:

> -----BEGIN PGP SIGNED MESSAGE-----  
> Hash: SHA1
> 
> Hi,
> 
> Raymond O’Connor wrote:
> 
> > Is there any way with soap4r to see the raw xml of the response without  
> > turning on the debug mode?
> 
> aDriver.wiredump\_dev = STDERR
> 
> dumps request/response wiredump to STDERR.
> 
> aDriver.wiredump\_dev = str = ‘’  
> […]  
> aLogger.info(str)
> 
> dumps it to a logfile.
> 
> aDriver.wiredump\_file\_base = “/home/nahi/tmp/foo”
> 
> writes request/response wiredumps as a specified file.
> 
> // NaHi
> 
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1.4.2.1 (Cygwin)
> 
> iQEVAwUBRqL0Fh9L2jg5EEGlAQKt5wgAjRyPaGkqb8OET7MPmu7DYGrG/3nAL8tO  
> 1p3a7QEhbGIHkTV6hoEnCmFYPIX+u40RhdYxK/qhgLlfbhJXM3ylZyA6GfHn9GWx  
> eL/Y7i8UhKs6fdcS9eTt0cin8gUUtQVVOt0yHsjEdQC7tI7ljFnRbMQ/wP/1e9Ll  
> CLcEfBTxYQIl7JlDzvojPQLRVgC+fTvSyth4bPwmt6itKULOXHsThaS4Hq4g9xij  
> wpmXgFdYJGGG8pBcoHOfsaA21y4JIaMcYxhPC+udDWxYwc6QoNITivuTFmBoHISn  
> ynpDSxJtvS9Kh7JBm7V19AckJLa+CnGjVNx4NWoEKe7FPN1CKUeLwg==  
> =Mw/Q  
> -----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![nappin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f475e1/32.png) [@nappin](https://www.ruby-forum.com/u/nappin)\
**Post date:** [July 26, 2007, 11:43am UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981/4 "2007-07-26T11:43:22Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi,

Raymond O’Connor wrote:

> Thanks for the response, is there a way to turn it on after the request?  
> I don’t want to log every request/response as this program makes tens of  
> thousands of requests daily. Is there a way just to see the  
> request/response if an error occurred?

No, there isn’t. If an error occurred, the response XML is a SOAPFault  
almost always. It should not be what you want, right?

// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRqhsTx9L2jg5EEGlAQLM6gf/eBncYI8Gd+bQtioCGk++h9+AV6Xc6b6m  
RHNXzxch2O3gLS7kSLcHK5fgwQG1PFT2whSFK9bg7uZEAS+M600RCja57Z5otBkt  
8ng8dc40B8JyNAbOfrvJKBFJrh9PRpEC8qOXN+XI3v/uwYOhN/oRBh7AXVlFV53w  
stThML5OOYAAa2GM9HmVzPfU4JQY+EOhiygjzyVyE07bSBrjIXDGeQBa4ybpBHAH  
asMN1hhmajhSUvtQXDjmnq/64WEJr3c0qSIlXWPZxEVzqve/8hFdWw7iW5GjmP9/  
oo4Dq1L0BeeVcb0e0WcjSW2u9zoTsPIDjByeFnUEJ80O/m7yLsX/ng==  
=1TCW  
-----END PGP SIGNATURE-----
