Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #79 (new enhancement)

Opened 4 years ago

Last modified 6 months ago

To see the raw soap xml messages in client side (IE)

Reported by: wesley8080@msn.com Assigned to: nahi
Priority: normal Milestone: undefined
Component: soap4r Version: 1.5
Keywords: soap xml Cc:

Description

I was wonder about something though:

Is there a way to see the raw soap xml messages (with the envelope, body, etc) which the are sent by the SOAP::RPC::StandaloneServer? and received by the client?

thanks a lot!

Change History

03/09/05 14:09:36 changed by nahi

  • milestone changed from ruby-1.8.2 to 1.5.4.

You are using SOAP::RPC::Driver as a client, not an IE, right? Then you can set an IO to see a wiredump.

calc = SOAP::RPC::Driver.new(server, 'http://tempuri.org/calcService')
calc.wiredump_dev = STDERR
...

For example;

= Request

! CONNECTION ESTABLISHED
POST / HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=utf-8
User-Agent: SOAP4R/1.5.4 (/92, ruby 1.9.0 (2005-01-06) [i386-cygwin])
Date: Wed Mar 09 14:08:27 GMT+9:00 2005
Content-Length: 473
Host: localhost:7000

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <n1:add xmlns:n1="http://tempuri.org/calcService"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <lhs xsi:type="xsd:int">1</lhs>
      <rhs xsi:type="xsd:int">2</rhs>
    </n1:add>
  </env:Body>
</env:Envelope>

= Response

HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Wed, 09 Mar 2005 05:08:28 GMT
Content-Type: text/xml; charset="utf-8"
Server: WEBrick/1.3.1 (Ruby/1.9.0/2005-01-06)
Content-Length: 457

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <n1:addResponse xmlns:n1="http://tempuri.org/calcService"
        env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <return xsi:type="xsd:int">3</return>
    </n1:addResponse>
  </env:Body>
</env:Envelope>

03/10/05 10:43:37 changed by nahi

And, you can see wiredumps at server side when you wake your server with ruby + '-d' option.

03/10/05 16:41:02 changed by wesley8080@msn.com

What I want is to display XML soap message in IE.

I should open a IE window, type a url (e.g. http://192.168.1.2/cgi-bin/testSOAP.rb)

Then get soap message like following:

<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<env:Body>

<n1:addResponse xmlns:n1="http://tempuri.org/calcService"

env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<return xsi:type="xsd:int">3</return>

</n1:addResponse>

</env:Body>

</env:Envelope>

Thanks a lot.

03/10/05 17:37:16 changed by wesley8080@msn.com

What should be "server" in following line:

calc = SOAP::RPC::Driver.new(server, 'http://tempuri.org/calcService') calc.wiredump_dev = STDERR

server=? if I open URL: http://192.168.1.1/cgi-bin/testSOAP.cgi server=? if I open URL: http://192.168.1.1/cgi-bin/test/ server=? if I open URL: http://192.168.1.1:2000/

03/10/05 17:38:27 changed by wesley8080@msn.com

What should be "server" in following line:

calc = SOAP::RPC::Driver.new(server, 'http://tempuri.org/calcService') calc.wiredump_dev = STDERR

server=? if I open URL: http://192.168.1.1/cgi-bin/testSOAP.cgi server=? if I open URL: http://192.168.1.1/cgi-bin/test/ server=? if I open URL: http://192.168.1.1:2000/

04/14/05 18:02:52 changed by nahi

  • priority changed from highest to high.

Sorry for late reply.

I still don't understand your point. How do you pass parameters to add method, so that the add method responds addResponse as an int?

04/16/05 23:46:20 changed by nahi

  • priority changed from high to normal.
  • milestone changed from 1.5.4 to undefined.

07/05/07 00:19:50 changed by nahi

  • type changed from defect to enhancement.

06/03/08 23:06:32 changed by user

I think you should close down this ticket. It seems like the reporter has a difficulty with using CGI scripts in general, not with soap4r specifically. My guess is that he didn't set the wiredump device to STDOUT instead of STDERR, and didn't send appropriate HTTP headers (text/plain), too.