Error: POST method not supported by this URL

Showing 1-2 of 2 messages
Error: POST method not supported by this URL Yann Bertaud 2/23/12 3:11 PM
Hello,

I am a newbie to savon and SOAP.

I am trying to create a request to netsuite wsdl service. When I run it, I get the following error:
D, [2012-02-23T15:05:08.714815 #2284] DEBUG -- : HTTPI executes HTTP POST using the httpclient adapter
D, [2012-02-23T15:05:19.670815 #2284] DEBUG -- : SOAP response (status 405):
c:/Ruby187/lib/ruby/gems/1.8/gems/savon-0.9.9/lib/savon/soap/response.rb:107:in `raise_errors': HTTP error (405): HTTP method POST is not supported by this URL (Savon::HTTP::Error)

It seems that I need to use a get instead of post, but I cannot figure out how to set up the request to be a get. Any help would be appreciated.

below is my code
client = Savon::Client.new do
  wsdl.endpoint = "https://webservices.netsuite.com/wsdl/v2011_2_0"
  wsdl.namespace = "urn:messages_2011_2.platform.webservices.netsuite.com"
  wsdl.namespace = "urn:core_2011_2.platform.webservices.netsuite.com"
end

response = client.request(:body ) do
   soap.element_form_default = :qualified
  soap.body = {"urn:login" =>
                {
                  "urn:passport" =>
                  {
                    "urnl:email" => "f...@bar.com",
                    "urnl:password" => "foobar123",
                    "urnl:account" => "12345"
                  }
                }
              }
end

the soap envelope from SoapUI is below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:messages_2011_2.platform.webservices.netsuite.com" xmlns:urn1="urn:core_2011_2.platform.webservices.netsuite.com">
   <soapenv:Header>
      <urn:partnerInfo>      </urn:partnerInfo>
      <urn:applicationInfo>       </urn:applicationInfo>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:passport>
            <urn1:email>f...@bar.com</urn1:email>
            <urn1:password>foobar123</urn1:password>
            <urn1:account>12345</urn1:account>
         </urn:passport>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>


Re: Error: POST method not supported by this URL rubiii 2/24/12 4:13 AM