function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abdellah BoussaidiAbdellah Boussaidi 

API Basics Use SOAP API - Challenge Error (Create an Account Using SOAP API and SoapUI)

Hi team,

I'm trying to complete the following  a Trailhead challenge :

"Create an Account Using SOAP API and SoapUI
Using SOAP API and SoapUI, create an account with the name "Bluebeards Grog House" and the description "It is better than Blackbeards." Note: if you receive a TLS error when connecting to your org with SoapUI, please see these instructions."


I'm using the following soap envelope to create the Account. Whatever I did, I have the following error message : 

Challenge Not yet complete... here's what's wrong: 
It doesn't appear that you have logged in using SoapUI.​


 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>00D24000000b1KS!AQIAQKIHBbjociN.LyBrUF2VztSYstjiP3QSDKQmvnO2LWJQ0r7myMCPq7DHWO7GN.0q5tQgftbS8Zi72_V4NWkgFoJFUo9m</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Zero or more repetitions:-->
            <Name>Bluebeards Grog House</Name>
            <Description>It is better than Blackbeards.</Description>
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

Could someone help?

Thanks in advance 
Best Answer chosen by Abdellah Boussaidi
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue if that will help you
1) https://developer.salesforce.com/forums/?id=9060G000000XiWWQA0

Let us know if this will help you

 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue if that will help you
1) https://developer.salesforce.com/forums/?id=9060G000000XiWWQA0

Let us know if this will help you

 
This was selected as the best answer
Abdellah BoussaidiAbdellah Boussaidi
Thank you Amit.
I had to remove the LoginScopeHeader section from the header on the login call .
Nidhi PathariaNidhi Patharia
Hi,

I know it is an old question, but I cam across the same problem and after I found the problem I thought of putting it here, so that someone else could be benefitted.

The problem is for the challenge when you launch a playground make sure:
You generate the wsdl for the playgorund.
Copy the username from the settings. It will not be same as your email id like abc@gmail.com, it is similar to something like abc@brave-moose-348471.com
Request a new token from the playgorund if you don't already have it.
After you make sure you have completed the above steps follow the tutorial with the login credentials you get from the above steps and then copy the session id generated as a response from this and then the endpoint url for the account -> create is the domain name of your playground for eg: https://brave-moose-348471-dev-ed.my.salesforce.com/services/Soap/c/xx.0 xx is the version no of your api.

I hope this helps!
Lukesh KarmoreLukesh Karmore
 My error is  "Could not find an account"   idk what's the error
 
karnika singh 12karnika singh 12
To generate the Session ID use the below code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
    </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>yourusername@something.com</urn:username>
         <urn:password>yourpassword+securityToken</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

To Create the account use the session id generated from the previous message and your message will look like this below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
     <urn:SessionHeader>
  <urn:sessionId>00D5g000005IMGd!AQMAQBrc_y.kuNK05wSnDkogYHb1huRdcrb5mxZHh.DIuox0LDjeL2Coo6xYL_pk6JBzJztx4pvtF9mW54k0IXM42tdtnKBJ</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects xsi:type="urn1:Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <Name>Bluebeards Grog House</Name>
          <Description>It is better than Blackbeards.</Description>
      </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

Before pushing the green request button copy the your domain name in the URL.
It would appear like this below:
https://curious-bear-lx465w-dev-ed.my.salesforce.com/services/Soap/c/52.0

Thanks