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
AlwaysConfusedAlwaysConfused 

The Salesforce API and Logins.

This is probably a stupid question but ...

 

In order to view the relevant WSDL I want to refer to I have to login to salesforce.

 

Once I have found the WSDL I can then copy and paste the url to it in to other browser windows as long as I remain logged in.

 

As soon as I logout however the link breaks.

 

So how does the reference in my client application work?

I am currently experiencing http 500 errors when trying to use the API ... and i'm wondering if this is related.

 

It's like you have to be logged in order to even view what the API looks like, surely that kinda negates the whole point in having an API that you need to login to???

 

SuperfellSuperfell

I'm not really following your question. Accessing the WSDL from salesforce.com is an interactive, developer time task, typically done once, or some small number of times during the development process, its not a runtime task (especially in .NET where the WSDL is converted to code at compile time).

AlwaysConfusedAlwaysConfused

Simon :

 

I understand your confusion, this isn't a typical user question.

 

As a C# developer I create a reference to web services using the tooling in Visual Studio, that tooling simply requires a url.

 

My point was that the url required to reference the Salesforce API (the url to the wsdl) is only valid if you have already logged in with a valid session to the web interface. Therefore the API is inaccessible to my code is it not?

 

But ...

 

Experience tells me this is not the case ... so how does it work? 

How can my code make calls on an API that I can only gain access to if I login.

AlwaysConfusedAlwaysConfused

If i login to Salesforce, then go to setup > develop > Partner WSDL

 

I get directed to this ...

https://emea.salesforce.com/soap/wsdl.jsp

 

My point is that whilst that is a valid url for the duration of my login as soon as I logout I have a WSDL definition that is not accessible, so how can I make calls on the API?

SuperfellSuperfell

As per the getting started guide, you should download a local copy of the WSDL, and have your tooling point to the local file.

AlwaysConfusedAlwaysConfused

Simon,

 

The API works for me perfectly fine ... I managed to figure out that my problem was the url in my config file pointing to the wrong API.

 

But ...

 

I was really just trying to figure out why the link breaks but the API still works (eg you can make the call to login) when you are not logged in despite the fact that you can't view the WSDL description without being logged in?

 

Maybe it's expected that the calls are made blindly based on the pre downloaded WSDL so the actual calls to the API are passed through authentication instead stopped by it (calls to login at least)