2

I have created a apex webservice and generated the WSDL for it. My Apex class does not handle signing in and I'm not sure if I am meant to include code to allow that or if I just give my generated WSDL and the enterprise WSDL which they can use to log in. When giving people a WSDL to consume is it normal to provide both or people usually include logging in as part of their Apex class? If that is the case are there any good examples of how to do this? Thanks

2

You will need to provide an additional method to establish the Salesforce Session.

That Partner API is probably the most appropriate. It won't change like the Enterprise WSDL when there are schema changes to your org.

They can then use the login method from there to get the LoginResult SessionID and Server URL to then call your custom webservice. That linked documentation page has examples of calling the API from Java and C# to establish the session.

| improve this answer | |
  • That's great, thank you for the help. In that case I'll use the Partner API. – desdinova Sep 19 '16 at 23:51

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.