Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:32:13+00:00 2026-06-18T03:32:13+00:00

I am trying to call the catalog_product_link.list API method using Savon . However, I

  • 0

I am trying to call the catalog_product_link.list API method using Savon. However, I keep receiving the error Error cannot find parameter.

Here is what I am using, though I have tried several variations of the call and still cannot get it to go through correctly:

client = Savon.client(wsdl: 'http://localhost/index.php/api/soap/?wsdl')
response = client.call(:login){message(username: 'user', apiKey: 'key')}
session = response.body[:login_response][:login_return]

#These all do not work
client.call(:call){message(:session => session, :method => 'catalog_product_link.list', :type => 'up_sell', :productId => '166')}
client.call(:call){message(:session => session, :method => 'catalog_product_link.list', :type => 'up_sell', :product => '166')}
client.call(:call){message(:sessionId => session, :resourcePath => 'catalog_product_link.list', :args => {:type => 'up_sell', :product => '166'})}
client.call(:call){message(:sessionId => session, :resourcePath => 'catalog_product_link.list', :args => {:type => 'up_sell', :productId => '166'})}
client.call(:call){message(:sessionId => session, :resourcePath => 'catalog_product_link.list', :arguments => {:type => 'up_sell', :product => '166'})}

Is there a different way to format to get this to work?

UPDATE: If I try removing the type parameter, it gives the error Given invalid link type, so it appears it does not like something about multiple parameters.

response = client.call(:call){message(:session => session, :method => 'catalog_product_link.list', :product => '166')}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:32:15+00:00Added an answer on June 18, 2026 at 3:32 am

    I was able to get this to work using Builder:

    class ServiceRequest
      def initialize(session, type, product)
        @session = session
        @type = type
        @product = product
      end
    
      def to_s
        builder = Builder::XmlMarkup.new()
        builder.instruct!(:xml, encoding: "UTF-8")
    
        builder.tag!(
          "env:Envelope",
          "xmlns:env" => "http://schemas.xmlsoap.org/soap/envelope/",
          "xmlns:ns1" => "urn:Magento",
          "xmlns:ns2" => "http://xml.apache.org/xml-soap",
          "xmlns:xsd" => "http://www.w3.org/2001/XMLSchema", 
          "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance"
        ) do |envelope|
          envelope.tag!("env:Body") do |body|
            body.tag!("ns1:call") do |call|
              builder.sessionId(@session, "xsi:type" => "xsd:string")
              builder.resourcePath("catalog_product_link.list", "xsi:type" => "xsd:string")
              builder.args("xsi:type" => "ns2:Map") do |args|
                args.item do |item|
                  item.key("type", "xsi:type" => "xsd:string")
                  item.value(@type, "xsi:type" => "xsd:string")
                end
                args.item do |item|
                  item.key("product", "xsi:type" => "xsd:string")
                  item.value(@product, "xsi:type" => "xsd:string")
                end
              end
            end
          end
        end
    
        builder.target!
      end
    end
    
    client.call(:call, xml: ServiceRequest.new(session, 'up_sell', '166').to_s)
    

    Thanks to @rubiii for the direction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to call the method CakeSession->destroy() I'm getting this error: Undefined index: userAgent
I'm using richfaces and trying call method in bean when event component is fired.
Im trying to call a method that will add or subtract 1 from a
I'm trying to call a WCF service using soap in IE8 and I can't
I'm trying to call a method from another class with a simple button in
I'm trying to call a WCF service cross-domain using javascript, over http. I've added
Trying to call the .click() method for a controlgroup in another method. Heres what
Can anybody help me with this?: I'm trying call a method from a my
Scenario : Trying to call the .AttachAll method on a table in my LinqToSql
Trying to call from an android client, using the signpost oauth libs. I generated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.