I'm new to using SOAP UI tool.

I've created a very simple apex webservice which returns just list of Account records.

Issue is : when I generate WSDL for above class and consume it in SOAP UI, I'm not getting option to login to SFDC

When I do the same for enterprise WSDL, I'm able to get ServerURL and sessionID with which I can send further requests like query etc ..

Below is the screen I get using enterprise WSDL, clearing getting option to login:

Enterprise WSDL

But If i trying using WSDL generated from custom apex webservice class, no such option comes, instead What I get is to make only following request :

Custom Apex webservice

Here I've to provide all such things like Log catagory Log level etc.... but not getting option to login into SFDC.

Let me know If I'm doing something wrong or missing something as I've just started using SOAP UI.

I've another question, beside SOAP UI, what are other good tool(s) to test custom Apex Webservices( preferably free)

Thanks !

1 Answer 1


The web-service WSDL that you have created will not contain any method to login.

In the 18th line of your webservice, you will be required to pass a session Id, which you can obtain using the enterprise/Partner WSDL.

How to get a session Id

Approach One: Login using your Enterprise/Partner WSDL (Shown Above) and It will generate a session-id and a URL (You will see that in the result). You might be required to put password as YOUR PASSWORD + SECURITY TOKEN

Approach Two: You can get your session Id from Developer console by executing UserInfo.getSessionId().

Approach One is recommended.

Now Goto you webservice and in SOAP UI, in place of session Id and put the sessionId that you have got in line 18 and in the URL on the top, enter the URL (serverURL) you got as response from login() method.

Now you can test your service.


Jeff's Blog Image Credits: JEFF DOUGLAS BLOG

Our organisation has moved on REST web-services only so I use POSTMAN or Workbench.

  • Thanks Manjit for Response, Just a quick thing ....so you mean to say .... in order to use WSDL generated from custom Apex web-service class, I also have to use Enterprise WSDL ? Using UserInfo.getSessionId(). is not an option as In future, I've to use external system to login.. Oct 4, 2015 at 14:32
  • Yes, if your organisation is using a middle ware / ESB, use enterprise WSDL
    – manjit5190
    Oct 4, 2015 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .