0

I have created an API in Magento 2.3 to update the product qty in bulk. The functionality is working fine, when we execute the API using the $soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'stream_context' => $context]);

But when I try to execute the SOAP API using POSTMAN it showing the error ** GenericFaultParameter **

The request body is below:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://magento.local/soap/default?wsdl&services=namespaceProductProductUpdateManagementV1">
   <soap:Header/>
   <soap:Body>
   <def:namespaceProductProductUpdateManagementV1UpdateProductRequest>

         <products>
            <item>
               <qty>30</qty>
               <storeId>0</storeId>
               <sku>24-MB01</sku>
            </item>

            <item>
               <qty>30</qty>
               <storeId>0</storeId>
               <sku>24-MB04</sku>
            </item>

            <item>
               <qty>30</qty>
               <storeId>0</storeId>
               <sku>24-WB04</sku>
            </item>
         </products>
      </def:namespaceProductProductUpdateManagementV1UpdateProductRequest>
   </soap:Body>


</soap:Envelope>

The returned error is

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="MagentoWSDL" targetNamespace="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
    <types>
        <xsd:schema targetNamespace="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
            <xsd:element name="GenericFault" type="tns:GenericFault"/>
            <xsd:complexType name="GenericFaultParameter">
                <xsd:sequence>
                    <xsd:element name="key" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation></xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="value" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation></xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfGenericFaultParameter">
                <xsd:annotation>
                    <xsd:documentation>An array of GenericFaultParameter items.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:GenericFaultParameter">
                        <xsd:annotation>
                            <xsd:documentation>An item of ArrayOfGenericFaultParameter.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="WrappedError">
                <xsd:sequence>
                    <xsd:element name="message" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation></xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="parameters" type="tns:ArrayOfGenericFaultParameter" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Message parameters.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:natureOfType>array</inf:natureOfType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfWrappedError">
                <xsd:annotation>
                    <xsd:documentation>An array of WrappedError items.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:WrappedError">
                        <xsd:annotation>
                            <xsd:documentation>An item of ArrayOfWrappedError.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="GenericFault">
                <xsd:sequence>
                    <xsd:element name="Trace" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Exception calls stack trace.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Parameters" type="tns:ArrayOfGenericFaultParameter" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Additional exception parameters.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:natureOfType>array</inf:natureOfType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="WrappedErrors" type="tns:ArrayOfWrappedError" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Additional wrapped errors.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:natureOfType>array</inf:natureOfType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="FrameworkDataImageContentInterface">
                <xsd:annotation>
                    <xsd:documentation>Image Content data interface</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="base64EncodedData" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Media data (base64 encoded content)</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="type" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>MIME type</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="name" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Image name</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="CustomerDataRegionExtensionInterface">
                <xsd:annotation>
                    <xsd:documentation>ExtensionInterface class for @see \Magento\Customer\Api\Data\RegionInterface</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
            </xsd:complexType>
            <xsd:complexType name="CustomerDataRegionInterface">
                <xsd:annotation>
                    <xsd:documentation>Customer address region interface.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="regionCode" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Region code</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="region" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Region</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="regionId" minOccurs="1" maxOccurs="1" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>Region id</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:min/>
                                <inf:max/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="extensionAttributes" minOccurs="0" maxOccurs="1" type="tns:CustomerDataRegionExtensionInterface">
                        <xsd:annotation>
                            <xsd:documentation>Existing extension attributes object or create a new one.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfString">
                <xsd:annotation>
                    <xsd:documentation>An array of string items.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>An item of ArrayOfString.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="CustomerDataAddressExtensionInterface">
                <xsd:annotation>
                    <xsd:documentation>ExtensionInterface class for @see \Magento\Customer\Api\Data\AddressInterface</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
            </xsd:complexType>
            <xsd:complexType name="FrameworkAttributeInterface">
                <xsd:annotation>
                    <xsd:documentation>Interface for custom attribute value.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="attributeCode" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Attribute code</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="value" minOccurs="1" maxOccurs="1" type="xsd:anyType">
                        <xsd:annotation>
                            <xsd:documentation>Attribute value</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ArrayOfFrameworkAttributeInterface">
                <xsd:annotation>
                    <xsd:documentation>An array of FrameworkAttributeInterface items.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:FrameworkAttributeInterface">
                        <xsd:annotation>
                            <xsd:documentation>An item of ArrayOfFrameworkAttributeInterface.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="CustomerDataAddressInterface">
                <xsd:annotation>
                    <xsd:documentation>Customer address interface.</xsd:documentation>
                    <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="id" minOccurs="0" maxOccurs="1" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>ID</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:min/>
                                <inf:max/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="customerId" minOccurs="0" maxOccurs="1" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>Customer ID</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:min/>
                                <inf:max/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="region" minOccurs="0" maxOccurs="1" type="tns:CustomerDataRegionInterface">
                        <xsd:annotation>
                            <xsd:documentation>Region</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="regionId" minOccurs="0" maxOccurs="1" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>Region ID</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:min/>
                                <inf:max/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="countryId" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Country code in ISO_3166-2 format</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="street" type="tns:ArrayOfString" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Street</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:natureOfType>array</inf:natureOfType>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="company" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Company</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="telephone" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Telephone number</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="fax" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Fax number</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="postcode" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Postcode</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="city" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>City name</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="firstname" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>First name</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="lastname" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Last name</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="middlename" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Middle name</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="prefix" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Prefix</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="suffix" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Suffix</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="vatId" minOccurs="0" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>Vat id</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="defaultShipping" minOccurs="0" maxOccurs="1" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>If this address is default shipping address.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:default>false</inf:default>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="defaultBilling" minOccurs="0" maxOccurs="1" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>If this address is default billing address</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1">
                                <inf:default>false</inf:default>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="extensionAttributes" minOccurs="0" maxOccurs="1" type="tns:CustomerDataAddressExtensionInterface">
                        <xsd:annotation>
                            <xsd:documentation>Existing extension attributes object or create a new one.</xsd:documentation>
                            <xsd:appinfo xmlns:inf="http://magento.local/soap/default?services=namespaceProductProductUpdateManagementV1"/>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="customAttributes" type="tns:ArrayOfFrameworkAttributeInterface" minOccurs="0">
                        <xsd:annotation>
                            <xsd:documentation>Custom attributes values.</xsd:documentation>
.....
.....
.....
</definitions>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.