0

I´m trying to create a customer using the "/api/soap/?wsdl" route I am sending this structure:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 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" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">   

  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns1:call xmlns:ns1="urn:Magento">
      <sessionId>125310091e72358b74d81ef6dasdasadf</sessionId>
      <resourcePath>customer.create</resourcePath>
      <email>ababab001@a.com</email>

      <args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
        <item SOAP-ENC:arrayType="xsd:ur-type[1]" xsi:type="SOAP-ENC:Array">
            <item xsi:type="SOAP-XML:Map">
                <key xsi:type="xsd:string">email</key>
                <value xsi:type="xsd:string">my_email@hotmail.com</value>
            </item>
        </item>
        <item xsi:type="SOAP-XML:Map">
            <key xsi:type="xsd:string">email</key>
            <value xsi:type="xsd:string">my_email@hotmail.com</value>
        </item>
      <email>my_email@hotmail.com</email>
      </args>
      <customerData SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
        <item xsi:type="ns2:Map">
          <key xsi:type="xsd:string">email</key>
          <value xsi:type="xsd:string">my_email@hotmail.com</value>
        </item>
        <email>my_email@hotmail.com</email>
      </customerData>
      <params SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
        <item xsi:type="ns2:Map">
          <key xsi:type="xsd:string">email</key>
          <value xsi:type="xsd:string">my_email@hotmail.com</value>
        </item>
        <email>my_email@hotmail.com</email>
      </params>
      <data SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array">
        <item xsi:type="ns2:Map">
          <key xsi:type="xsd:string">email</key>
          <value xsi:type="xsd:string">my_email@hotmail.com</value>
        </item>
        <email>my_email@hotmail.com</email>
      </data>
    </ns1:call>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

the conections and all are ok, however I am receiving this response:

Customer email is required

I can not figure how to send the customer attributes(email, firsname,etc), I am trying into args, customerData, etc, but it is not receiving the email, so, please, what is the correct structure? (I am doing in this way, I dont want php methods please, I am asking only the correct structure xml for include the customer data in the xml)

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.