Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
SOAP4R?
Wilmar Sulaiman
12/23/2004 8:49:00 AM
Dear all,
I tried to send "Hello World" msg via SOAP4R , the reason why I used
SOAP4R is to get the XML as an output. I found that the XML is not
generated the correct output. I wonder where I did wrong in my program?
Sorry I am really newcomer to Ruby any references should be good,
because it's really hard learning ruby since there is not much
documentation available on the net.
cheers,
Wilmar
--- TestSoap.cgi-
require 'dbi'
require 'soap/cgistub'
class TestSOAP < SOAP::CGIStub
def on_init
add_method(self, 'retrieve_row')
retrieve_row
end
def retrieve_row
print 'Content-type: text/html\n\n'
puts 'Hello World'
end
end
status = TestSOAP.new('TestSOAP', nil).start
-- XML output pointing to this cgi -
<env:Envelope>
-
<env:Body>
-
<env:Fault
env:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/...
<faultcode xsi:type="xsd:string">Server</faultcode>
<faultstring xsi:type="xsd:string">Method 'GET' not allowed.</faultstring>
<faultactor xsi:type="xsd:string">TestSOAP</faultactor>
-
<detail xsi:type="n2:SOAPException">
<excn_type_name
xsi:type="xsd:string">SOAP..RPC..CGIStub..CGIError</excn_type_name>
-
<cause xsi:type="n3:SOAP..RPC..CGIStub..CGIError">
<message xsi:type="xsd:string">Method 'GET' not allowed.</message>
-
<backtrace xsi:type="n1:Array" n1:arrayType="xsd:anyType[5]">
-
<item xsi:type="xsd:string">
/usr/local/lib/ruby/1.8/soap/rpc/cgistub.rb:74:in `validate'
</item>
-
<item xsi:type="xsd:string">
/usr/local/lib/ruby/1.8/soap/rpc/cgistub.rb:49:in `init'
</item>
-
<item xsi:type="xsd:string">
/usr/local/lib/ruby/1.8/soap/rpc/cgistub.rb:168:in `run'
</item>
<item xsi:type="xsd:string">/usr/local/lib/ruby/1.8/logger.rb:684:in
`start'</item>
<item xsi:type="xsd:string">/var/www/cgi-bin/TestSoap.cgi:20</item>
</backtrace>
</cause>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>
~
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
SOAP4R?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password