Open bereg2k opened 2 months ago
@bereg2k I am also seeing this issue. It is preventing me from generating new stub files for the tooling api >60.0. This is a problem because as new api versions are released, if code is not kept up to date, it can fail when parsing org metadata.
@bereg2k fyi, I've also reported this issue inside the partner community. I'm hoping this will get some movement. I see you mentioned a workaround, but those classes are not actually available to us, right?
@CloudStudioInc they are available because you can clone this repo, make adjustments as you see fit, and build a project locally :) Then use it with your WSDL. I tried this route – worked for me.
The easiest route though... make minor adjustments to the CalculatedInsightPublishScheduleInterval
in the Tooling XML to make the tool build your JAR bindings (edit the enum values, remove the type... whatever works).
The tooling.xml (and strong typed) has always problems for the generation of the jar with wsc.
https://mvnrepository.com/artifact/com.force.api/force-wsc : 62.0 https://mvnrepository.com/artifact/com.force.api/force-partner-api : 62.0 https://mvnrepository.com/artifact/com.force.api/force-metadata-api : 62.0 https://mvnrepository.com/artifact/com.force.api/force-apex-api : 62.0
(the jars above are always updated correctly)
and
https://mvnrepository.com/artifact/com.force.api/force-tooling-api : 32.0 (2018), for many years now, we had almost always problems for the generation of this jar. That seems deliberate given that it is a very complicated generation with maven that works fine for the other xml (mvnrepository ALWAYS updated including all the sub-versions). I don't know why because by removing the next type (degraded version) that works for tooling.xml (not sufficient for the strongly typed).
@alcabon My issue here is that CalculatedInsightPublishScheduleInterval
in question is standard built-in type that's controlled by Salesforce.
@bereg2k I know that CalculatedInsightPublishScheduleInterval in question is a standard built-in type that's controlled by Salesforce and none of the AI potential solutions works (purely theoretical and it is intended for the Salesforce developers, AI can help them in order to understand their error that block the generation (it is not a major errror but a critical one)).
- If this WSDL is provided by a third-party service, consider reporting this as an issue to them.
That is the only possible action. Otherwise, I removed the wrong types many times (degraded versions but still working). We cannot "correct" these errors because it is controlled by Salesforce.
Tooling API WSDL generates the XML file with the following element inside of it:
However, when compiling Java Bindings for the SOAP API for it, the execution fails:
Logs:
This is the underlying Java class which the script is trying to create from the XML element:
CalculatedInsightPublishScheduleInterval.java
Having enum values like this won't compile because it's incorrect Java syntax:
0("0")
,1("1")
Is it possible to work around this by compiling such enumerations using the
_
symbol in the beginning? Like this:_0("0")
,_1("1")
Library version in Maven POM: