0

I followed All steps properly but still getting response as 500 server error:

Response at Postman:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Client</faultcode>
            <faultstring>The child of the Envelope element must be either a Header or Body element</faultstring>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

My Request code: End Point URL : https://login.salesforce.com/services/Soap/c/49.0

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > 
    <env:body>
            <n1:login xmlns:n1="urn:enterprise.soap.sforce.com">
            <n1:username>*****</n1:username>
            <n1:password>****</n1:password>
            </n1:login>
    </env:body>
</env:Envelope>
Content-Type : text/xml
SOAPAction : '' 
0
0

The error you got specifies

The child of the Envelope element must be either a Header or Body element

"body" and "Body" aren't the same, and based on you receiving that error, I'd say that capitalization matters in this context.

You should be using <env:Body> instead of <env:body> (and yes, proper capitalization needs to be observed with closing tags too)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.