Magento Forum

Soap ‘call’ args to magento with Adobe Flex. Map type is not generated
 
taunus
Jr. Member
 
Total Posts:  3
Joined:  2009-03-03
 

I tried to generate proxy classes from Flex with the web service import. Retrieving data was succesful, but when I specify some args to the
‘call’ method they are not correcly sent. When I consume the web service with php, the Map type is created to send the ‘call’ args and it works fine. Flex instead, dows not generate this type. Anybody can help me?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrspeaker
Member
 
Total Posts:  44
Joined:  2009-01-19
 

I don’t know about flex and generating proxies, but I had issues using the XMLRPC web service which sounds similar to your issue: A call to methods that did not have arguments were find but I’d get a “parameters do not match” error whenever there was arguments.

The error turned out to be that even if you have 1 argument (after the method name) you must wrap it in an array (which is contradictory to the api docs) - i can’t find the post i wrote about it… it’s here sommmmewhere!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jerrydon
Jr. Member
 
Total Posts:  2
Joined:  2008-11-12
 

I have the same issue. Can you please copy paste the code?

 
Magento Community Magento Community
Magento Community
Magento Community
 
taunus
Jr. Member
 
Total Posts:  3
Joined:  2009-03-03
 

Calling the ‘call’ method of the MagentoService Class from fFex will result in the following output

<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns0:call xmlns:ns0="urn:Magento">
<args xsi:type="xs:anyType">
<sku>123</sku>
</args>
<sessionId xsi:nil="true"/>
<resourcePath xsi:type="xs:string">product.list</resourcePath>
</ns0:call>
</SOAP-ENV:Body>

But I notice, that the expected object should be like this ( making tests with a php client )

<args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">sku</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">like</key>
<value xsi:type="xsd:string">123</value>
</item>
</value>
</item>
</item>
</args>

The ‘args’ parameter is not correcly serialized. Any suggestion?

 
Magento Community Magento Community
Magento Community
Magento Community
 
taunus
Jr. Member
 
Total Posts:  3
Joined:  2009-03-03
 

Calling the ‘call’ method of the MagentoService Class from Flex will result in the following output

<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns0:call xmlns:ns0="urn:Magento">
<args xsi:type="xs:anyType">
<sku>123</sku>
</args>
<sessionId xsi:nil="true"/>
<resourcePath xsi:type="xs:string">product.list</resourcePath>
</ns0:call>
</SOAP-ENV:Body>

But I notice, that the expected object should be like this ( making tests with a php client )

<args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">sku</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">like</key>
<value xsi:type="xsd:string">123</value>
</item>
</value>
</item>
</item>
</args>

The ‘args’ parameter is not correctly serialized. Any suggestion?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jerrydon
Jr. Member
 
Total Posts:  2
Joined:  2008-11-12
 

@taunus
I expected the flex code you using to call Webservice method. I can’t understand the above tags.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top