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
bs2bs2 

Can custom Apex class WSDL be made part of Partner or Enterprise WSDL?

Is there a way that custom apex class WSDL to be  part of enterprise or partner WSDL? If not, can someone kindly let me know once the code is generated from WSDL, how can we call methods directly without logging in? I dont see any header properties that can be set on generated stub to support login.
 
 
SuperfellSuperfell
No, it can't be part of the enterprise or partner WSDL.

You get a sessionId (either by calling login from the enterprise or partner WSDL, or from a merge field in a web tab) and set it in the SessionHeader (just like the enterprise WSDL).
StanleyHStanleyH

I did it your way: I get the Customer_APEX_Class's WSDL, using SessionID, I could call that class's method successfully from .NET - no problem here.

 

But when I create a Package out of that class/Org, and Deploy it over to some other Org (tried both managed and unmanaged package), if I use SessionID from that new Org, to call the same APEX class (deployed in new Org) the same way, it will not work - always saying something like "object not null".

 

Any workaround?

 

Thanks!