Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[API][JAVA] Create product (or other object)
 
biondo
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-07-24
Italy
 

Hello, I’m using magento’s API trough Java.
I can create/list customer, but I’m not able to create a product.

MagentoSOAPInterface magentoSOAPInterface = (MagentoSOAPInterfacecontext.getBean("magentoSOAPinterface"MagentoSOAPInterface.class);
.... 
//login, sessionId
magentoSOAPInterface.call(sessionId"product.create", new Object[]{"simple",4,"test", new Object[]{"name","name_product"}});

where the object magentoSOAPInterface is ok because i use it for customer.list, customer.create etc.

I receive the error

AxisFault
 faultCode
{http://schemas.xmlsoap.org/soap/envelope/}Server
 
faultSubcode
 
faultStringUsing $this when not in object context
 faultActor

 
faultNode
 
faultDetail
    
{http://xml.apache.org/axis/}stackTrace:Using $this when not in object context
    
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
..................................

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
celuser
Jr. Member
 
Total Posts:  15
Joined:  2008-09-10
 

What is the tool you used to generate the classes from WSDL file?

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