You need to sign in to do that
Don't have an account?
Dr. Thomas Miller
DebuggingHeader
The DebuggingHeader in the SOAP API is specified in
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/sforce_api_header_debuggingheader.htm. The page says that debugLevel attribute is deprecated and categories attribute should be used instead.
The latest partner WSDL however defines
<element name="DebuggingHeader">
<complexType>
<sequence>
<element name="debugLevel" type="tns:DebugLevel"/>
</sequence>
</complexType>
</element>
So what is the correct way to use this header?
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/sforce_api_header_debuggingheader.htm. The page says that debugLevel attribute is deprecated and categories attribute should be used instead.
The latest partner WSDL however defines
<element name="DebuggingHeader">
<complexType>
<sequence>
<element name="debugLevel" type="tns:DebugLevel"/>
</sequence>
</complexType>
</element>
So what is the correct way to use this header?
That said, the functionality is still in the WSDL as you can adjust the API version on the request to access the deprecated functionality. If you choose an old enough API version you can still use the debugLevel element when executing tests or running anonymous Apex.
With all current API versions you can safely set the debugLevel to LogType.None and then set the actual required levels via the categories. As I mentioned in your other question. Watch out for the TraceFlag overriding the DebuggingHeader (http://salesforce.stackexchange.com/q/77645/102).
your answer raises several new questions.
i) "... has largely been replaced by the Tooling and Matadata API". According to all docs I have seen the SOAP API described by Enterprise WSDL or Partner WSDL is still the defined way to communicate with your Salesforce org (if you aren't writing dev tools or modifying the org's schema through the API). Looking into the Tooling API I do not see this as a replacement for a 3rd party integration used e.g. to create records of custom objects.
ii) I want to work with the newest API version - but I would prefer not to modify the WSDL myself to get it in line with the documentation. Copying the DebuggingHeader, LogCategory, LogCategoryLevel and LogType definitions from the Tooling API WSDL into the Partner WSDL is something that Salesforce should do, not me.
If you want to work with data in an org then the Partner API or Enterprise API are the way to go. You should not need to modify the latest WSDL to work with it. There are a few exceptions based on support be the consuming environment. E.g. .NET doesn't support all the WSDL constructs as they are currently used.
I've been using the Partner API from .NET for many years now and I've never needed to modify the WSDL to work with it. That said, the latest version of the WSDL may contain a number of deprecated elements. You can safely ignore them and use the core functionality.