SOAP - missing method name

Hello,

I’m trying to use my Rails SOAP webservice.
The scaffolded thing works, but the real SOAP does not.
Rails is missing the method name.

My client uses some other xml formatting. So I’ve also tried the xml
request output from the scaffold. But no change.

Do you know what’s wrong?

Rails version is 1.1.6

Below is

  1. SOAP client xml try
  2. Rails xml try
  3. WSDL

11111111111111111111111111111111111111111111111

POST /ws/ping HTTP/1.1
Host: localhost
Date: Thu, 19 Oct 2006 00:52:31 GMT
Content-Length: 407
Content-Type: text/xml
Connection: Close
SoapAction:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=“http://www.w3.org/1999/XMLSchema-instance
xmlns:xsd=“http://www.w3.org/1999/XMLSchema
SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
SOAP-ENV:Header/ SOAP-ENV:Body <m:ping
xmlns:m=“urn:ActionWebService”> <m:id
xsi:type=“xsd:string”>Test</m:id></m:ping>
</SOAP-ENV:Body></SOAP-ENV:Envelope>HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Connection: close
Date: Wed, 18 Oct 2006 22:52:31 GMT
Content-Type: text/html; charset=UTF-8
Server: WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24)
Content-Length: 3177
Set-Cookie: _session_id=86e6a3bc82cd71a169f0e5860783fae2; path=/

Internal protocol error: No valid method call - missing method name!
Backtrace:
/usr/lib/ruby/1.8/xmlrpc/parser.rb:476:in parseMethodCall' /usr/lib/ruby/1.8/xmlrpc/marshal.rb:63:in load_call’
/usr/lib/ruby/1.8/xmlrpc/marshal.rb:32:in load_call' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/xmlrpc_protocol.rb:36:in decode_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/xmlrpc_protocol.rb:32:in
decode_action_pack_request' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/discovery.rb:20:in discover_web_service_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/discovery.rb:18:in
discover_web_service_request' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:44:in dispatch_web_service_request’
(eval):1:in ping' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in perform_action_without_filters’

[…]

1111111111111111111111111111111111111111

Here with the Rails xml format:

2222222222222222222222222222222222222222

POST /ws/ping HTTP/1.1
Host: localhost
Date: Do, 19 Okt 2006 01:11:46 GMT
Content-Length: 351
Content-Type: text/xml
Connection: Close
SoapAction:

<env:Envelope xmlns:xsd=“XML Schema
xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>env:Body<n1:ping
xmlns:n1=“urn:ActionWebService”
env:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>Test</n1:ping></env:Body></env:Envelope>HTTP/1.1
500 Internal Server Error
Cache-Control: no-cache
Connection: close
Date: Wed, 18 Oct 2006 23:11:46 GMT
Content-Type: text/html; charset=UTF-8
Server: WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24)
Content-Length: 3177
Set-Cookie: _session_id=19c55348725b689eab5253a0fc9f7dc1; path=/

Internal protocol error: No valid method call - missing method name!
Backtrace:
/usr/lib/ruby/1.8/xmlrpc/parser.rb:476:in parseMethodCall' /usr/lib/ruby/1.8/xmlrpc/marshal.rb:63:in load_call’
/usr/lib/ruby/1.8/xmlrpc/marshal.rb:32:in load_call' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/xmlrpc_protocol.rb:36:in decode_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/xmlrpc_protocol.rb:32:in
decode_action_pack_request' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/discovery.rb:20:in discover_web_service_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/discovery.rb:18:in
discover_web_service_request' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:44:in dispatch_web_service_request’
(eval):1:in ping' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in perform_action_without_filters’

222222222222222222222222222222222222

The WSDL:

333333333333333333333333333333333333



<xsd:schema xmlns=“XML Schema
targetNamespace=“urn:ActionWebService”>
<xsd:complexType name=“SessionData”>
xsd:all
<xsd:element name=“sessionid” type=“xsd:string”/>
<xsd:element name=“sessionkey” type=“soapenc:base64”/>
</xsd:all>
</xsd:complexType>

</xsd:schema>
<part name="sessionid" type="xsd:string"/>
<part name="sessionsecret" type="soapenc:base64"/>
  <output message="typens:ping-pingResponse"/>
</operation>
<operation name="pong">
  <input message="typens:ping-pong"/>
  <output message="typens:ping-pongResponse"/>
</operation>
<operation name="ping">
  <soap:operation soapAction="/ws/ping/ping"/>
  <input>
    <soap:body

encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/
namespace=“urn:ActionWebService” use=“encoded”/>


<soap:body
encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/
namespace=“urn:ActionWebService” use=“encoded”/>

<operation name="pong">
  <soap:operation soapAction="/ws/ping/pong"/>
  <input>
    <soap:body

encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/
namespace=“urn:ActionWebService” use=“encoded”/>


<soap:body
encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/
namespace=“urn:ActionWebService” use=“encoded”/>

Markus K. wrote on 19.10.2006 12:09:

Rails version is 1.1.6
[…]
POST /ws/ping HTTP/1.1
Host: localhost
Date: Thu, 19 Oct 2006 00:52:31 GMT
Content-Length: 407
Content-Type: text/xml
Connection: Close
SoapAction:

Ok, now I know the purpose of SoapAction and it works… :wink: