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 Content-Length: 407 Content-Type: text/xml Connection: Close SoapAction:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="Error; xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance&quot; xmlns:xsd="http://www.w3.org/1999/XMLSchema&quot; SOAP-ENV:encodingStyle="Error; <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 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 Content-Length: 351 Content-Type: text/xml Connection: Close SoapAction:

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:env="Error; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;&lt;env:Body&gt;&lt;n1:ping xmlns:n1="urn:ActionWebService" env:encodingStyle="Error xsi:type="xsd:string">Test</id></n1:ping></env:Body></env:Envelope>HTTP/1.1 500 Internal Server Error Cache-Control: no-cache Connection: close 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

<definitions name="ws" xmlns:typens="urn:ActionWebService" xmlns:wsdl="Error; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soap="Error; targetNamespace="urn:ActionWebService" xmlns:soapenc="Error; xmlns="Error;   <types>     <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema&quot; 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>   </types>   <message name="ping-ping">     <part name="id" type="xsd:string"/>   </message>   <message name="ping-pingResponse">     <part name="return" type="typens:SessionData"/>   </message>   <message name="ping-pong">

    <part name="sessionid" type="xsd:string"/>     <part name="sessionsecret" type="soapenc:base64"/>   </message>   <message name="ping-pongResponse">     <part name="return" type="xsd:string"/>   </message>   <portType name="wsPingPort">     <operation name="ping">       <input message="typens:ping-ping"/>

      <output message="typens:ping-pingResponse"/>     </operation>     <operation name="pong">       <input message="typens:ping-pong"/>       <output message="typens:ping-pongResponse"/>     </operation>   </portType>   <binding name="wsPingBinding" type="typens:wsPingPort">     <soap:binding transport="Error; style="rpc"/>

    <operation name="ping">       <soap:operation soapAction="/ws/ping/ping"/>       <input>         <soap:body encodingStyle="Error; namespace="urn:ActionWebService" use="encoded"/>       </input>       <output>         <soap:body encodingStyle="Error; namespace="urn:ActionWebService" use="encoded"/>       </output>     </operation>

    <operation name="pong">       <soap:operation soapAction="/ws/ping/pong"/>       <input>         <soap:body encodingStyle="Error; namespace="urn:ActionWebService" use="encoded"/>       </input>       <output>         <soap:body encodingStyle="Error; namespace="urn:ActionWebService" use="encoded"/>       </output>     </operation>

  </binding>   <service name="wsService">     <port name="wsPingPort" binding="typens:wsPingBinding">       <soap:address location="http://localhost:3000/ws/ping&quot;/&gt;     </port>   </service> </definitions>

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

[...]

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: