Salesforce wsc (sfdc-wsc): new release 23 coming

The current situation is a mess. There are now 3 known versions of the sfdc-wsc tool:

I will try to merge relevant changes from the codebase at mvnrepository but please notice it has already forked. The code style at mvnrepository is slightly different to my style and I take the liberty to refactor stuff in order to keep classes clean and without too much responsibility (e.g. ConnectorConfig should not have the responsibility of creating connections, adding stream wrappers and what not).

Released – wsc-23.jar – with the following:

Issues fixed:

Issue 39: Main-Class attribute added to Manifest. Tool can now be run with: java -jar wsc-23.jar…
Issue 49: Version # now part of wsc_license.html.
Issue 54: Ant-build changed to ensure non-java resources are not duplicated in the jar.
Issue 64: Transport has been modified to rely on the HTTP response code.
Issue 66: Removed (1.6-) compiler warnings.
Issue 67: SoapConnection throws RequestTimedOutException when requests are timed out.
Issue 69: Merge from 27.0.0 included the InvalidEntity enum value.

Enhancements:

General: Code from mvnrepository release 27.0.0 has been merged in.
General: (post-27.0.0 refactor) Removed code from ConnectorConfig that did not belong there. Simplified Transport interface etc.
General: XML tracing with “pretty print” has been reworked.
General: Removed outdated package.html from misc. packages.
Build: Manifest (in wsc-xx.jar) now contains version-# and build time.
SoapConnection: Removed the SessionTimedOutException “control flow exception”.
VersionInfo: Build-filter to include the version-# and time.
wsdlc: The “wsdl2java” tool now uses the 1.6 JavaCompiler. Extra effort has been put in place to find and load it from tools.jar…
wsdlc: Temp directory only deleted if not specified on cmd-line or the del-temp-dir property specifically set.
wsdlc: Allowed creation of .zip files as well.
wsdlc: Generated manifest now contains name of developer and wsc-version.
wsdlc: Compiles for “default target” unless target compileTarget property is specifically set.

I have a few things in mind for release 24. Most importantly I want to rewrite the “wsdl2java” tool (wsdlc), there are a few things “broken” and I do not like the dependence on Rhino.

Currently templates are used to create JavaScript code that is then invoked to create Java source. Now templating is great when you need to change the templates. But history shows this only happens very rarely in the wsc tool. And when they are changed the result is not necessarily obvious, the code-producing process is not transparent.

This has to be simplified. And while doing that we might as well document undocumented features, add ability to split generated java- and class files.

Also the “standalone” option does not work…

Updated 2013-02-09: Modified the build.xml to also create a minimum distribution jar containing only class-files needed at runtime – ie no “build” tools. Add to classpath to your application along with the (wsdlc-) generated jar.

About Jesper Udby

I'm a freelance computer Geek living in Denmark with my wife and 3 kids. I've done professional software development since 1994 and JAVA development since 1998.
This entry was posted in Java, Salesforce and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *